Angle Folding Strategy: A deep-dive

Angle
Angle Protocol
Published in
5 min readApr 5, 2022

Angle is a robust decentralized stablecoin protocol that puts special efforts to remain at the frontier of innovation. We always try to keep expanding what is already available in DeFi through in-depth research and exploration. Today, we introduce a new yield strategy designed to greatly improve over similar folding strategies used by others!

Let’s dive deep into Angle folding strategy

Angle invests a significant share of its capital into yield strategies, allowing it to grow reserves in case of emergency and to offer a revenue to its Standard Liquidity Providers and to veANGLE holders. As such, achieving higher yields is one of the easiest way to increase value for the protocol’s stakeholders.

This article presents the new strategy proposed by Angle on Aave V2 on Ethereum mainnet and explains how it improves over alternatives 👇

Angle Improvement

Folding strategies are already pretty common in DeFi. They were originally developed by the Yearn team, and are now widely used in lending market such as Aave, Compound or Euler. The idea behind folding is to lend capital, borrow from it and then re-supply the borrowed assets in order to profit from governance tokens rewards which can offsetting the borrowing cost.

Almost all the time, folding strategies in DeFi are simply targetting a specific leverage for which teams are confident enough, and know they can make an additional profit. This however does not guarantee a profit in all cases, can be sub-optimal and most of all requires human intervention and monitoring.

In our case, we noticed that it was possible automate the approach by computing on-chain the optimal quantity of assets to borrow and re-supply to maximize the yield obtained.

How to compute this optimal quantity? We optimize the function that gives the yield depending on how much assets are borrowed by the strategy, the supply and borrowing rates as well as the governance token incentives

While this function does not have closed-form optimum, we found with the Newton-Raphson method a cheap and easy way to do this on-chain.

We decided to implement this improvement on top of Yearn StrategicGenLevAave-FlashMint strategy, hence making Angle folding strategy more efficient and autonomous than this alternative.

We took some time to test our approximation, and implement it in the most gas-efficient way possible. Angle implementation like Yearn also relies on DAI flash loans to reduce the quantity of (borrowing, lending) operations.

From our extensive simulations in mainnet fork, we expect that this strategy could almost double the yield the protocol generates on its reserves, increasing revenue both for USDC and DAI Standard Liquidity Providers but also for veANGLE holders.

This strategy also comes up with an off-chain bot designed to harvest the strategy each time the optimal borrowing amount changes significantly and a profitable opportunity cost arises.

While given recent market conditions, this strategy should most of the time borrow assets, if there’s no profitable opportunity to do so, the strategy just lends collateral to Aave, and hence Pareto-improves over basic lending strategies, like what Angle currently has.

Overall, we hope to have coded a reference folding strategy that others can rely on in the future.

Release

A governance vote is now live to launch this strategy. If accepted positively, the strategy will be deployed in prod in the coming days, and its code open-sourced short after.

We will make sure to limit the quantity of capital from the protocol allocated to this strategy in the beginning, and start increasing this limit progressively as it will have made its proofs.

If you are interested in talking about this with us, feel free to jump in our Discord!

If you want to learn more about strategies and what folding is, keep reading 🔍

What is a Folding Strategy?

The most basic strategies compare yield on different lending markets, and share their funds between those to capture the highest yield. If we take the example of a simple strategy comparing yield between Aave and Compound like the one we currently have at Angle, it will split its funds between the two platforms so that it can earn the highest yield.

Now, a folding strategy goes a little bit further. As you might know, some lending markets incentivize deposits and borrowings with their governance tokens. Thanks to that, the yield to borrow and supply the same quantity of an asset can be positive. This will depend on the total quantity of assets supplied and borrowed, and on the price of the governance token distributed. This is possible only when funds usable as collateral are already deposited in the protocol in question, allowing one to borrow and deposit on top of this original deposit.

Example

Let’s take a look at Aave for an example.

Aave is distibuting stkAAVE to users supplying and borrowing specific assets. In the above screenshot, we quickly note that, by taking into account the stkAAVE rewards, borrowing & supplying a same quantity of DAI can increase effective APY. The condition is that:

In the situation of the above screenshot, we have:

Here, we can generate an additional 0.75% APY by borrowing and supplying an equal amount of DAI. However, you will have noted that when supplying or borrowing significant amount of assets, the lending/borrowing rates change. Because of that, folding strategies should take into account their impact on the overall yield.

Contrary to other versions, not only does Angle implementation estimate its yield impact but it also finds on-chain the specific amount to borrow and re-supply to maximize its return.

We are therefore confident in the fact that this strategy will increase yield for Angle stakeholders and potentially help other protocols improve their strategies as well!

Join Us 📐!

Twitter | Discord | Docs | App | Github

--

--

Angle
Angle Protocol

Angle is the first over-collateralized, decentralized and capital-efficient stablecoin protocol