返回
项目实战

Yield Farming - Part 2

In Part 2 of the Yield Farming course, we will learn to implement basic functionalities for “Unlock Yield Farming”: reward, deposit, and withdraw.

语言solidity
难度简单
总时长1.7小时

目标学习者

这门课是给谁上的

  • 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 course YF - 1

你会学到什么

  • Implementation of functionalities for “Unlock Yield Farming”, including deposit, reward distribution, and withdrawal.
deposit
reward
withdraw

课程安排

  • Loan Library

    In this section, we will learn how to create libraries with functionality for calculating interest.


  • Reward - Section 1

    This section covers the collection of necessary parameters essential for the calculation of interest.


  • Reward - Section 2

    We will explore creating an interest rate for unlocked deposits and establishing a mapping variable to record the corresponding time when users withdraw their interest.


  • Reward - Section 3

    This section focuses on calculating the interest and ensuring its transfer to the user, a key aspect of financial management in this context.


  • Deposit - Section 1

    We will explore how to settle interest to users and initiate the process of deposits, a crucial step in the management of financial transactions.


  • Deposit - Section 2

    The section will guide you through updating the user’s account balance, an integral part of maintaining accurate financial records.


  • Withdraw - Section 1

    This section is dedicated to checking the user’s account balance and updating it.


  • Withdraw - Section 2

    Finally, we will learn how to transfer the withdrawal amount of tokens to the user, completing the cycle of token transactions.

practice

Yield Farming - Part 2

38 小节
移动端和桌面端均可访问