Create Staking Pool
Creates a staking pool.
Permissions: DAO Admin / DAO Meeple
Dependencies:
DAO needs to be created
Collateral Token needs to be whitelisted
Params:
Param name | Description | Example |
config | the staking pool configuration data struct [daoId: uint256, minTotalPoolStake: uint128, maxTotalPoolStake: uint128, minimumContribution: uint128, epochDuration: uint32, epochStartTimestamp: uint32, treasury: address, stakeToken: address, Struct: [tokens: address, maxAmount: uint256, ratio: uint256], rewardType: uint8] where: daoId: the numeric id for the dao minTotalPoolStake; the minimum amount of staked tokens the pool requires to proceed maxTotalPoolStake; the maximum amount of staked tokens the pool can accept as deposits minimumContribution; the minimum amount a user can deposit into the pool epochDuration; the time duration in seconds the staking lock up period will last epochStartTimestamp; the timestamp the lockup period will start at treasury; the dao treasury address the staking pool will withdraw to incase of an emergency IERC20 stakeToken; the erc20 token to be used as the stake token Reward[] rewardTokens; an array of Reward structs where: Reward { tokens; the address of the erc20 reward token uint256 maxAmount; // the maximum amount of this token that will be funded uint256 ratio; // only initialized for fixed } RewardType rewardType; the staking pool reward calculation type (NONE, FIXED or FLOATING) i.e. 0 = NONE, 1=FIXED, 2=FLOATING | [1, "150000000000000000000", "1000000000000000000000", "1000000000000000000", 20000, 1662592255, "0xDe9007A43772a745C434F9Eb6C519132Db2b14A5", "0xa63c6e2af9c87768f741e1bb7f77511d23152c7b", [["0xa63c6e2af9c87768f741e1bb7f77511d23152c7b", "105000000000000000000", "15000000000000000000"]], 1] |
launchPaused | True if you want the created pool to be launch in paused mode, false otherwise | false |
rewardsAvailableTimestamp | the unix timestamp the reward tokens will become available, need to be more than epochStartTimestamp + epochDuration |
Emits:
The creation of a pool will result in a new contract address! This is the contract the end users will interact with (deposit, withdraw etc.) This will be the first parameter of the StakingPoolCreated event. Note this down for Initialize the Staking Pool Rewards step.
Etherscan Link: https://goerli.etherscan.io/address/0x3d8cBBc284160D6d692d02B76Dae4bAd21902d73#writeContract#F2
Last updated