Yearn to Learn

Our world is composed of systems. Everything from biological systems, social systems, political, technological, financial, and so on and so forth. In order for any system to survive and thrive, it must evolve. DeFi moves at an alarmingly rapid pace and so demands equally rapid evolution. Protocols that fail to keep pace with the evolution of the DeFi system die. Our topic for today is a system that has not only managed to keep pace but to shape the course of DeFi evolution. We are talking about Yearn. 

Yield optimization is one technology that, by necessity, has continuously harmonized and grown alongside the ever-changing landscape of DeFi. 

But, what is the origin of this technology? Where did it all start? 

In this write-up, we shall explore the evolution of one of the pioneering pieces of Yield optimizing technology – The Yearn Finance Vault.

DeFi Pioneers

Exploding onto the scene in 2020, Yearn Finance caused ripples far and wide. The platform holds prestige in the DeFi world and traditional financial markets. Its token $YFI reached a market cap of over $ 1 billion faster than any other asset in history! Why? What does the platform offer? Yearn hosts an assortment of decentralized Finance products, with their most prestigious offering being their Vaults.

Breaking down the Vault

Yearn Vaults, or yVaults, are smart contracts that utilize different strategies to maximize the return of a pool of funds. They deploy your assets through the DeFi realm, capitalizing on the best opportunities. Yearn Vault pioneered the creation of automated, optimized yield generation. How do they work?

Pick it apart

After you deposit a selected token, you will receive “ytokens” these ytokens can be used to redeem your initial asset at any point, plus the denominated yield accrued. The vault deploys funds wherever yield is highest on protocols such as Aave, Curve, and Compound. Yearn’s strategies rely heavily on lending platforms. They regularly collateralize your tokens, borrow stablecoins, and implement these into other pools. 

Treasures within

One of the major players in Yearn’s strategies is Curve Finance. On Curve, stakers of certain Liquidity Pools receive rewards paid out in $CRV. The amount of tokens users receive can be increased via locking $CRV. 

Yearn capitalizes on this mechanic by indefinitely locking up a portion of the CRV that they accrue and distributing the rewards to various yVaults.

Show me show me

V1 vaults focused on a single strategy to optimize yield. Let’s break it down with this excellent Finematics illustration outlining the ETH v1 vault below:

1. ETH is deposited into the vault

2. DAI is borrowed on MakerDAO, using the ETH as collateral

3. DAI is then taken to Yearn’s DAI yVAULT 

4. This yVAULT sends the DAI to Curves stable Y pool

5. By providing liquidity to the Curve pool, CRV tokens are earned

6. Yearn locks some of these tokens in Curves guage

7. Extra CRV tokens are earned due to these locked tokens

8. Yearn periodically sells earned CRV for ETH

It’s all about the strategy 

These strategies are the blood and bones of the vault. So, where do they come from? Anybody is welcome to propose a yield-optimizing strategy! But, before implementation, strategies must withstand a rigorous vetting process to ensure the code is within risk parameters to operate. Many skilled developers have relished the opportunity to showcase their yield-generating knowledge while earning 10% of the performance fee.

A common misconception with liquidity pools (and vaults) is that all the assets are utilized. This is not the case, as a large portion of liquidity stays idle. For V1 vaults, if you wished to remove your funds from the pool and the amount you wanted to remove fell within the idle liquidity, you would not incur a fee. However, if funds fell within those implemented into the strategy, users would be charged a 0.5% fee.

It’s not easy

Yield optimization involves a rare level of technical prowess. Simply depositing all of a vault’s capital into one pool would be less efficient than a user staking directly. This is because an inflow of substantial capital dilutes your share of the pool and the yield you earn. Liquidity optimization requires constant tinkering and rebalancing to ensure effective capital management. Teams must constantly adapt to improve the underlying technology. So, how did Yearn evolve?

Evolution of the Vault

The next evolutionary stage of the vault was V2. Whoever created the phrase “less is more” must not have been a yield optimizer. Did that one strategy seem a little confusing? Well, V2 vaults employ 20 different strategies simultaneously! This allows the vault to exploit more diverse avenues for yield optimization. This also reduces the possibility of yield limits due to fund dilution. Each strategy has implemented a capital cap, with funds allocated to an alternative strategy once a cap is hit. V2 also removed the initial withdrawal fee.

Who’s in charge?

To further improve capital management, V2 allowed two actors to oversee the strategy performance of the vault. These actors are known as the “Guardian and Strategist.” In DeFi, you have to adapt fast; these two actors allow instantaneous response to cataclysmic situations by taking quick executive action to increase capital utilization and reduce the impact of crisis events. 

However, we as humans are sometimes not the sharpest tools in the shed; we are prone to make mistakes. If we compare ourselves to code, we are not the most efficient. So these two humans are aided by clever fault functions.

Two crucial functions that manage the vault are the harvest() and earn() calls. V2 vaults removed the need for human household tasks such as these and automated the process with Keep3r bots. These bots call the functions that sell the tokens earned via vault strategies and buy more collateral, simultaneously moving the profits back into the vaults. This automated approach via Keep3r bots reduces human workload and gas costs. The bots receive Keep3r tokens in return for the work. This collection of improvements has resulted in the V2 Vault and forged the infrastructure of the current Yield Optimising protocols we see today.

Look to the future

Yearn Vaults burst into the scene and fostered the DeFi world as we know it. It has evolved and adapted to the ever-changing markets and established itself as one of the critical pieces of DeFi infrastructure we have today. The Vault has also nurtured the creation of a new cohort of promising Yield Optimizing protocols, all of which compete to provide you with optimal rewards. Protocols such as Reaper, Pickle, Beefy, and Alpaca Finance have blossomed in the new field of automated yield generation. Evolution never ceases. This means devs stay busy building rich, automated yield generation options for you.

What will be next in DeFi’s Yield optimizing evolution?

This article was written by DefiNaly, follow him on twitter! If you have any feedback for this article, join us on Discord!

Scroll to Top