Aave's platform change, from V1 to V2

I believe you all know that Idle.finance currently invests in Compound, dYdX and Aave platforms. In this proposal I want to talk about Aave, because on October 3, 2020 Aave brought the new version of its platform, V2, to the mainnet.

You can read the news about V2 in this post by Stani Kulechov:

At this link you can find the V2 Protocol Whitepaper:

I also remember that Aave plans to incentivize Liquidity Providers by distributing its $AAVE token, how we can read in is Aavenomic document.

This means that Idle will then be able to farming Aave’s governance token too.

As the Aave V2 will gradually become the main platform, I ask the governance to discuss whether it is appropriate to start thinking about moving investments from the current V1 to the new V2.

Currently the market size of the two platforms is:

  • Aave V1 Current market size $ 2,114,389,841.31
  • Aave V2 Current market size $    183,827,473.16

As you can see, at the time of writing, the market size of the V1 is still significantly higher than the V2.


I propose to keep the market size under control and in the meantime decide whether to switch to V2 and, if so, how it can happen. If we need to create a new smart contracts or just change some parameters of the current ones.

6 Likes

Thanks for bringing this up. From a technical perspective what is needed is basically one wrapper contract for Aave v2 similar to the current one used for aave v1 idle-contracts/IdleAave.sol at develop · Idle-Labs/idle-contracts · GitHub then a couple of methods should be called on the main IdleToken contract (for all idleTokens) to update some addresses, I can detail the methods needed for this to make it easier.

Also, potentially both aave v1 and aave v2 can be used together at the same time alongside the other lending protocols

4 Likes

Yes , the strategy should choose between aave v1 and v2 as the interest rates vary between the two. So v2 should not replace v1 but should be offered in tandem with v1 until v1 is deprecated by aave.

5 Likes

Liquidity should migrate from v1 to v2.
So wouldn’t it be best to just support v2 instead of supporting both?
Would make the code simpler and potentially avoid bugs.

Note that these migrations can take months and, to my knowledge, Aave has yet to release migration UI. At the moment, liquidity in v2 is relatively thin (10% of v1 or less?).

3 Likes

Yes, I think it is the right choice at the moment, to use both pools, at least until V2 is higher in liquidity.

2 Likes

Aave V1 still holds 2.4B, while V2 is managing only 300M (weighting 12.5% of the old pool).
Yields are not competitive yet in V2: DAI 4.2% vs 6.3%, USDC 4.8% vs 7.6%, USDT 3.5% vs 17.3%.

We can assume that a transition period is required. At the current rates it could be quite long, but Aave Governance might vote on incentives ($AAVE liquidity mining) to increase the profitability. Therefore, I suggest to hold both V1 and V2 until the migration is completed, and use the Idle’s Dynamic Allocation Mechanism to pick the best yield.

2 Likes

Thanks for the detailed explanation, I thought most of the liquidity moved to v2 but apparently it’s gonna take some time. Supporting both for now is the best choice.

5 Likes

FYI, Aave Protocol V1 -> V2 migration tool and transition plan - Governance - Aave

1 Like

Seems that the migration is mandatory and should happen in at most 2 months before the deposits get paused to my understanding. I think we should start to dive more into this

2 Likes

Blockquote
The idea behind this migration schedule is to progressively lower the borrow demand in V1 in order to replenish the stablecoins reserves. This way integrators like Curve/Yearn/idle/mstable and others will have the possibility to migrate their liquidity to the new version of the protocol.
The whole migration process should be relatively short to bring Aave V2 to full operation as soon as possible. The team believes that a period of two weeks for each phase (which includes 3 days of voting + 1 day timelock) should conclude the migration in approximately two months, which is a reasonable amount of time for users and integrators to properly act.

Yes, looks like that. And they talk about integrators like Idle also.
In the Phase 1 is sSUD, in Phase 2 others big stablcoins. Maybe need to create quickly the wrapped contract for Aave V2.

2 Likes

Yes it needs to be done before the deposits get paused so before phase 3 is finalized. I think that we can already start drafting what needs to be done:

  • Create Aave v2 adapter similar to the current one used for aave v1 idle-contracts/IdleAave.sol at develop · Idle-Labs/idle-contracts · GitHub
  • In the proposal call setAllAvailableTokensAndWrappers for all idleTokens (9 calls) with both aave v1 and aave v2 adapters and in the allocations param remove everything from aave v1 and move it
    to aave v2 (need to check this but should work)
  • Potentially in a separate proposal (due to the 10 actions limit per proposal), after the rebalance to aave v2 succeded, we can also call setAllAvailableTokensAndWrappers once more to remove aave V1 references (ie the adapter) completely to save some gas

Need some tests for sure to see if the upgrade works as expected

4 Likes