Pre-requisites
Course: Upgradable staking contract - chapter 2
Solidity
ERC-20
Foundry
Upgradable / Proxy contracts
What we’re building
Section titled “What we’re building”a Staking contract where people can come and stake native ETH.
More complex approach #0 -
Section titled “More complex approach #0 -”Issue the users an ERC-20 based on the time they are staking it for.
More complex approach #1 -
Section titled “More complex approach #1 -”Lock the tokens for the user during withdrawal for 21 days. They don’t get the new token for that amount of time.
More complex approach #2 -
Section titled “More complex approach #2 -”Stake an ERC-20 token and not native ETH.
Use case -
Section titled “Use case -”Staking ETH over to a new blockchain/protocol in lieu of the tokens of the new blockchain