Fujicracy / fuji-v2

Cross-chain money market aggregator
https://fuji-v2-frontend.vercel.app
15 stars 10 forks source link

Aave v3 efficiency mode #699

Closed 0xdcota closed 8 months ago

0xdcota commented 9 months ago

This pull requests adds the efficiency mode to the Aave V3 lending providers.

vercel[bot] commented 9 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuji-v2-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 14, 2023 7:57pm
0xdcota commented 9 months ago

@brozorec this PR is 99% ready, only missing step is to actually redeploy the AaveV3 lending provider in all chains. All forking tests with AaveV3 are passing, therefore I assume it should be fine now on real nets. I followed your suggestion and now the emode configs are part of each chain json. Please review and if you have some extra time we can do a test for replacing the provider on a L2. Once we are good there, then we move to do it in all chains.

0xdcota commented 8 months ago

@brozorec all new vaults that require e-mode have been updated and checked for functionality.

These vaults use AaveV3 provider address with the emode upgrade. All other vaults can remain using old AaveV3, since e-mode is not applicable to their collateral-debt asset pair.

arbitrum:

optimism:

ethereum

This should merge and have the vaults ready for front-end.

As a side note the new AaveV3 provider in all chains needs to be checked on the front-end so that the logo shows on the different pages where there is provider logo.

0xdcota commented 8 months ago
  1. You have overridden the file with the address of aave v3 everywhere. This will create issues bc we loose track of the address for this provider for some of the vaults that are still using it. If we are going to use both contracts, then better keep them both: for ex: Aave_V3_Arbitrum and Aave_V3_Arbitrum_Emode. This will facilitate handling both providers on the frontend as well bc rn it messes them up.

Agree to keep them with different names.

  1. On point 2:

Emode config numbers are set by Aave governance. On the question on why they decided to not keep them consistent across chains, I think is up to them 😕 . From what I observed on other chains they set first the stablecoin-correlated configs and then ethereum-correlated. However, on the AaveV3-ethereum they set first the ethereum-correlated configs, and they haven't set-up any stablecoin-correlated config. I guess they are set as they go. For instance on Polygon the matic-correlated is configId=3, but I don't think this will be applicable to any other chain.