AIP - 43: Improve Angle yield strategies for USDC and DAI

This is a proposal to improve the current functioning of Angle strategies for USDC and DAI.

Context

Angle has reserves in USDC, DAI and FRAX which are invested in yield strategies. Yield from these yield strategies is then distributed to SLPs, to veANGLE holders and a portion goes into the protocol reserves.

So far, as described in the docs, Angle yield strategies consist in lending to Aave, Compound (and Euler for DAI) and the funds go to the lending venue that that has the highest APR. This strategy however is inefficient, and better can be done.

Imagine having to allocate funds to a basket of 3 strategies yielding an APR. In DeFi usually, the more you lend to a place the lower your APR. And so instead of lending [0,0,100] to 3 protocols, you may very often be better off lending like [0,30,70] or like [10,30,60] to optimize the global APR you’re getting.
Lending everything on Euler may give you more than lending everything on Compound or on Aave, but you may be better off not lending everything you can on Euler, and instead allocating some funds to Aave and Compound.

This kind of optimization is tricky to do on-chain. This requires complex math problems to solve, which depending on how the protocols are coded do not even always have closed forms off-chain.

The good solution to take advantage of this is to have a strategy that can take suggestions from the people harvesting it when it comes to the new allocation of funds between the different lending venues. Yet, doing this without any check in a full permissionless setting is not ideal.
On the one hand, an adverse player could tell the strategy to invest all its funds to a venue with little to no yield thus harming the protocol revenues.

On the other hand, making strategy harvests permissioned is not ideal as well. You need to trust the bot (or the address) harvesting the strategy for being always up, for not being hacked or for working efficiently at all times.

Proposal

The proposal is to amend the OptimizerAPR yield strategy in the following way: anyone can harvest the strategy and suggest an allocation of funds to the different underlying venues, and before moving the funds, the strategy checks on chain if the proposed allocation is effectively better than the current allocation.
If it is better, the strategy moves to the new allocation, if not, the strategy stays in the same state and just invests its idle funds in the highest yielding lending venue.

Implementation

The advantage of this change is that it requires very little changes to the existing strategy engine of the protocol (this contract in particular). And so rather than deploying new contracts, it just requires upgrading the following contracts:

  • OptimizerAPRStrategy: for both DAI and USDC
  • GenericLender for Aave, Compound and Euler for DAI and USDC. On Euler, we propose to take advantage of the staking facility to earn an additional yield made up of EUL tokens.

Value to the protocol

In normal conditions, if no one runs a bot, this should have absolutely no effect on the lending yield the protocol makes. However, with appropriate bots running optimizations on top and harvesting pretty regularly the strategies, it’d be possible to increase the lending revenues of the protocol by up to 50%, thus further increasing SLP and veANGLE revenues.

3 Likes