Earning interest through borrowing funds
Both obtaining and providing a loan involves placing the participant's funds in a liquidity pool, either as collateral or as a deposit. A farmer registers in a project that issues loans, and transfers funds to another user, who draws up an application for a loan on the condition of subsequent payment of interest. The farmer's income is the bonus tokens received along with the loan interest.
A liquidity pool is a smart contract on decentralized exchanges (DEX) based on automated market making (AMM) technology. During trading, the ratio of tokens in the pool changes, as does the price of tokens. The participant providing liquidity receives two types of coins: profitable LP-tokens, which serve as a share and confirmation that liquidity has been provided to the pool, and “burn out” in the blockchain when liquidity is withdrawn; and bonus DEX or DeFi-protocol tokens that reward activity. Farmers sell bonus tokens on the exchange in exchange for basic liquidity, which is again supplied to a specific pool, and bonus tokens are again credited to participants. Such manipulations are carried out as long as they remain profitable, overriding the trading commissions and fees of the Ethereum network.
Calculating profit from yield farming
Profit from yield farming is calculated in the form of annual interest, as in a bank. The most common metrics are Annual Percentage Rate (APR) and Annual Percentage Yield (APY). The difference between the two is that APR does not account for compounding. In this case, the accrual of compound interest means the direct reinvestment of income in order to obtain more profit.
Errors and vulnerabilities in smart contracts
In the DeFi sector, many protocols are developed by small teams with limited budgets, which increases the risk of bugs and vulnerabilities in the code.
Withdrawing funds from liquidity pools
Any user of the DeFi platform can withdraw their liquidity from the market, except in those scenarios when it is blocked through a third party mechanism. In addition, in most cases, developers control large amounts of underlying assets and can easily dump these tokens on the market.
The threat of impermanent loss
AMMs operate on a permanent basis to determine the value of tokens in liquidity pools. Due to price changes in foreign markets, quotes in AMM may diverge from them, this is used by arbitrageurs. When withdrawing, liquidity providers may receive fewer tokens due to the risk of impermanent losses.
High Ethereum fees
High Ethereum fees can make yield farming-related transactions unprofitable.
The yield farming platform is a web-based dashboard that allows a project that has launched its own token to popularize it by adding an additional incentive mechanism that encourages the user to stake tokens and receive additional rewards. How does it work? For a DeFi token to be successful, it must have certain locked liquidity on a centralized exchange. To ensure this, it is necessary to force liquidity providers to withdraw less token pairs from liquidity pools of centralized exchanges.
In view of this, mechanisms such as yield farming were invented. The model of work is as follows: you supply liquidity to the liquidity pool on the exchange. In return, the exchange issues and provides you with an LP token, which certifies your right to own part of the funds in the pool. Further, you stake this LP token in the yield farming dashboard of a specific project and receive additional rewards, along with the one that you receive as the owner of the LP token.
The reward is calculated in the native tokens of the project. For example, if it is SushiSwap, then their yield farming dashboard is provided by Sushi Coins. That is, the project rewards you with its tokens for staking their liquidity on a centralized exchange. Thus, the yield farming platform helps projects increase the size of their liquidity pools.
Help with technical documentation
Smart contracts development