Staking Protocol
Token Staking
The Token Staking feature in our asset tokenization platform allows users to stake their tokens in return for ERC20-based rewards. This staking mechanism involves locking tokens in a smart contract, choosing a staking duration, and receiving interest in a specified ERC20 token. Below is a detailed outline of the staking process, contract functionalities, and associated rules.
Overview of Token Staking Process
Staking Initiation:
Users choose to stake their asset tokens by locking them in a predefined staking contract.
They specify the staking duration (ranging from 1 month to 1 year) and select an ERC20 token for staking rewards.
Asset Transfer and Locking:
The asset tokens are transferred to the staking contract, where they are locked for the specified duration.
The contract verifies the 'last approved price' of the assets from the token struct to calculate the equivalent value in the chosen ERC20 token.
Staking Contract Functionalities
ERC20 Minting:
Upon successful locking of assets, the contract mints the equivalent value of the selected ERC20 token based on the last approved asset price.
The minted ERC20 tokens are credited to the user's account as staking rewards.
Interest Payment:
The generated interest from staking is paid directly to the user’s wallet.
Interest rates are predefined and may vary based on the chosen ERC20 token and staking duration.
Early Withdrawal Penalty:
If a user chooses to withdraw the staked assets before the end of the staking period, a penalty is applied.
The penalty involves a fee, deducted from the minted ERC20 tokens or interest earned.
Asset Unlocking and ERC20 Burning:
The asset tokens are only unlocked after the staked ERC20 coins are burned.
If the staking duration completes, the system automatically burns the ERC20 tokens and returns the asset tokens to the user's wallet.
Staking Contract Structure
Key Operations and Functions
Stake and Unstake: Functions to allow users to stake their tokens and retrieve them after the staking period.
Interest and Penalties: Mechanisms to handle the interest distribution and penalties for early withdrawal.
ERC20 Token Integration: Interface with ERC20 tokens for minting and burning based on staking activities.
Conclusion
This staking contract provides a structured approach for users to earn rewards by staking their asset tokens. By integrating with ERC20 tokens and ensuring secure transaction mechanisms, the platform offers an attractive feature for token holders to maximize their asset value
Last updated