Quest

Quest 2: Creating an Omnichain Staking Contract

Sponsored by
STATUS Past
TOTAL REWARDS
$1,000
REWARD AMOUNT
$2
STARTS (GMT +08:00)
ENDS (GMT +08:00)

Learning Outcomes

By the end of this quest, you will be able to:

  • Clone a boilerplate Hardhat project from ZetaChain
  • Describe how an omnichain staking contract works
  • Build an omnichain staking contract

Quest Details

Introduction

In this quest, we'll be creating our first omnichain staking contract, designed to accept tokens from various connected chains (including Bitcoin) and stake them on ZetaChain. Native tokens sent to ZetaChain and converted into ZRC-20s will remain secured in the contract until the staker decides to withdraw them. The staking rewards will accumulate at a predetermined rate, directly proportional to the quantity of tokens staked.

Through this quest, we’ll also be learning how to use the onCrossChainCall function properly to dispatch different code logics, as well as how to withdraw tokens correctly both to EVM-based chains as well as to Bitcoin.

Hope you’re pumped, let’s go! 🔥

For technical help on the StackUp platform & quest-related questions, join our Discord, head to the zetachain-helpdesk channel and look for the correct thread to ask your question.

If you have any questions or feedback with regards to the platform, do head over to the 🆘 | v20-feedback-and-discussion channel!

Deliverables

This quest has 1 deliverable.

  1. A screenshot of your completed Staking.sol smart contract

This quest is part of a campaign so do check out other quests!


Help Center Need help?

Find articles to support you through your journey or chat with our support team.

Help Center