Closed Tieumsan closed 1 year ago
Best way to add enabled farming to chainspec. Then staking will add and work after wipes.
Need to add more staking/farming pools to Stage. Will be better like PROD. For test improvement.
Need to add more staking/farming pools to Stage. Will be better like PROD. For test improvement.
Problem statement
As part of the migration to Substrate 4, we need to test that staking on Demeter Farms remains functional.
Description
First, you need to register reward tokens (DEO, XST...) - demeterFarmingPlatform.registerToken
Parameters: poolAsset - token asset id tokenPerBlock - how many tokens do you want to "distribute" per block farmsAllocation - which percent of rewards are going to farming pools stakingAllocation - which percent of rewards are going to staking pools teamAllocation - which percent of rewards are going to team teamAccount - team account id
Example: poolAsset - 0x0200090000000000000000000000000000000000000000000000000000000000 (XST) tokenPerBlock - 0.00354656 farmsAllocation - 0.6 stakingAllocation - 0.4 teamAllocation - 0 teamAccount - cn1234rsdfsf......
Do it for each reward token you want to have
Then, you need to add pools - demeterFarmingPlatform.addPool
Parameters poolAsset - if farming then it is second token in pair (XOR/TOKEN), if staking then it is token to stake rewardAsset - reward token asset id (reward token should be previously registered) isFarm - true/false, is it farming or staking pool multiplier - u32, nothing relevant for you depositFee - fee percent isCore - true/false, same nothing relevant
Example - XOR/DEO farming with XST rewards poolAsset - 0x00f2f4fda40a4bf1fc3769d156fa695532eec31e265d75068524462c0b80f67 (DEO) rewardAsset - 0x0200090000000000000000000000000000000000000000000000000000000000 isFarm - true multiplier - 5 depositFee - 0.02 (2%) isCore - false
Example - XST staking with DEO rewards poolAsset - 0x0200090000000000000000000000000000000000000000000000000000000000 rewardAsset - 0x00f2f4fda40a4bf1fc3769d156fa695532eec31e265d75068524462c0b80f674 isFarm - false multiplier - 5 depositFee - 0.04 (4%) isCore - true
Definition of Done
Requirements
No response