[ARC] Polygon and Avalanche v2 -> v3 Treasury Migration


Title: [ARC] Polygon and Avalanche v2 → v3 Treasury Migration
Status: Proposal
Author: @llamaxyz 3SE Holdings @oneski22 @MatthewGraham
Created: 2022.11.15


Simple Summary

This ARC presents the community with the opportunity to migrate our v2 Collector holdings from Avalanche and Polygon to the v3 Treasury holdings.

Abstract

Unifying the Treasury addresses on Avalanche and Polygon will consolidate Aave DAO’s holding and reduce the complexity of the proposals that interact with assets held in the Collector Contracts. This will also decrease the opportunity for errors to occur as the v2 Collector Contract address will be deprecated.

The proposal will achieve the following:

  • Redeem all aTokens held within the v2 Collector Contracts and deposit the funds into the respective v3 Treasury Contracts to earn yield.
  • Upgrade the v2 aToken implementations to route future revenue to the respective v3 Treasury Contracts

Combined these two actions will migrate all existing Collector Contract liquidity to the more secure v3 deployment and will consolidate the Treasury Contracts on the Polygon and Avalanche networks to a single address.

Motivation

This proposal is motivated by two key principles.

Aave DAO is one of the largest liquidity suppliers to the Polygon and Avalanche v2 Liquidity Pools with the respective collector holdings representing roughly 3% and 5% of all supply on the respective v2 deployment. With the v2 markets to be deprecated some time in the future, large liquidity providers are at risk of not being able to redeem their entire position due to liquidity constraints within the respective Reserve. In transitioning liquidity from the v2 to v3 liquidity pools, it is beneficial for the DAO to transit ahead of time and not risk being one of the last liquidity providers to the obsolete deployments.

With the newer v3 deployment offering increased security and the DAO set to deprecate the v2 markets in time, the DAO has the opportunity to act as a first mover in migrating to the v3 Liquidity Pools. The DAO can signal to the market it prefers to provide liquidity on v3 deployments, encouraging others to follow.

Specification

Should the DAO positively signal via snapshot to proceed with the above proposal, Llama will prepare an AIP that will deliver the following upgrades to the Polygon and Avalanche v2 Liquidity Pools:

  • Withdraw all Collector Contract controlled assets from the v2 Liquidity Pools and deposit funds into the respective v3 Reserves.
  • Migrate all assets from the v2 Collectors to the respective v3 Treasury Contract.
  • Upgrade the aToken implementations to direct all v2 Collector Contract Revenue to the respective v3 Treasury Contract.

The table below shows a list of the v2 and v3 Treasury Contracts across various networks. The v2 Collector Contract funds will be moved to the respective v3 Treasury Contract:

Network Deployment Address
Avalanche Aave v3 0x467b92aF281d14cB6809913AD016a607b5ba8A36
Avalanche Aave v2 0x5ba7fd868c40c16f7aDfAe6CF87121E13FC2F7a0
Polygon Aave v3 0x7734280A4337F37Fbf4651073Db7c28C80B339e9
Polygon Aave v2 0xe8599F3cc5D38a9aD6F3684cd5CEa72f10Dbc383

Next step is for a Snapshot to be created where voting YAE is to proceed with the implementation as specified above. To vote NAE or ABSTAIN is for the DAO to not proceed with this proposal.

Copyright

Copyright and related rights waived via CC0

6 Likes

Seems like a right move.

Is there a way to automate this to kick the rewards to the V3 contracts without perpetual Governance votes?

@bgdlabs for your thoughts here.

One could deploy a contract that receives max allowance and allows permissionless migration which should work for almost all assets(similar to what @Llamaxyz did on FEI-DAI psm).
There’s some special cases like USDt vs USDT.e on avalanche which might not be so clear :thinking:

Shouldn’t be terribly complicated though.

1 Like

We have already communicated to @Llamaxyz that we have been working on the background of certain improvements/unification of the Collectors codebase and architectural flow.
We think it is a good idea that we finish those for then Llama to proceed with anything else required by the community on top, regarding so-called “treasury management”.

We will comment on a more detailed post early next week, but the main features we were working on are:

  1. Unification of the implementation-under-proxy of all the v3 Collectors, to be in sync with the most updated version, which is the Aave v2 Ethereum (having streaming, apart from transfer and approval capabilities). This should simplify potential integration by everybody.
  2. Change a bit the interaction flow, to remove the need of a ControllerOfCollector smart contract.
  3. Pointing the _treasury variable on the aToken implementation on the current v2 pools on Avalanche and Polygon (via an upgrade of implementation) to the v3 Collectors. Even if we are not really dealing usually with the movement of funds, we will include on the payload transferring all the current v2 aTokens held by the v2 Collectors to v3’s, given that it is not natural to leave them isolated on v2.

@Llamaxyz has commented to us that probably makes sense to introduce an extra step of claiming rewards from different LM programs on v2, and transferring the to v3 Collectors. We agree that is simple enough to add on the same payload, so we will introduce it.
The further permissionless v2-to-v3 strategy of migration of aTokens on the unified Collector is something that, for our understanding, Llama will be proceeding with.

5 Likes

Thanks for the proposal.

This is something that have been under the radar for long time. I feel that this proposal belongs to @bgdlabs more than @Llamaxyz given its nature, track record and good understanding of the treasury contracts they have.

Anyway, looking forward to BGD’s work and the Llama’s treasury management. Happy to see this joined effort!

After getting in touch with @bgdlabs and learning another proposal being worked on could easily incorporate the proposed upgrade, this proposal will be incorporated into the @bgdlabs ARC that is expected to be published on the forum in the near future.

After the @bgdlabs upgrade is executed, the v2 aTokens will accrue in the v3 Treasury Address. These aTokens, which accrue over time, need to be redeemed on v2 and deposited into the v3 Reserves. We did intend on doing this in a separate proposal and soon. However we have been informed that the aToken proposal from @AaveLabs contains something to help achieve this. As a result, we will wait for the aToken upgrade to be made public so we can fully assess the possibilities.

More generally, we are also looking into redeeming aBAL on Polygon v3 and Ethereum v2, transferring BAL to Ethereum as required and then depositing into the v3 BAL Reserve, when that Liquidity Pool is deployed. This will consolidate the aBAL holdings into a single Aave deployment. Once consolidated, our attention is to enable aBAL + aETH to be converted to veBAL in an ongoing fashion. This gives the DAO the ability to continually add to the veBAL holding.

1 Like