Watched a bunch of videos but still don’t get Yearn Finance?
You have come to the right place my friend.
I will walk through what Yearn Finance does and how it works step by step.
Read on for an in-depth, but simple, explanation without any of the tech or crypto jargon.
1. What is Yearn Finance in a nutshell?
Yearn finance is a tool that anyone can use to automate their investment allocation to a crypto savings scheme with the highest interest rate.
First, let’s understand how one can earn interest in the crypto space
2. The emergence of DeFi and yield opportunities
Remember, Ethereum introduced smart contract functionality which meant that anyone could come along write some stand alone rules and logic.
Coding up projects no longer required the presence of a central entity since all transactions are validated on Ethereum.
This spawned the decentralized finance (DeFi) era: apps that operated on their own without the need for a central intermediary such as a bank or insurance company.
Many protocols now became available for anyone to invest in in return for a reward.
Two main yield strategies emerged
Crypto yield strategies
1. DeFi lending and borrowing
Some of the first protocols to emerge after the creation of the Ethereum network were lending and borrowing protocols such as Compound and Aave.
Many more emerged over time. I would strongly encourage you to read my article on how Compound works in order to understand these types of products in more detail.
In essence though, on protocols like Compound, you can deposit stablecoins and other crypto.
Your money then gets lent to others in exchange for which you receive interest. Similarly, you can put up crypto assets as collateral to take out a loan on which you pay interest.
So this type of DeFi protocol is replicating what a bank does.
2. Liquidity pool fees
The second type of DeFi business to emerge were decentralized exchanges such Uniswap, Sushiswap etc.
These exchanges adopted a unique way of automating transactions. Instead of matching buyers and sellers they instead offered pools of tokens.
Say you want to exchange ETH for BTC. The exchange already holds some BTC and ETH. You can easily exchange one for the other directly from the pool.
Where did the exchange get the pooled ETH and BTC? Why from the market.
You and I can buy some ETH and some BTC and give it to Uniswap to place into its liquidity pool in exchange for which we will receive a transaction fee each time a trade is made.
I’m simplifying, but you get the picture
So to summarize: if you have a lump sum that you want to invest in crypto you can either
- buy a coin and hope it appreciates in value or
- Invest a coin into a lending protocol to earn interest or
- buy two coins and place them in a liquidity pool where again you earn a yield through transaction fees
3. Back to what is Yearn Finance
When Andre Cronje first developed Yearn he was scratching his own itch at a problem he was facing.
Being somewhat conservative he did not particularly want to invest in the crypto space by speculating on the price appreciation of cryptocurrencies.
Instead, he decided to convert his money into stablecoins and sought to earn a yield on them.
A stable-whatie? What is a stable coin?
For the newbies here, a stablecoin is digital form of fiat currency, usually the US dollar, that lives on a blockchain.
The largest stablecoins such as USDT and USDC are backed by the same amount of real US dollars.
Why have a stablecoin?
Well for the same reason that Andre Cronje needed them.
People want to participate in the crypto space without taking on too much risk.
How do I maximize yield?
So Andre is busy investing his stablecoins into yield generating protocols such as Compound, dYdX etc.
Soon he finds himself waking up every morning to check which protocol offers the highest interest rate.
He ends up moving funds around quite frequently which costs him in transaction fees.
This is just the kind of thing that programmers can’t stand: doing repetitive tasks that take up valuable time and are wasteful.
So what does he do?
He starts writing code to solve his own problem of optimizing the yield he can get on his stablecoins. And this is how Yearn (which stands for you-earn, originally called i-earn), was born.
Written in Solidity code which is the coding language of the Ethereum network, Andre’s smart contracts would compare systems and tell him where to send his funds.
As he opened up the protocol to others, transaction fees, known as gas fees on Ethereum, also dropped as these were shared across investors.
4. How does Yearn finance work?
Say there is a bunch of the stablecoin DAI, which is pegged to the USD. 1 DAI = 1 USD. Yearn uses an internal oracle to identify where the higher APR is.
Ermmm what’s that oracle thingie again?
An oracle is just a feed of external inputs.
In Yearn’s case it is the output from the code that Andre wrote to pull data from different providers.
He normalized the data to make it easy to compare interest rates across different investment schemes.
Back to how Yearn works
So say Yearn takes the DAI and deposits them on Aave.
When the next depositor comes along, Yearn sees that Compound offers higher rewards. So the algorithm withdraws funds from Aave and deposits the DAI on Compound.
Yearn optimizes yield every time there is a deposit or withdrawal.
Yearn will only operate in the currency that you deposited.
So if you deposit DAI and there is some great opportunity to earn a higher yield in another stablecoin such as USDC, Yearn will not convert your DAI into USDC and will not take advantage of that opportunity.
It assumes that if you invest in DAI you want to remain in DAI.
BTW if you are curious about wether to invest in DAI check out my deep-dive on whether DAI crypto is a good investment.
Voila! The Yearn protocol was a very simple way to optimise yield.
5. How does Yearn technically work though?
I am going to introduce a common DeFi concept to you that will help you understand the mechanics of the Yearn software.
Across DeFi, whenever you deposit a cryptocurrency into a protocol, you get an equivalent amount of protocol tokens as a receipt in return.
So, for example, when I deposit DAI into Yearn, Yearn issues me yDAI.
Similarly, if you deposited some token on Compound you would get cTokens, on AAVE aTokens and so on.
This makes it easier for the smart contracts to keep account of what is going on.
Now, note that the protocol token exchange rate does not remain the same.
Rather, the protocol token increases in value to reflect the addition of interest. For example, on Compound you might deposit 1 DAI and get 1 cDAI.
Say the interest rate is 10% per week (random number). After one week your 1 cDAI is worth 1.1 DAI. The exchange rate has changed from 1 cDAI= 1 DAI to 1 cDAI =1.1 DAI.
Now let’s review what happens technically when you invest DAI in Yearn
Yearn takes your DAI and issues you yDAI.
It then takes your DAI and deposits them on Aave.
In return Yearn gets aDAI. Remember, these are like a receipt from Aave but they change in value to reflect interest accrual.
This is just the mechanics of how Aave works.
When the next depositor comes along, Yearn sees that Compound offers higher rewards.
So the algorithm withdraws funds from Aave, returns the aDAI and gets back DAI plus any interest.
It subsequently deposits the DAI on Compound in return for cDAI. And so on.
With me so far? Good! Now pay attention:
6. What is Yearn Finance v2?
Over time Yearn grew so much in scale that its movement affected interest rates.
Since interest rates are subject to demand and supply conditions and because Yearn was so large, its decision of where to move funds would affect the interest rate.
So Andre needed to estimate not only where the highest yield was but also how that yield would change once he moved funds into that protocol.
Yearn Finance V2 had to take into account various factors such as how liquid the protocol was before investing, how long it had been around, whether the founders were known or anonymous, had they received VC funding and so on.
However, things became even more complicated as the industry evolved.
First, you need to understand something else about DeFi.
The Compound innovation that changed DeFi
Compound was one of the first lending and borrowing protocols in DeFi.
You could provide cryptocurrencies to lend to others or as collateral to borrow.
So far this was similar to a bank lending out savers’ deposits. Except that Compound introduced a crazy innovation which every DeFi project copied after.
Tell us! What did they do oh wise one?
Compound created a COMP governance token that it distributed to borrowers and lenders.
You can use COMP for voting on decisions affecting Compound. So when you lend your DAI you earn interest but you also earn COMP on top of that.
Being a governance token COMP has real value and can be exchanged for more DAI if you want to.
What’s even crazier is that borrowers also get COMP. Some of the early borrowers got so much COMP that they were effectively paid to borrow.
How is this relevant to Yearn?
The introduction of governance tokens as a reward across protocols was an added factor that made it harder for Yearn v1 to estimate the actual real return.
In seeking to minimize risk Yearn decided to crowdsource strategies that would minimize risk while maximizing returns.
These groups of strategies became known as Yearn vaults.
7. The emergence of Yearn Vaults
As complexity grew around DeFi, Yearn sought a way to simplify things for the average investor.
If you were an expert analyst and understood DeFi well then you could move your money around in innovative ways to maximize yield.
If you follow crypto on Twitter you will have come across tweets like the one below:
If you are like me you probably scratching your head and reading and re-reading these type of posts. Then you get stressed trying to figure out what this guy is saying and what you are missing out on.
Yearn Vaults explained
Yearn Vaults are somewhat akin to mutual funds.
Instead of trying to implement complicated strategies on your own, you let someone else design a strategy and manage the funds for you.
In this case, code executes the strategy but it is people who designed it.
Any geek who studies DeFi all day and night can come along and propose a Vault strategy.
This person then earns a fee for doing so. Strategists, as they are known, present their proposal which is reviewed by peers.
Once approved the vault goes through a testing period with a cap on the deposits it can accept.
A committee then needs to approve the final product: they do an investigation into who are the brains behind the strategy, check the audits and so on.
It then goes through Yearn’s multisig process to get approved.
Yearn Finance Vaults can follow more than one strategy
They usually contain a combination of the following:
- Earning interest by lending out stablecoins on a protocol such as Aave.
- Generate liquidity pool fees by providing liquidity to an Automated Market Maker, as described previously.
- Earning protocol tokens like COMP when providing liquidity and selling these for stablecoins.
- Putting up the funds in the vault as collateral and borrowing stablecoins to re-invest in the above.
Vaults are designed to be low-risk. Or at least low-risk comparatively in DeFi terms. But I am sure that you can see that all of the above entail some risk.
Risk becomes hard to quantify especially with some of the larger vaults that can have knock-on effects on the crypto ecosystem as a whole.
For example, one of the largest vaults holds ETH and is thought to be one of the drivers of ETH as it removes selling pressure from ETH: If ETH is stuck in a vault then no one is selling.
Anyways… good luck figuring out how much risk you are actually taking on.
The only thing you can hope for is that, since the code is open for everyone to see, there are highly enthusiastic analytical people out there who are scrutinizing it and would shout out if they saw something wrong.
That is a big assumption to make.
As you can see below, most people are probably blindly trusting the vault without understanding what it does
Andre Cronje himself had often given out respective warnings highlighting that you need to understand what is going on before you invest.
8. Yearn Finance vault example
The second largest Vault on Yearn contains about $400Mn in ETH.
Now, remember that Yearn uses the Ethereum network and only uses Ethereum network compatible coins.
These are called ERC-20.
The thing is that Ethereum itself is not ERC-20. So there is a mechanism to convert it called wrapped ETH. 1 wETH=1 ETH.
So technically the vault contains wETH. But that is just a technical detour. For our purposes, you can think of wrapped ETH and ETH as being the same thing.
Strategy 1: Liquidity provision to Curve
Supplies wETH to Curve Finance which is a decentralized exchange for stablecoins.
Curve rewards liquidity providers with CRV tokens which the strategy sells for more wETH which it deposits back into the strategy.
Strategy 2: ETH Staking
Stakes wETH on Lido.fi, a staking platform for ETH 2.0, which accumulates ETH 2.0 staking rewards.
As you know Ethereum is transitioning from a proof-of-work consensus mechanisms to proof-of-stake.
If you don’t understand that sentence then you would need to read my article explaining Ethereum. Lido is a platform that helps users stake their ETH.
Strategy 3: Liquidity provision to Balancer
Balancer is another exchange that Yearn often integrates with.
The strategy supplies wETH to Balancer in return for BAL tokens and trading fees.
These get sold for more wETH which are re-deposited back into the strategy.
Strategy 4: Liquidity provision Tokemak
Supplies wETH to Tokemak, another decentralized exchange, in return for TOKE tokens.
Again, the strategy sells these for more wETH.
This ETH vault was pretty straightforward to understand.
Things can get way more complicated.
Like I said before, you could have a strategy that takes the ETH and deposits them on MakerDAO to take out a loan in DAI and reinvest it in various liquidity pools.
9. Yearn’s special relationship with Curve
Curve is a decentralized exchange for stablecoins.
Here you can swap USDT for DAI for USDC for TUSD and possibly others. Curve offers these trades at low transaction fees.
As a liquidity provider you can provide them with your stablecoins and they will reward you in return.
Yearn has partnered with Curve to offer a liquidity pool on Curve where it is easy to convert between yDAI, yUSDC, yUSDT and yTUSD.
There are two reasons why you might benefit from this
- Staying with the DAI example. Once you get your yDAI you may decide to switch strategies and follow a yUSDC strategy. So you can easily exchange the two on Curve
- You may invest your yDAI into the curve pool to earn rewards as a liquidity provider
The yUSD Vault
The yUSD vault invests your yDAI into the curve liquidity pool.
As a result, you earn transaction fees from all the people swapping the y tokens. But the pool also rewards you in CRV which is the protocol’s token.
The vault strategy sells CRV in return for more yUSD.
10. Yearn Finance Governance
Yearn had a fair launch. This means that no governance tokens were pre-allocated to founders or investors before hand.
No whitepaper or site was created to create a buzz.
Andre Cronje distributed 30K YFI (pronounced why-fee) tokens to users of Yearn at the time. Most admirably, he did not keep any tokens for himself.
This means that Yearn is completely in the hands of the community and is a truly decentralized project. Some people joke saying “he pulled a Satoshi”.
It’s fascinating to think that there is this thing sitting on the internet without a central intermediary.
In fact, it is somewhat akin to a cooperative with YFI token holders voting on any decisions affecting the protocol.
Mindblowingly enough, there are no bosses.
Yearn generates its own fees in order to cover expenses such as audits and server expenses.
They do not plan to issue further YFI tokens which has resulted in a relatively high price per token.
Today it stands at $18K.
Once expenses are covered any remainder goes to the token holders.
11. Yearn Finance mergers and future steps
What is even more fascinating is that over time Yearn has merged with other exchanges and protocols such as C.R.E.A.M finance, Sushiswap, Pickle, Akropolis and Cover.
It is again fascinating to see that this involves no legal papers but rather a vote by the governance token holders of both platforms.
These mergers are essentially tech merges.
There is no paperwork in place for this to happen.
Yearn has already launched on Fantom, a competitive blockchain to Ethereum.
They plan to continue launching on other chains as well.
12. Andre’s exit from Yearn Finance
For Andre, Yearn became too popular too fast.
Instead of purely writing code, which he loved, he found himself having to manage expectations on social media where not everyone was kind and understanding.
People were investing in anything crypto with an expectation that price would go up and if it didn’t they felt they were owed and made it known via rude comments and complaints.
Andre also needed to jump in to help steer governance.
From introverted computer geek he found himself playing the role of crypto politician.
Yearn also stands out in that it not seek any VC funding. There was no one to tie off all the ends before the release.
People flooded what was essentially a one-man-show with capital.
While Andre put out a lot of warnings that they should not just blindly invest in some sleep-deprived developer’s code (as he referred to himself), they did just that.
After turning in the keys to the community, Andre involved himself in many other crypto projects.
He helped turn around another layer 1 blockchain called Fantom and most recently was planning to launch a new project somewhat akin to Olympus DAO.
However, in early March, Andre and his parter Anton Nell called it quits. He was exhausted and disillusioned. Enough was enough.
In an earlier post he had written a two part medium article titled “building in DeFi sucks“.
He could not handle the criticism he received for not driving crazy APYs.
In a podcast about Yearn Cronje mentions that there were also periods that were great because it was super exciting to be building components that will replace the financial system.
13. Closing remarks on Yearn Finance
All in all, Yearn is a simple tool to maximize yields.
It allows anyone to use sophisticated yield generation strategies without having to design them or do the manual work and pay for high transaction fees themselves.
As of March 2022 rates are not as high as they used to be when Yearn started off. In the early days before mass adoption and during the crypto bull run it was easy to find rates of 60-90%. Today they hover between 1-10% .
Andre Cronje may have left the space but that should not matter for Yearn since the community now maintains the project.
Now that you have understood Yearn, you may want to tackle something a little more complex in DeFi and learn about Olympus DAO and how it heralds the era of DeFi 2.0
Thanks for reading. Please share to spread the knowledge!