KVORUM
aaveSource: Aave governor v2 · #213

Upgrade Aave V3 pools to Aave V3.0.2

executedMay 5, 2023, 01:26 AM UTCbyF70xf71f…1e02

01Summary

AISummary by Kvorumclaude-haiku-4-5

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
ContractsPoolPoolConfiguratoraTokenvariableDebtTokenstableDebtTokenAaveProtocolDataProviderACL_MANAGER
Generated by Kvorum
model: claude-haiku-4-5
provider: anthropic
profile: anthropic-fast-v1
prompt: v1.0
generated: 2mo ago
Read the description ↗

02Description

708 words

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:

  1. Pool
  2. PoolConfigurator
  3. 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 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) and updateFlashloanPremiumToProtocol(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 flashloanable flag 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

Copyright

Copyright and related rights waived via CC0.

03Mismatch analysis

AIMismatch analysis by Kvorum

A calldata-vs-description analysis is not generated yet. Review the decoded actions →

04Actions

4 total
#0fallback()chain 0x1
Target
0x6f6c…51d5
Value
0 wei
Function
fallback()
Arguments
{}
Calldata
#1execute(address)chain 0x1
Target
0x158a…d45b
Value
0 wei
Function
execute(address)
Arguments
{
  "0": "0xb56c0688316c333bFAA20cD7d836e05d48939b58"
}
Calldata
#2execute(address)chain 0x1
Target
0x5f5c…6711
Value
0 wei
Function
execute(address)
Arguments
{
  "0": "0x45CE944c29A25AEE0e135f8f89aB55Dc9c5438E5"
}
Calldata
#3execute(address)chain 0x1
Target
0xd1b3…cfa3
Value
0 wei
Function
execute(address)
Arguments
{
  "0": "0xF876Fa9A96EcD51c0BBa8554Ff2e397fE7F73BAB"
}
Calldata

05Tally

Summed from votes

Voters15
VP participating699.8K
Outcome (current)For
Current support100%

06Voters

15 total
Filter:
VoterChoice% of totalRationale
320x329c…3ed4For229.9K32.85%—4y ago
070x0703…961bFor108.1K15.45%—4y ago
620x62a4…816aFor82K11.72%—4y ago
130x13bd…8548For81K11.57%—4y ago
B80xb83b…cf5cFor80.6K11.52%—4y ago
730x732a…b848For48.4K6.92%—4y ago
B90xb933…8dd1For42K6.01%—4y ago
160x1664…36d9For16.9K2.42%—4y ago
5B0x5b3b…7c98For6.8K0.97%—4y ago
180x1855…98baFor3K0.43%—4y ago
050x0527…8469For6030.09%—4y ago
A00xa06c…61f7For397.70.06%—4y ago
EA0xea17…6676For38.50.01%—4y ago
E20xe251…cfc5For10.00%—4y ago
E40xe459…e666For0.50.00%—4y ago
Showing 15

07Forum

No forum thread is confidently linked to this proposal.