Yield Farming - Part 3
In Part 3 of the Yield Farming course, we will wrap up the Yield Farming series by learning to implement basic functionalities for “Lock Yield Farming”: deposit and withdraw.
目标学习者
这门课是给谁上的
- For developers who are interested in blockchain finance
- For developers who are looking to learn Solidity programming applications
要求
- Basic understanding of cryptocurrency, liquidity mining concepts; prior study of DEX series courses recommended
- Familiarity with ERC20/IERC20 standards
- Basic Solidity programming skills, with a recommendation to first complete Solidity foundational courses (at least Solidity 101 to 104)
- Possess an Ethereum account, connected to both Mantle and a wallet, holding either Mantle tokens or test tokens (for those wishing to perform real on-chain operations, though deployment can also be done directly in a local environment if test tokens are not available)
- Completed the content for courses YF - 1 and YF - 2
你会学到什么
- Implementation of functionalities for “Lock Yield Farming”, including depositWithLock and withdrawal of locked funds withdrawLocked.
- Refinement of LoanLibrary.
课程安排
Calculate Lock Interest
In this unit, we will learn how to implement the calculateLockedInterest function, which is essential for calculating the interest on locked deposits.
DepositWithLock - Section 1
We will define a data structure that effectively represents the bankbook information for each user.
DepositWithLock - Section 2
This section focuses on writing a function that enables users to lock their deposits.
DepositWithLock - Section 3
We will learn how to define the mappings necessary to store information about locked deposits and how to emit a successful deposit event.
WithdrawLocked - Section 1
The focus here is on implementing the withdrawLocked function, which will allow users to retrieve their locked deposits along with the accrued interest.
WithdrawLocked - Section 2
Calculate the total withdrawal amount in this section.
WithdrawLocked - Section 3
We will develop and implement the logic required to delete lock information from the system.
WithdrawLocked - Section 4
The final section completes the withdrawal logic, encompassing all necessary steps to process withdrawals from locked deposits.
![practice](/_next/static/media/practices_img1.95313557.png)
Yield Farming - Part 3