Get the 5-minute newsletter keeping 73K+ crypto innovators in the loop.
© Defiant Media Inc 2022
A Step-by-Step Guide to a Pioneer in Yield Farming
By: Rahul Nambiampurath
Yearn Finance played a leading role in the decentralized finance (DeFi) boom in the summer of 2020. Running on Ethereum blockchain, Yearn Finance deployed smart contracts to maximize yields on deposits and generate high interest rates.
This process is called yield farming and Yearn Finance was a pioneer of the business. Let’s start with the protocol’s origin.
Yearn Finance owes its existence to Andre Cronje, a South African coder who created and contributed to more than 25 DeFi projects. Many in the community call him the “Godfather of DeFi.”
In early 2020, Cronje pioneered two DeFi projects — yEarn Finance and iEarn. The latter was the first decentralized application (dApp) to harness smart contracts for yield aggregation. The concept was simple:
A Step-by-Step Guide to One of DeFi Most Influential Lending Protocols
In traditional finance, this approach would entail moving money between accounts to pocket interest returns. In the DeFi world, there are no banks. Instead, smart contracts, hosted on blockchain networks, serve as liquidity depositories for lenders and as liquidity sources for borrowers.
At each side of the equation, borrowers and lenders interface with smart contracts. After iEarn showed success in yield aggregation, Cronje renamed it to yEarn, as in yield earn, which finally morphed into Yearn Finance (YFI) in July 2020.
At its TVL peak in December 2021, Yearn Finance held $6.91B worth of crypto funds, an incredible 103,034% growth since July 2020.
Yearn Finance’s popularity mirrors its main mission. The platform’s goal is to simplify the DeFi experience, so crypto investors don’t have to hunt down yields across dozens of lending dApps.
Interestingly, Yearn Finance is one of the rare projects that was not funded by venture capital firms. Moreover, Cronje didn’t even raise funding, private or public, through YFI token sales. To keep up with the spirit of decentralized finance, Cronje chose not to reserve any YFI tokens for himself.
Without Yearn Finance, investors would have to manually move their liquidity into the protocol that has the highest return rate. As a talented programmer, Andre Cronje automated this process and scaled it up for public consumption in the form of Yearn Finance.
In addition to making DeFi accessible to the average online adventurer, Yearn Finance deployed a number of custom tools to serve as a yield aggregator for the largest lending platforms: Aave, Curve, Balancer, and Compound.
Of course, liquidity providers (LPs) are not constrained to just lending platforms to engage in yield farming. Decentralized exchanges (DEXs) like Uniswap need liquidity for exchanging token pairs, which also generates interest rates for liquidity providers.
Thanks to these YF tools, investors can shop for the best interest rates available. To pay for the protocol’s continued development, Yearn Finance charges withdrawals, as 0.5% fees.
Yearn Finance is a collection of smart contracts working together to simplify yield farming. Each one makes the yield aggregation happen:
The end user sees these four YF pillars, arranged like an intuitive news site. Once connected with MetaMask wallet to Yearn Finance platform, the account portfolio is front-end-center, showing holdings, earnings, and estimated annual yield (APY).
Just beneath the user’s portfolio, Yearn Finance displays three highest APY opportunities, as its version of the “trending” mid-section. Underneath those high earners is the listing of all yield farming opportunities across dozens of vaults, filterable by the vault’s total assets and APY.
Vault is the cornerstone of Yearn Finance’s model. Yearn Vault is a smart contract that collects investor’s liquidity, but from other platforms. To make that inter-dApp-connectivity possible, yTokens represent liquidity pools (tokens themselves are smart contracts).
Remember, when one deposits liquidity into a liquidity pool, such as ETH/USDC on Aave, the liquidity provider (LP) deposits those tokens as they are to earn yields. A Yearn Vault is also such a yield-generating staking pool, but yTokens transform deposited assets into yTokens.
In other words, they are wrapped as yTokens so that other smart contracts, on other platforms, can be accessed from a single aggregating source — Yearn Finance. Likewise, when withdrawing funds, they are returned as yTokens. Case in point, the Curve stETH vault, at 6.56% APY from Curve Finance, represents Curve liquidity pool holding staked Ethereum (stETH).
When one deposits liquidity into a Vault, the user gains yield benefits, as if they are accessing Curve Finance platform. That’s because Yearn Vaults do that for the user, by relaying deposited funds to the other platform, in this case, Curve Finance.
Additionally, Yearn Finance deploys trading strategies to exert maximum returns. Depending on the type of staking pool represented by yTokens, these returns can come from LP rewards, trading fees, or interest rates.
Shift to Proof of Stake Roils ETH Market But Perhaps Only for the Short Term
Furthermore, these strategies run as batched transactions instead of single sequential ones, which significantly lowers ETH gas fees. Each yToken will clearly outline which strategy the vault uses to maximize returns. A user (liquidity provider) could manually employ them by just reading the description, but they wouldn’t be able to be as cost-efficient.
For more advanced users, they can access Labs. This Yearn Finance section lists vaults that employ unconventional and experimental yield farming strategies.
YFI token is an ERC-20 utility and governance token. YFI tokenholders can use their stacks to vote on new trading strategies for vaults or even change withdrawal fees and other aspects of the protocol.
YFI tokens are almost as rare as typical NFT collections. There is a maximum supply of 36,666 YFI tokens, all of them in circulating supply. Because of their rarity and high demand, YFI token price reached an incredible $93,435 peak in May 2021, while its all-time-low was in July 2020, at $739, when the platform just started gaining traction.
In addition to earning YFI tokens by depositing funds in Yearn Vaults, they are available on decentralized and centralized exchanges.
Whether indirect through Yearn Finance, or direct, yield farming can be risky. According to the Chainalysis August report, up to $2B crypto assets were drained from smart contract exploits.
In addition to technical vulnerability stemming from poor coding practices and lack of auditing, the assets themselves could be risky. For example, algorithmic stablecoins are pegged to other cryptocurrencies, which makes them vulnerable to extreme market conditions.
TerraUSD (UST), DEI (DEI), Fantom USD (fUSD), and Neutrino (USDN) are just some of the algorithmic stablecoins that failed to maintain their dollar pegs. If this happens in liquidity pools, collateralized loans could be liquidated.
Furthermore, because of inter-linked trading strategies, one token depreciation could lead to another, triggering a contagion cascade. One only has to look at the above Yearn Finance TVL graph to see this has already happened after Terra (LUNA) collapsed in May.
This series article is intended for general guidance and information purposes only for beginners participating in cryptocurrencies and DeFi. The contents of this article are not to be construed as legal, business, investment, or tax advice. You should consult with your advisors for all legal, business, investment, and tax implications and advice. The Defiant is not responsible for any lost funds. Please use your best judgment and practice due diligence before interacting with smart contracts.
Get the 5-minute newsletter keeping 75K+ crypto innovators in the loop.