-
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
feat: aave stata v2 #856
base: master
Are you sure you want to change the base?
feat: aave stata v2 #856
Conversation
@@ -1,13 +1,13 @@ | |||
import { DexParams } from './types'; | |||
import { DexConfigMap } from '../../types'; | |||
import { Network } from '../../constants'; | |||
import { AaveV3Ethereum, MiscEthereum } from '@bgd-labs/aave-address-book'; | |||
import { AaveV3Ethereum, GhoEthereum } from '@bgd-labs/aave-address-book'; |
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.
Gho addresses are now in a separated library.
src/dex/aave-v2/tokens.ts
Outdated
@@ -1,6 +1,6 @@ | |||
import { aToken, Token } from '../../types'; | |||
import { Network } from '../../constants'; | |||
import { tokenlist } from '@bgd-labs/aave-address-book'; | |||
import tokenlist from '@bgd-labs/aave-address-book/dist/tokenlist'; |
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 didn't manage to make typescript accept this.
On other projects ppl import @bgd-labs/aave-address-book/tokenlist
just fine, but here i didn't figure out why it does not work. As on v2 for sure no more assets are added could make sense to just copy the list to the repo and drop the import.
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 don't mind copying the list to the repo, not worth spending time trying to make it work
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.
okay, updated with a copy (filtered to only the relevant v2 addresses)
AaveV3Stata: { | ||
[Network.MAINNET]: { | ||
factoryAddresses: [ | ||
AaveV3Ethereum.STATA_FACTORY, |
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.
there is one factory per pool, so can be multiple per network (prev implementation did not support that)
@@ -65,12 +64,12 @@ export const Config: DexConfigMap<DexParam> = { | |||
poolAddress: AaveV3BNB.POOL, | |||
wethGatewayAddress: AaveV3BNB.WETH_GATEWAY, | |||
}, | |||
[Network.ZKEVM]: { |
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.
zkEVM was never activated.
@@ -2,13 +2,13 @@ import { DexParams } from './types'; | |||
import { DexConfigMap } from '../../types'; | |||
import { Network } from '../../constants'; | |||
|
|||
import { MiscEthereum } from '@bgd-labs/aave-address-book'; | |||
import { GhoEthereum, AaveSafetyModule } from '@bgd-labs/aave-address-book'; |
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.
safetymodule now has it's own lib
@sakulstra It seems like the new |
@0xNazarii thanks for having a look. The |
The aave DAO has recently released the next revision of 4626 aToken wrappers: https://x.com/MixBytes/status/1866840081362784603
The new version is not an upgrade but a new deployment and thus needs a new integration.
While the implementations are very similar on the surface there are some small details that changed:
factory. getStaticATokens()
is nowfactory.getStataTokens()
deposit
andredeem
are no longer overloaded, but instead a newredeemATokens
anddepositATokens
was addedI did not manage to run the tests.