-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aburkut/back 1791 aave stata v2 #868
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next tokens are missing, is this on purpose?
[
{
"chainId": 1,
"address": "0x1E6bb68Acec8fefBD87D192bE09bb274170a0548",
"name": "Aave interest bearing AMPL",
"decimals": 9,
"symbol": "aAMPL",
"tags": [
"aTokenV2",
"aaveV2"
],
"logoURI": "https://raw.githubusercontent.com/bgd-labs/web3-icons/main/icons/full/aampl.svg",
"extensions": {
"pool": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
"underlying": "0xD46bA6D942050d489DBd938a2C909A5d5039A161"
}
},
{
"chainId": 1,
"address": "0x683923dB55Fead99A79Fa01A27EeC3cB19679cC3",
"name": "Aave interest bearing FEI",
"decimals": 18,
"symbol": "aFEI",
"tags": [
"aTokenV2",
"aaveV2"
],
"logoURI": "https://raw.githubusercontent.com/bgd-labs/web3-icons/main/icons/full/afei.svg",
"extensions": {
"pool": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
"underlying": "0x956F47F50A910163D8BF957Cf5846D573E7f87CA"
}
}
]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KanievskyiDanylo Could you please tag @sakulstra ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed them on purpose. Is custom implementations that are essentially broken
depositToAave: boolean, | ||
]; | ||
|
||
export type RedeemParams = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not exported, as well as DepositParams
@@ -0,0 +1,63 @@ | |||
import { Address } from '../../types'; | |||
|
|||
export type PoolState = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used
const cached = await this.dexHelper.cache.get( | ||
this.dexKey, | ||
this.network, | ||
`state_${stataAddressLower}`, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes RPC call only once per block, considering that this swap is available only for the limited amount of tokens, do we really need to use cache here? just because for me it looks simples to use RPC call and store locally without touching cache at all
@@ -0,0 +1,494 @@ | |||
import { AsyncOrSync } from 'ts-essentials'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant import
extends SimpleExchange | ||
implements IDex<AaveV3StataV2Data> | ||
{ | ||
readonly hasConstantPriceLargeAmounts = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can put it as true
// This is true if the the DEX is simply
// wrapping/ unwrapping like weth, lending pools, etc
// or has a pool where arbitrarily large amounts has
// constant price.
readonly hasConstantPriceLargeAmounts: boolean;
Original PR #856