curve defi yearn yearn finance yfi

A Closer Look - What is Yearn Finance and YFI?

Written By Ivan on Tech

Aug 18, 2020

The past week has seen Yearn Finance, more commonly known as yEarn Finance or yearn.finance, become increasingly well-known following a massive price rally. Specifically, Yearn Finance’s YFI token has surged over 300% in the past week. As such, many are beginning to ask the question “what is yearn.finance”. The platform recently rose to fame after the launch of its tokenized insurance product yInsure Finance, however the following article takes a look at the fundamentals that led to the creation of the entire yEarn Finance platform.

Andre Cronje single-handedly developed yearn.finance (yEarn), a yield aggregating platform on Ethereum. yEarn has grown into an ecosystem of protocols that aims to maximize annual percentage yields (APY) for its users. It plays a part in the yield farming mania that kicked off with Compound’s COMP token distribution. yEarn utilizes DeFi protocols such as Curve, Compound, Aave, and dYdX to optimize token lending. In a nutshell, it is a sophisticated protocol that diverts liquidity to different sectors of the DeFi universe to find the best returns.

yEarn is probably best known for its yPool on Curve. When a user deposits tokens they are converted to “yield optimized tokens” (yTokens) such as yUSDC, yUSDT, and yDAI. This allows the user to earn not only the usual lending fees but also the trading fees off of Curve. yEarn routes liquidity to different sectors across the DeFi space and yPools have earned some of the best lending rates in 2020. 

yEarn has earned praise for being one of the most decentralized projects in crypto. It’s also been called the “Bitcoin of DeFi” for the high APY seen by its early adopters. 

History of yearn.finance

Yearn Finance founder Andre Cronje could serve as an inspiration to many looking to make their mark in crypto. Specifically, he chose to opt out of a law degree to instead focus on computer science. He then finished a computer science program in just six months and went to work in FinTech. Distributed ledger technology captured his imagination and then he found cryptocurrencies. Later, he became fascinated with DeFi and the potential yields that could be gained with stablecoins.

Andre Cronje

Cronje became an influencer in the DeFi space and earned respect for his code reviews before he founded yEarn. It was his obsession with dissecting the code of other platforms that helped him finalize his own. During his exploration phase, he became convinced that DeFi was too complicated for the average user. He then decided to focus on two aspects of his project to help rectify this problem—user experience and safety.

Early Versions of yearn.finance

The first iteration of yEarn started as a result of Cronje handling money for friends and family. He wanted to find a way to put stablecoins to work for a profit. At the time there was Aave, Fulcrum, Compound, and dYdX. As such, Cronje would manually check these protocols to see which was offering the best annual percentage return (APR). 

Manually moving tokens around and paying gas fees all the time soon wearied him. So he coded some smart contracts that would do the figuring for him. He then wrote the iterations for the yTokens. The yTokens could read the normalized APR output and move to the place offering the best returns. 

He used this system for himself first but then opened it up to others. After all, the more people that used the protocol the better. That’s because each time a user interacted, the smart contracts checked to see if a rebalance was necessary. The higher the frequency of interactions the more shifts between protocols occurred. And the more shifts the higher the returns. 

So, yEarn got better returns in aggregate than any of its downstream sources standalone. Cronje's concept was simple - just send more capital to the place with the highest returns. Gas fees had to be taken into account, however, because they accrued whenever the tokens moved. 

How yTokens Work

Think of yTokens as a pool. As mentioned, whenever a user deposits or withdraws funds from this pool, the smart contract checks the APR. It operates like an oracle but not exactly. Cronje explains it like this, “Oracles check off-chain, while this does not. Everything is on-chain.” 

While he does not refer to yTokens as oracles in the traditional sense, he nonetheless refers to them as “APR Oracles.” They normalize on-chain information like a robot seeking the highest yield. And it’s all automated with smart contracts to move funds where they need to be. 

Let’s say there is a DAI pool. When a user deposits more DAI, the smart contract asks the APR Oracle where the highest APR is. If the APR oracle says its Aave, it moves the DAI tokens to Aave. So the user can sit back and earn interest on Aave. 

Now, let’s say another depositor comes in with DAI. The smart contract checks the APR oracle and this time, it finds that the best rate is on Compound. So it withdraws the DAI from Aave, returns the aTokens to Aave, and deposits the DAI into Compound. Now the user has Compound cTokens. 

So, each time a user interacts, the APR oracle asks where the funds should go for the best rate. 

Calculating Risk with yearn.finance

In the early version of yEarn, the protocol could not quantify risk, it just went to the protocol with the highest rate. But questions still needed to be asked like, how liquid is the downstream source? And how will the pool be affected upon moving? 

In the early days moving $10k to a downstream protocol would have little effect on the APR. But these days with yEarn’s growing popularity, shuffling around millions of dollars to various protocols can have profound effects. APRs can drop quickly (like from a 10% return to 5%) when large amounts of money are transferred. So the smart contract not only has to assess liquidity so it can quickly move tokens when necessary. But it also has to assess what will happen to the APR when large amounts of capital are dumped into a protocol.  

The yearn.finance Ecosystem 

Yearn.finance, or yEarn, as it’s also called, is an entire ecosystem composed not only of yearn.finance, but which also includes ytrade.finance, yliquidate.finance, iborrow.finance, and yswap.exchange. Yearn.finance is the focus of this article but you can dig deeper into the others on their website

yEarn supports DAI, USDC, USDT, TUSD, and sUSD stablecoins. Those new to DeFi might perceive yEarn to be a complex protocol. And due to the lack of documentation on the project, this might serve to add an element of mystery. But the concept is quite simple. yEarn moves the supported stablecoins between Compound, Aave, dYdX, and Curve depending on which asset pool is offering the highest yield. 

The purpose of using Curve is to increase rewards in yEarn tokens. So when a user deposits DAI they receive yDAI in return. They can then supply yDAI to Curve to earn trading fees in addition to yield rewards. The protocol takes a small cut that is only available to YFI token holders.

To try it out, just go to yearn.finance/zap and deposit at least one of these tokens and they will start earning interest. This product is still in beta, so always start with small amounts until you know what you’re doing. 

The YFI Governance Token

YFI is an ERC-20 token that governs the yearn.finance ecosystem. The protocol distributes YFI to liquidity providers (LPs) who supply certain yTokens. The goal was to have YFI used for voting and not as a means of exchange. 

Cronje has stressed multiple times that the YFI token is valueless and that it wouldn’t be traded on any exchanges. However, reverse psychology seems to be in effect because at $6,824 (at the time of writing) it’s in second place to Bitcoin and far from valueless. Currently, users can trade YFI on both Binance and Uniswap. When Binance debuted it, YFI quickly rocketed 50% in value. And the price jumped 4,000% when Uniswap listed it. The market has fervently disagreed with its zero valuation and YFI’s success has since spawned copycats. 

But Cronje believes the stronger supporters are the people who use the protocol. He has always recommended that people earn the YFI token by using the protocol instead of buying it off an exchange. Investors have decided to buy it anyway banking on future revenue from the protocol.

YFI Total Value Locked

Cronje believes that a conflict exists between the token’s purpose and the investor’s valuation. In terms of TVL, DeFi Pulse has yearn.finance listed at $579 million (at the time of this writing). TVL is where investors typically start when scrutinizing a project in DeFi.  

YFI hodlers can vote on issues regarding all the protocols in the yearn.finance ecosystem. There was no ICO on launch. And if you’re interested, you can earn YFI by providing liquidity to yEarn’s ecosystem. Or you can purchase YFI on Binance or Uniswap. The max supply of YFI tokens is 30,000.

YFI governance can be tricky to figure out as the details are spread out over a series of posts on Medium. But essentially, the system can be summarized as 1 YFI token equals one vote.  

How to Earn YFI

Things can always change with future governance, but one of the most popular ways to earn YFI is through the yCurve pool. LPs who supply yTokens to the yPool in Curve Finance, receive yCRV tokens in exchange. yCRV can then be deposited into the yGov pool back at yEarn. There is a guide on Curve if you’re interested. 

Another way is to deposit a mix of DAI and YFI into the Balancer protocol where LPs receive BAL tokens in exchange. By depositing BAL into the yGov pool it can be exchanged for YFI.

Users can also deposit a mix of YFI and yCRV into Balancer in exchange for the Balancer Pool Token (BPT). They can then deposit BPT into yGov for YFI tokens. This process is similar to staking crypto in exchange for block rewards. Except they are staking Curve and Balancer tokens in yEarn in exchange for YFI and governance rights.

The Future of yearn.finance

When Cronje said DeFi has become too complicated for the average person, he was right. Anyone who can simplify the process and provide a better user experience stands a better chance at gaining mass adoption. And while any Yield Farming strategy involves a high level of risk, yEarn has provided some nice returns this year with relatively limited risk. Albeit, whenever a user makes a play on yGov with BPT tokens, layers of derivatives are activated beneath the underlying asset. That means that anything can go wrong with just one link in that chain which makes it hard to call it a low-risk strategy.

While Cronje is the only developer, a community has grown up around yEarn. And their commitment to community governance is stellar. YFI is a strongly designed and highly desired token. Changes to the protocol are done via on-chain proposals and voting. 

The savvy DeFi user can get rewards. And at the time of this writing YFI is right behind Bitcoin in terms of price per coin. The price of YFI might be a result of TVL locked in the protocol, or as Cronje said, just simply the token’s purpose vs. the investor’s valuation. Investors have ignored the pinned tweet at yearn.finance’s Twitter account that reads, “The token is to manage the platform. If you aren’t interested in managing the platform, stay away from the token.”

Again, is reverse psychology at play here? 

A Real Education in DeFi

Every time you turn around it seems another ground-breaking project is underway in DeFi. And who knows which protocols will be left standing after the Yield Farming mania runs its course? But yEarn is an important player particularly as aggregate liquidity heats up. Cronje believes that yield farming is a fad and he claims that the price of YFI is irrelevant to him since it doesn’t change how the system operates. 

Whether or not that’s true, Andre Cronje is a motivating individual. His story is a testimony of what can be accomplished in a short time when one is passionate about their subject. He proved that one does not need to spend four years spinning their wheels in college before something as cool as a yield optimizer can be invented. 

If you’re ready to expedite your learning process and start mastering blockchain fundamentals, be sure to visit Ivan On Tech Academy. There’s no point in wasting hours rummaging through YouTube tutorials that lead down endless rabbit holes, when you can easily find the best blockchain tutorials organized neatly in one place. 

If you dream of creating a cryptocurrency or you want to build the next killer DeFi protocol like yEarn, go to Ivan on Tech Academy, one of the premier blockchain academy platforms, and get started studying competitive crypto courses today!

Like what you're reading?

Get to work in a fast growing industry. Start learning blockchain together with our 20,000+ students today.
Use coupon code BLOG20 for 20% off.

Become Blockchain Certified Today No Prior Knowledge Needed!
Close

Get our Free Ebook

Enter your email and we will send it to you!