Summary
This chapter has demonstrated the implementation of the frontend for the staking and farming feature of the DeFi project. We have learned how to interact with smart contracts to list staking pools and farming pools. We also dived into the frontend code to deposit staked tokens, withdraw, harvest rewards, create a staking pool, and supply rewards for staking pools. In the last section, we learned how to reuse the code of the staking feature to create the farming feature of the DeFi project. By the end of this chapter, we have completed the full-stack functionalities for staking and farming.
In the next chapter, we will start exploring an important topic of DeFi: the crypto loan. It involves many components that build up the whole functional system. For example, crypto loans introduce the interest rate model for lending and borrowing various types of cryptocurrencies. The system also requires a price oracle to dynamically determine the value of the maximum tokens a user can...