The Yield Farming Playbook

KehindeOlaseni 59 views 22 slides Oct 02, 2024
Slide 1
Slide 1 of 22
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22

About This Presentation

The Yield Farming Playbook by Olaseni Kehinde Precious is a comprehensive guide for navigating yield farming as a beginner, exploring top strategies for profitable decentralized finance (DeFi) opportunities as a professional, and understanding the risks involved in yield farming, along with methods ...


Slide Content

The Yield Farming Playbook
Olaseni Kehinde Precious
[email protected]
By
©2024
Strategies, Risks, and Rewards.
@thekprecious

What is Yield Farming?
Yield farming refers to depositing assets in decentralized
finance (DeFi) platforms to earn returns. The assets are
locked through lending, staking, borrowing, or liquidity
mining to earn additional token rewards.
@thekprecious

In yield farming, users can lend crypto to borrowers, provide liquidity to a pool, borrow
crypto from lenders, or stake Liquidity Provider (LP) tokens for additional rewards, also
known as yield tokens.
Once a user deposits an asset to lend, borrow, or provide liquidity, a smart contract will
remove any intermediary and connect the lender with the borrower. It will issue LP tokens in
correspondence with the stake in the pool, the duration of participation, and the pool's
performance. Additionally, it will handle the transaction by securely locking the deposited
assets and allowing users to earn rewards, ensuring that the entire process from deposit to
withdrawal meets the necessary conditions.
Yield Farming Mechanism
@thekprecious

Lending occurs when users deposit into a DeFi platform, often using stablecoins (USDT, USDC, or DAI), but they may
also lend other cryptocurrencies to borrowers and earn interest on their deposited assets or even earn additional
rewards, such as governance tokens.
Once a user deposits on a decentralized platform for lending, the smart contract acts as an intermediary and helps
to connect the lender and the borrower. After that, the user will receive a token representing their share of the pool
to which they supplied their asset, and this token will accumulate interest over time. This interest rate is determined
by supply and demand; so, if there is too much supply and lower demand, the interest may be less.
In order to withdraw, the user will exchange their token, which represents their share of the pool, back to their initial
asset, allowing them to access their deposited amount plus any additional rewards earned based on how much was
deposited and for how long.
Lending
Overview
@thekprecious

Liquidity provision is when users supply trading liquidity into a DeFi platform. The liquidity is provided in pairs, such as
BNB/USDC, ETH/USDC, etc., and helps to ensure a smooth flow of decentralized trading while also earning rewards in the
process.
For instance, if user A supplies liquidity for BNB/USDC on a decentralized platform, user A will receive Liquidity Provider
(LP) tokens in exchange for supplying liquidity and, in exchange, will earn trading fees at a certain percentage on all BNB/
USDC traded on the platform. However, if there are too many liquidity providers for that particular pair, user A's reward
may be less. This is because the reward is a shared earning among several LPs, and if there are too many people, it will
become diluted unless the pool has a lot of volume to generate sufficient fees.
Moreover, if this liquidity provision is solely on a decentralized exchange (DEX), specifically for earning additional rewards,
it may also be referred to as liquidity mining. Some platforms can also provide liquidity providers with additional rewards,
such as exchange native tokens or even governance tokens.
Liquidity Provision
Mechanism
@thekprecious

Staking Overview
Staking occurs when users stake their Liquidity Provider (LP)
tokens to maximize their Annual Percentage Yield (APY).
For instance, if user A deposits BNB/USDC into a liquidity pool
and receives an LP token for that asset pair as their share of the
pool, user A can decide to stake the LP tokens to earn emission
tokens (tokens designed specifically for rewarding liquidity
providers) and maximize rewards.
@thekprecious

Borrowing occurs when users deposit collateral into a pool to borrow another asset. The amount users can
borrow depends on the Loan-To-Value (LTV) which is simply the percentage ratio of how much collateral users
need to provide to obtain a certain percentage of the loan. This percentage varies depending on the platform
that users use. For instance, if user A deposits 5 BNB as collateral at $600 per BNB, and if the protocol allows
user A to borrow up to 50%, that means user A can borrow crypto up to $1,500.
In borrowing, it is better for users to deposit stablecoins such as USDT, USDC, or DAI as collateral to prevent the
value of their asset from decreasing, which may pose them towards liquidation risk. Also, platforms such as Aave
allow users to borrow against their deposited assets and use their aTokens (which represent their stake and
interest-earning potential) as collateral.
For instance, if user A deposits 2 BNB and $1,200 worth of USDC when 1 BNB equals $600, user A will receive
aTokens based on the total value of their deposit, which can be used to borrow more assets.
However, user A must repay the borrowed amount and any additional interest on it before user A can withdraw
the collateral.
Borrowing Mechanism
@thekprecious

Terms Used In Borrowing
1 Debt Value:
A Debt Value refers to the value of the borrowed tokens.
These common terms varies across several Defi platforms:
2. Position
Value:
Position value = Collateral + Initial Deposit + Rewards Earned from LP Tokens.
3. Debt Ratio:
A Debt Ratio = Debt Value ÷ Position Value.
4. Equity
Value:
Position Value - Debt Value.
@thekprecious

Key Strategies in Yield Farming
1 Recursive Lending or Looping
Recursive lending occurs when a user re-invests a borrowed asset on a DeFi platform. For instance, if user A deposits 2 BNB
as collateral to borrow 600 USDC, they can decide to lend out the 600 USDC for interest or borrow more assets like USDT
or DAI.
The initial collateral of 2 BNB continues to earn rewards while the borrowed assets are utilized, but the specifics of rewards
depend on the platform’s interest rate and market conditions.
2. Utilizing Defi Aggregators
DeFi aggregators help users find the best yield farming opportunities. Instead of manually searching for assets and protocols with
higher earnings, DeFi aggregators automatically source and optimize these opportunities for users.
For instance, if user A borrows USDC on Aave, they can use aggregators like Yearn Finance, Beefy Finance, 1inch, or Harvest
Finance to manage the entire process of finding high-return investments on another platform, like Compound, in order to reduce
risk through diversification and maximize rewards through automated strategies.
@thekprecious

Risks and Challenges In Yield Farming
Liquidation 1. Risk
Liquidation risk occurs when the collateral value used in borrowing drops to the point that it no longer covers the
loan amount or breaches the Loan-To-Value (LTV) ratio. For instance, if user A deposits 2 BNB at $600 per BNB to
receive 600 USDC at a 50% borrowing ratio, if the value of BNB drops significantly below the collateral needed to
support the loan, user A may lose all the collateral, which would be liquidated to repay the loan. Additionally, user A
may face other penalties depending on the platform's rules.
2. Impermanent
Loss
Impermanent loss occurs in liquidity provision when there’s a change in the price value of the provided assets.
For instance, if user A supplies 2 BNB and 1200 USDC into a pool at $600 per 1 BNB, if BNB falls to $598 or increases to $605,
there is a risk of impermanent loss. This is because, once an asset price increases or decreases, the pool will rebalance the BNB
and USDC to maintain the 50:50 value ratio. As a result, user A may end up with lesser amounts of BNB or USDC, depending on
whether the value of BNB drops or surges. However, if BNB goes back to $600 per 1, the loss can be mitigated. This makes it an
impermanent loss.
@thekprecious

3. Slippage Occurence
Low volume in yield farming, especially in liquidity provision, could lead to slippage. In trading, slippage occurs when
the available liquidity in a market is low. So, whenever a large trade is placed, the current price could differ from the
potential execution price.
For instance, if user A supplies BNB/USDC on Sushiswap and there is not enough liquidity in that market to execute
the BNB/USDC order, user A might experience slippage, resulting in a different execution price than expected.
4. APY Decrease
At times, the expected Annual Percentage Yield (APY) may decrease if there are several Liquidity Providers (LPs)
supplying liquidity to that particular liquidity pair.
This can also occur in lending if there are too many lenders of a particular asset compared to the borrowers. The
higher supply and lower demand, along with certain market conditions like volatility or platform issues, can result in
dilution and cause the APY to decrease.
@thekprecious

Key Metrics In Yield Farming
Loan-to-Value1. (LTV)
Loan-to-value is an essential metric in borrowing that helps to prevent liquidation risk.
For instance, if user A deposits 2 BNB at 600 per BNB to borrow 600 USDC, that means
user A borrows at a 50% LTV ratio, as the half value of the collateral is being borrowed. Now,
for user A to prevent being liquidated, the user needs to ensure that the BNB price does not
drop below 600 by depositing more collateral to rebalance the LTV ratio.
@thekprecious

The Annual Percentage Rate in yield farming represents a flat earning or a simple interest that does not
compound.
The Total Amount Earned= Principal Amount + Interest
For instance, if User A lends 2 BNB at $600 each for an APR of 5%
Firstly, principal = 600*2 = 1200
Interest= 5% of $1200 = 0.05 * 1200 = $60
This means User A’s earnings at the end of the year including the principal amount would be $1200
(principal) + $60 (interest) = $1260.
Annual Percentage Rate 1. (APR)
@thekprecious

2. Annual Percentage Yield (APY)
Annual Percentage Yield (APY) in yield farming is the reward users receive from depositing and locking up
their assets, as well as the additional earnings generated from interest on the original deposit. This means
that APY represents compounding interest, which increases the potential profits in a yield farming system.
The calculation for APY = (1 + APR/n)ⁿ - 1
Where the first “1" represents the principal amount or original asset deposited
The “n” represents the number of compounded periods per year. For instance, if interest compounded
monthly for a year, n would be 12.
The “-1” is the subtraction of the initial deposit or principal amount from the total earnings after interest
has been applied.
@thekprecious

For instance, if user A lends 2 BNB at 600 per BNB for a year and APY is compounded
monthly, for an APY of 5%.
APY = (1 + 0.05/12)¹² - 1
APY = (1 + 0.0041667)¹² - 1
APY ≈ 1.0512 - 1
APY ≈ 0.0512 or 5.12%
To calculate how much user A would earn after compounding for a year:
APY = (1 + APR/n)ⁿ - 1
calculating the values:
Total amount = 1200 * (1 + 0.0512)
Total amount = 1200 * 1.0512
Total amount = 1261.44
@thekprecious

Historical Challenges In Yield Farming
Harvest
Finance
Incident Type Amount Description
Sushiswap
Yearn.finance
Loan attack
Exit Scam
Hack
$24M
$13.8M
$11.54M
On September 5, 2020, Sushi Token's founder, Chef Nomi, liquidated
37,400 ETH (about $13.8 million), causing the token's price to drop by 73%.
He later returned 38,000 ETH to the treasury due to investors backlash
and threat of legal action.
In October 2020, Harvest Finance suffered a flash loan attack that led to the
theft of about $24 million in stablecoins, causing its total value locked (TVL) to
drop from over $1 billion to approximately $430 million. The attacker
manipulated prices through arbitrage trades across various DeFi platforms.
On April 13, 2023, Yearn Finance was attacked due to a
misconfiguration in the yUSDT vault. The attackers exploited this
vulnerability and stole approximately $11.54 million.
@thekprecious

Key Takeaways
From Past Historical Challenges
Users should diversify investments and avoid putting all their assets on a single platform.
Users should use protocols that have undergone security audits by top blockchain firms such
as Consensys Diligence, CertiK, PeckShield, Quantstamp, and Hacken.
Projects should have contingency plans for exit scams, smart contract tampering, legal suits,
and also have a clear recovery mechanism.
Yield farming like every other aspect of Defi is a risky investment; users should utilize risk
management strategies to minimize risks and only invest with what they can afford to lose.
Protocols should frequently audit their smart contracts after any code changes, new
implementations, or instances of suspicious code alterations
@thekprecious

Pool Analytics & Yield Farming
Defi Pulse
Zapper
APY Vision
Yieldwatch
Rewards Tracking Tools.
APY Vision: Rewards tracker.
Defi Pulse: Analytic tool.
Yieldwatch: Rewards tracker.
Zapper: Analytics, and rewards tracker.
@thekprecious

Yield farming became popular in the 2020 Defi summer after Compound, an Ethereum protocol, released its
Governance tokens. After that, several users started demanding the tokens, which contributed to the surge in
token price.
In 2021, Compound started providing its governance token (COMP) as additional rewards to lenders, which
contributed significantly to the widespread adoption of yield farming.
According to DefiLIama’s data, yield farming has witnessed growth over time, with over 1,000 different yield
farming protocols and an estimated Market Capitalization (MarketCap) of $172.713 billion in 2024.
Additionally, the yield farming ecosystem continues to grow due to the deployment of several blockchains and
ongoing industry innovations. While there are various aggregators and analytics tools for yield farming
protocols, hackers are continuously creating scams. Therefore, it is essential to conduct due diligence and stay
updated with industry trends.
The Evolution of Yield Farming
@thekprecious

Connect With Me
I write SEO-optimized crypto articles that rank on Google’s first
page, I am a marketing maestro and a tech startup enthusiast.
[email protected]
@thekprecious
Olaseni Kehinde Precious
@thekprecious

Disclaimer!
This presentation is solely for educational purposes and should not in any form
be misinterpreted as financial advice. Always Do Your Own Research (DYOR)
before investing in any Defi protocol or blockchain solution.
@thekprecious

Thank You For Reading
Copyright © 2024 Olaseni Kehinde Precious. All rights reserved. This document is for
informational purposes only and does not constitute financial advice. The author is not
responsible for any loss sustained by using this information. No part of this document
may be reproduced, distributed, or transmitted in any form or by any means without
the prior written permission of Olaseni Kehinde Precious.