Upgrade Aave V3 pools to Aave V3.0.2
01Summary
Upgrade Aave v3 pools across Ethereum, Polygon, Optimism, and Arbitrum from v3.0.0/v3.0.1 to v3.0.2, with authorization for Avalanche and Fantom upgrades via Guardian. Improvements include better isolation mode handling, LTV0 fixes, and flashBorrower improvements. All implementations (Pool, PoolConfigurator, aToken, variableDebtToken, stableDebtToken) and AaveProtocolDataProvider will be updated.
- Type
- contract upgrade
Key changes
- Upgrade Pool implementation to v3.0.2 across all networks(high)
- Upgrade PoolConfigurator implementation to v3.0.2 (all networks except mainnet)(high)
- Replace AaveProtocolDataProvider with v3.0.2 version (all networks except mainnet)(high)
- Update all aToken, variableDebtToken, and stableDebtToken implementations(high)
- Enable flashloaning flag on all currently listed reserve tokens(medium)
- Grant ISOLATED_COLLATERAL_SUPPLIER_ROLE to SWAP_COLLATERAL_ADAPTER and MIGRATION_HELPER for pre-upgrade behavior maintenance(medium)
- Align flash loan fees to 0.05% total premium and 0.04% protocol premium(low)
- Improve isolation mode, LTV0, and flashBorrower initiated flashloan handling(high)
Notable concerns
- Affects critical liquidity pool contracts across multiple networks
- All security procedures completed including code diffing, storage diffing, asset configuration validation, E2E testing, and external audits by Certora and SigmaPrime
- No funding involved; this is a protocol upgrade
Generated by Kvorum
02Description
Simple Summary
This proposal upgrades the Aave v3 instances on Ethereum, Polygon, Optimism and Arbitrum to the v3.0.2 version. The v3.0.2 is an upgrade based on the v3.0.1 version already running on the new Aave v3 Ethereum pool which comes with improvements to the handling of isolation mode, LTV0, and flashBorrower initiated flashloans. If this proposal succeeds, it will also authorize the upgrade of the V3 pools on Avalanche and Fantom via a delegatecall by the Aave Guardian.
The upgrades to be performed will affect the following contracts:
- Pool
- PoolConfigurator
- aToken/variableDebtToken/stableDebtToken
And replace the AaveProtocolDataProvider on the PoolAddressesProvider with it's next iteration.
Motivation
Aave v3 Ethereum has been activated via Aave governance at the end of January. But in reality, as described HERE, the smart contracts on Ethereum are a slightly improved version of v3, the so-called v3.0.1.
In an ecosystem like Aave, with liquidity pool instances spread across multiple networks, it is fundamental to try to keep version consistency, which is not the case at moment, with Polygon, Avalanche, Optimism, Arbitrum, Fantom, and Harmony running still on v3.0.0. Therefore this proposal aligns all pools at v3.0.2.
Specification
Upon execution on the respective network the proposal will:
- call
POOL_ADDRESSES_PROVIDER.setPoolImpl(NEW_POOL_IMPL)to replace the Pool implementation (all networks) - call
POOL_ADDRESSES_PROVIDER.setPoolConfiguratorImpl(NEW_POOL_CONFIGURATOR_IMPL)to replace the PoolConfigurator implementation (all networks, excluding mainnet) - call
POOL_ADDRESSES_PROVIDER.setPoolDataProvider(NEW_PROTOCOL_DATA_PROVIDER)to replace the AaveProtocolDataProvider (all networks, excluding mainnet) - iterate through all currently listed tokens on the pool (fetched via
POOL.getReservesList()) (all networks, excluding mainnet)- call
POOL_CONFIGURATOR.updateAToken(inputAToken)to replace the aToken implementation - call
POOL_CONFIGURATOR.updateVariableDebtToken(inputVToken)to replace the vToken implementation - call
POOL_CONFIGURATOR.updateStableDebtToken(inputSToken)to replace the sToken implementation - call
POOL_CONFIGURATOR.setReserveFlashLoaning(reserve, true)to enable flashloaning on the reserve
- call
- call
ACL_MANAGER.grantRole(ISOLATED_COLLATERAL_SUPPLIER_ROLE, SWAP_COLLATERAL_ADAPTER)to maintain pre-upgrade behavior (all networks, excluding harmony) - call
ACL_MANAGER.grantRole(ISOLATED_COLLATERAL_SUPPLIER_ROLE, MIGRATION_HELPER)to maintain pre-upgrade behavior (mainnet, avalanche, polygon) - call
POOL_CONFIGURATOR.updateFlashloanPremiumTotal(0.0005e4)andupdateFlashloanPremiumToProtocol(0.0004e4)to align flash loan fees with the currently configured.
Security and additional considerations
We applied the following security procedures for this upgrade:
- Code diffing: Comparing the codebase of all v3.0.0 with the one of v3.0.1, more specifically the one on Aave v3 Ethereum, to not have any unexpected logic included.
- Storage diffing: Comparing the storage layout of both versions, to verify that there is no misalignment between them, which could create important problems.
- Assets configurations pre/post upgrade: In a simulation environment, validating the configurations of the assets pre-upgrade are the same as post-upgrade, only with those changes that are intended (e.g. enabling the new
flashloanableflag only present on v3.0.1, later explained). - Additional E2E tests: Also in a simulation environment, checking that the main actions available on the pool can be performed (e.g. supply, borrow) on all pools with non-frozen assets.
- Extra review: Given their involvement in the development of Aave v3, we have requested AaveCompanies to take a look at the procedure, in order to have multiple parties validating it.
- Audit: Certora and SigmaPrime reviewed the v3.0.1 -> v3.0.2 changes
The decision to enable flashloanable for all the assets has been taken in order to have the highest possible consistency with the current state of the assets in the pools: currently, all are flashloanable, so by enabling the new flag, they will continue to be so.
References
- Repository
- Storage/code diffs
- sigma prime 3.0.1 audit report
- PeckShield 3.0.1 audit report
- Cerora 3.0.2 audit report
- sigma prime 3.0.2 audit report
- Forum discussion
- Payload:Mainnet
- Payload:Polygon
- Payload:Arbitrum
- Payload:Optimism
- Update diffs
- BorrowLogic: Mainnet, Polygon, Arbitrum, Optimism, Avalanche, Fantom
- BridgeLogic: Mainnet, Polygon, Arbitrum, Optimism, Avalanche, Fantom
- ConfiguratorLogic: Mainnet, Polygon, Arbitrum, Optimism, Avalanche, Fantom
- EModeLogic: Mainnet, Polygon, Arbitrum, Optimism, Avalanche, Fantom
- FlashLoanLogic: Mainnet, Polygon, Arbitrum, Optimism, Avalanche, Fantom
- LiquidationLogic: Mainnet, Polygon, Arbitrum, Optimism, Avalanche, Fantom
- PoolLogic: Mainnet, Polygon, Arbitrum, Optimism, Avalanche, Fantom
- SupplyLogic: Mainnet, Polygon, Arbitrum, Optimism, Avalanche, Fantom
- PoolImpl: Mainnet, Polygon, Arbitrum, Optimism, Avalanche, Fantom
- PoolConfiguratorImpl: Polygon, Arbitrum, Optimism, Avalanche, Fantom
- ATokenImpl: Polygon, Arbitrum, Optimism, Avalanche, Fantom
- STokenImpl: Polygon, Arbitrum, Optimism, Avalanche, Fantom
- VTokenImpl: Polygon, Arbitrum, Optimism, Avalanche, Fantom
- AaveProtocolDataProvider: Polygon, Arbitrum, Optimism, Avalanche, Fantom
Copyright
Copyright and related rights waived via CC0.
03Mismatch analysis
A calldata-vs-description analysis is not generated yet. Review the decoded actions →
04Actions
- Target
- 0x6f6c…51d5
- Value
- 0 wei
- Function
- fallback()
- Arguments
{}- Calldata
- Target
- 0x158a…d45b
- Value
- 0 wei
- Function
- execute(address)
- Arguments
{ "0": "0xb56c0688316c333bFAA20cD7d836e05d48939b58" }- Calldata
- Target
- 0x5f5c…6711
- Value
- 0 wei
- Function
- execute(address)
- Arguments
{ "0": "0x45CE944c29A25AEE0e135f8f89aB55Dc9c5438E5" }- Calldata
- Target
- 0xd1b3…cfa3
- Value
- 0 wei
- Function
- execute(address)
- Arguments
{ "0": "0xF876Fa9A96EcD51c0BBa8554Ff2e397fE7F73BAB" }- Calldata
05Tally
Summed from votes
06Voters
| Voter | Choice | % of total | Rationale | ||
|---|---|---|---|---|---|
| 320x329c…3ed4 | For | 229.9K | 32.85% | — | 4y ago |
| 070x0703…961b | For | 108.1K | 15.45% | — | 4y ago |
| 620x62a4…816a | For | 82K | 11.72% | — | 4y ago |
| 130x13bd…8548 | For | 81K | 11.57% | — | 4y ago |
| B80xb83b…cf5c | For | 80.6K | 11.52% | — | 4y ago |
| 730x732a…b848 | For | 48.4K | 6.92% | — | 4y ago |
| B90xb933…8dd1 | For | 42K | 6.01% | — | 4y ago |
| 160x1664…36d9 | For | 16.9K | 2.42% | — | 4y ago |
| 5B0x5b3b…7c98 | For | 6.8K | 0.97% | — | 4y ago |
| 180x1855…98ba | For | 3K | 0.43% | — | 4y ago |
| 050x0527…8469 | For | 603 | 0.09% | — | 4y ago |
| A00xa06c…61f7 | For | 397.7 | 0.06% | — | 4y ago |
| EA0xea17…6676 | For | 38.5 | 0.01% | — | 4y ago |
| E20xe251…cfc5 | For | 1 | 0.00% | — | 4y ago |
| E40xe459…e666 | For | 0.5 | 0.00% | — | 4y ago |
07Forum
No forum thread is confidently linked to this proposal.
08Similar proposals
- aavecanceledUpgrade Aave V3 pools to Aave V3.0.2100%
- aaveexecutedAave Pool update83%
- aaveexecutedAave v3.1 upgrade82%
- aaveexecutedUpgrade Aave instances to v3.6 Part 281%
- aaveexecutedUpgrade all Aave instances to 3.280%
- aaveexecutedUpgrade Aave instances to v3.6 Part 180%
- aaveexecutedUpgrade Aave instances to v3.480%
- aaveexecutedRewards controller update across V3 pools79%
- aaveexecutedUpgrade Aave instances to v3.379%
- aaveexecutedUpgrade Aave instances to v3.6 Part 379%