返回
项目实战

DAI - Part 2

In Part 2 of the DAI course, we will continue to build the StableCoin contract, focusing on the mint and burn functions.

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

目标学习者

这门课是给谁上的

  • For developers who are interested in blockchain finance
  • For developers who are interested in decentralized stablecoins, especially DAI
  • For developers who are looking to learn Solidity programming applications

要求

  • Familiar with the ERC20 standard
  • 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 DAI - collateral - 1

你会学到什么

  • Implementation of setting token prices, minting stablecoins with preconditions, and defining functions for burning stablecoins
mint
burn
collateralization ratio

课程安排

  • Price Oracle

    Develop a function to inform the contract about the current price of the collateral.


  • Collateralization Ratio

    Define and set up the collateralization ratio, a crucial metric for the stability of the contract.


  • MintStableCoin - Section 1

    Begin the process of writing the 'mintStableCoin' function, focusing on its initial development.


  • MintStableCoin - Section 2

    Finalize the 'mintStableCoin' function, ensuring its complete functionality for issuing stablecoins.


  • BurnStableCoin - Section 1

    Start writing the 'burnStableCoin' function, laying the groundwork for coin destruction mechanisms.


  • burnStableCoin - 2

    Complete the 'burnStableCoin' function, enabling the burning of StableCoins within the contract.

practice

DAI - Part 2

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