What is Yield Farming in Decentralized Finance(DeFi)?
Yield farming is the process of deploying Decentralised Finance (DeFi) to maximize the user’s returns by depositing crypto assets into a pool with other user.
23 JAN 2023, 3 min read
Yield farming is the process of deploying Decentralised Finance (DeFi) to maximize the user’s returns by depositing crypto assets into a pool with other users. With the DeFi platforms, users can borrow, lend crypto assets, and earn other crypto assets in return. Smart contracts are used to automatically facilitate yield farming, requiring minimum human intervention while conducting transactions efficiently.
Yield farming allows investors to deposit money in a DeFi platform or protocol, just like a savings account where you deposit your money with a bank, and earn interest in return for the funds deposited. However, unlike the banking system, DeFi utilises smart contracts where the deposited crypto is invested automatically and the user starts earning interest.
Yield farming involves a liquidity provider (LP) and a liquidity pool (which is a smart contract filled with tokens). Think of a liquidity provider as an investor who deposits tokens into a smart contract to fuel liquidity. Yield farming works on the automated market maker (AMM) model which eliminates the need for the conventional order book and instead creates liquidity pools using smart contracts.
Investors can earn yields by investing their tokens in decentralised applications or dApps such as Decentralised Exchanges (DEXs) which are generally used to lend, borrow, or stake tokens.
Types of yield farming:
Lending: Users can lend their tokens or crypto assets to borrowers via dApps such as a DEX which is facilitated by a smart contract and in return, can earn yields from the interest paid on the loans.
Borrowing: Yield farmers can borrow a token of their choice by providing another token in return as collateral. Users can then use the borrowed coins to farm and earn yield. Throughout this process, the user can keep their initial holding, as the token could increase in value over time, while still earning interest on the borrowed tokens.
Liquidity provider: Two tokens are deposited to a DEX for providing liquidity and exchanges charge a small fee to facilitate the swap of tokens. This fee is paid to the liquidity providers and could also sometimes be paid in new liquidity pool tokens. One can generate extra returns on their crypto assets by becoming a liquidity provider for a decentralized exchange.
Staking: Staking is usually of two kinds in the DeFi world. One is in the form of proof-of-stake blockchains in which the user provides their tokens for consensus and network validation. In the second form, the user stakes LP tokens that are earned while injecting liquidity into the DEXs. As a result, the users can earn yield twice, once for supplying liquidity in LP tokens which can then be staked further to earn more yield.
How does Yield Farming work?
Yield farming begins with the process of creating a pool of crypto assets. The following steps are undertaken to facilitate yield farming:
Liquidity pool: Creating a liquidity pool is the first step within yield farming. Investing and borrowing within specific yield farms are facilitated by the use of smart contacts.
Depositing assets: Users can connect their digital asset wallet for depositing assets within the liquidity pool. Also called staking, this process is similar to users depositing in their bank accounts or investing in a mutual fund.
Smart Contracts: Smart contracts, which are self-executed computer codes, allow several processes such as providing liquidity to a crypto exchange, lending, borrowing, etc.
Rewards: Once you have entered the liquidity pool, you start earning rewards in the form of interests that vary by yield farm. The rewards could be paid at regular intervals or at a later date in the future, depending on the terms agreed upon.
What is APY?
The returns to yield farming are described in the form of annualised percentage yield (APY). It is the rate of return on investment, taking into account the effects of compounding returns on an annual basis.
In a nutshell, the liquidity pools form the backbone of the DeFi marketplaces where activities such as borrowing, lending, and swapping are undertaken for yield farming. DeFi users pay a certain fee for transacting on the DeFi marketplaces, which is then shared with the LPs based on their share of the pool’s liquidity.