This is a blockchain project made on Ethereum which illustrates how yield farming is done in Defi. Yield Farming is a type of liquidity mining where people liquidate their tokens into a defi application and earn rewards in the form of other tokens for staking. In this project we assume an investor stakes BetaTokens into an application and gets rewarded by AlphaTokens during his time of staking.
It's a Truffle project with a React frontend. Uses Ganache as local blockchain and MetaMask for browser Ethereum.
- An Investor is given 100 BetaTokens initially
- Investor then stakes some BetaTokens into the TokenFarm
- While the investor is still actively a staker of TokenFarm he gets rewarded with AlphaTokens
- The amount of AlphaTokens awarded is solely upto the TokenFarm, we assume all investors get 25% of their staking balance
- Any Investor can unstake his tokens whenever he feels like