RWA is the native cryptocurrency for Asset Chain, similar to ETH on Ethereum.
- Description
- Parameters To Consider
- Developer Considerations
- Getting Started
- Contributing
- License
- Support
This project implements the RWA staking model for Asset Chain. The model allows users to stake RWA and earn a dynamic APR based on the total amount of RWA in the staking pool.
There are two types of staking available:
- Fixed Staking: Users can lock up RWA for a set period.
- Flexible Staking: Users can stake and unstake RWA without a lock-up period.
- LockTime:The minimum cool-down period after staking before unstaking or forced unstaking can occur. . The default value is ONE WEEK
- Reduction Percent: The maximum percentage by which the total staked RWA will be slashed, proportional to the selected lock period. The default value is 30% Example: If you select a 3-month lock and force unlock after 1 month, the slash will be ((3-1)/3) * (30%) * Total staked RWA
- Action Limit: This is the cool down period period between consecutive flexible staking operations. Default value is 24 hours
- Max Active Stake: This is the maximum number of active staking operations a user can perform on flexible staking. Default value is 10
- The Open Zeppelin Version that is compatible with solidity 0.6.12 which is openzeppelin 3.4
- You can upgrade the entire project to use higher versions of openzeppelin if you wish to but it means you might have to make code changes since the project uses SafeMath and this is no long available in very new Open Zeppelin libraries
- If you have already installed the current open zeppelin version, you can simply run npm install @openzeppelin/[email protected] to downgrade and give you the supported version.
- Remember to change solidity compiler version in your config file to 0.6.12
To get started, follow the steps below:
- Clone this repo
git clone https://github.com/xendfinance/AssetChain-RWAStaking.git
- cd into the project
- Install the project's dependencies
yarn install
npm install
- Compile your contracts
npx hardhat compile
- Start development
See CONTRIBUTING.md for contribution and pull request protocol. We expect contributors to follow our guide when submitting code or comments.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
For questions or suggestions, just say Hi on Telegram.
We're always glad to help.