I want to make a token on ERC20 and that would be staked, and other token would be rewarded as on interest earn. After certain time, that earned token being staked, and third token will came out as on interest.

Is this possible in Ethereum ?


Yes, it's possible.

Any contract can own and control an ERC20 token, so you can either:

  • Mint an allowance of your earned token and transfer it to your staked token contract which can then distribute it to stakers using normal transfers
  • Make a privileged mint() function in your earned token contract which can only be called by your staked token contract, so your staked token contract can create earned tokens whenever it needs to.

Your staked token will also need to work out who should be paid at what point. Technically what you need to do here looks a lot like distributing dividends. See this answer for relevant technical considerations: How to distribute dividends?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.