Put in order · Blockchain and Web3 course · Module 8: ERC-20 & Token Creation

Sorting: Staking deposit

Arrange the steps for staking ERC-20 tokens:

Items to put in order

  • The user calls approve(stakingContract, amount)
  • Tokens are locked, the user receives rewards
  • The user calls stake(amount) on the staking contract
  • The contract calls transferFrom(user, stakingContract, amount)

You can check the correct answer by solving this task in the CodeWorlds game.