In DeFi, yield farming means depositing a token inside a DeFi protocol against another token as reward. Usually, users will stake a token like an LP token (liquidity provider token) and the protocol will reward the users by giving them the protocol's token.
DeFi protocols do this to attract more liquidity, be more efficient and compete with other protocols.
MasterChef is a smart contract that distribute SUSHI to users that stake specifics tokens. Its exactly like described in the previous part: to compete with other AMMs Sushi needs liquidity, to attract more liquidity, Sushi gives SUSHI token to users adding liquidity to sushiswap and staking their SLP (sushi LP) tokens.
Sushi also does it with KMP tokens which are token received when lending on Kashi to bootstrap liquidity.
When staking their SLP or KMP tokens, users continue to earn fees from swap or lending on top of SUSHI token rewards.
MasterChef have 3 implementations :
MasterChefv1, MasterChefv2 and MiniChef can be used the same way :
Step 1: Go to https://app.sushi.com/farm.
Step 2: Find the pair where you added liquidity previously and click on it (not all pair can receive SUSHI rewards so make sure to check if the pair you want to add liquidity is in the farms list).
In this example i'll stake my SPELL/WETH SLP token on arbitrum which uses MiniChef.
Step 3.1: Enter the amount to stake, if its your first time you'll need to approve first.
Step 3.2: Once approved, you can click on stake.
Step 4: Congrats you are now yield farming !
Step 5: After some time, you will be able to harvest your rewards by clicking on the harvest button.
(note: when staking or unstaking, pending rewards are automatically harvested)
Happy farming !