View Source: contracts/interfaces/IStakingPools.sol
↗ Extends: IMember ↘ Derived Contracts: StakingPoolBase
IStakingPools
Enums
enum StakingPoolType {
TokenStaking,
PODStaking
}
Events
event PoolUpdated(bytes32 indexed key, string name, enum IStakingPools.StakingPoolType poolType, address indexed stakingToken, address uniStakingTokenDollarPair, address indexed rewardToken, address uniRewardTokenDollarPair, uint256 rewardTokenDeposit, uint256 maxStake, uint256 rewardPerBlock, uint256 lockupPeriodInBlocks, uint256 platformFee);
event PoolClosed(bytes32 indexed key, string name);
event Deposited(bytes32 indexed key, address indexed account, address indexed token, uint256 amount);
event Withdrawn(bytes32 indexed key, address indexed account, address indexed token, uint256 amount);
event RewardsWithdrawn(bytes32 indexed key, address indexed account, address indexed token, uint256 rewards, uint256 platformFee);
- addOrEditPool(bytes32 coverKey, string name, enum IStakingPools.StakingPoolType poolType, address[] addresses, uint256[] values)
- closePool(bytes32 coverKey)
- deposit(bytes32 coverKey, uint256 amount)
- withdraw(bytes32 coverKey, uint256 amount)
- withdrawRewards(bytes32 coverKey)
- calculateRewards(bytes32 coverKey, address account)
- getInfo(bytes32 coverKey, address you)
Adds or edits the pool by key
function addOrEditPool(bytes32 coverKey, string name, enum IStakingPools.StakingPoolType poolType, address[] addresses, uint256[] values) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | Enter the key of the pool you want to create or edit |
name | string | Enter a name for this pool |
poolType | enum IStakingPools.StakingPoolType | Specify the pool type: TokenStaking or PODStaking |
addresses | address[] | [0] stakingToken The token which is staked in this pool |
values | uint256[] | [0] stakingTarget Specify the target amount in the staking token. You can not exceed the target. |
Source Code
function addOrEditPool(
bytes32 coverKey,
string calldata name,
StakingPoolType poolType,
address[] calldata addresses,
uint256[] calldata values
) external;
function closePool(bytes32 coverKey) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 |
Source Code
function closePool(bytes32 coverKey) external;
function deposit(bytes32 coverKey, uint256 amount) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
amount | uint256 |
Source Code
function deposit(bytes32 coverKey, uint256 amount) external;
function withdraw(bytes32 coverKey, uint256 amount) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
amount | uint256 |
Source Code
function withdraw(bytes32 coverKey, uint256 amount) external;
function withdrawRewards(bytes32 coverKey) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 |
Source Code
function withdrawRewards(bytes32 coverKey) external;
function calculateRewards(bytes32 coverKey, address account) external view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
account | address |
Source Code
function calculateRewards(bytes32 coverKey, address account) external view returns (uint256);
Gets the info of a given staking pool by key
function getInfo(bytes32 coverKey, address you) external view
returns(name string, addresses address[], values uint256[])
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | Provide the staking pool key to fetch info for |
you | address | Specify the address to customize the info for |
Source Code
function getInfo(bytes32 coverKey, address you)
external
view
returns (
string memory name,
address[] memory addresses,
uint256[] memory values
);
- AaveStrategy
- AccessControl
- AccessControlLibV1
- Address
- BaseLibV1
- BokkyPooBahsDateTimeLibrary
- BondPool
- BondPoolBase
- BondPoolLibV1
- CompoundStrategy
- Context
- Cover
- CoverBase
- CoverLibV1
- CoverReassurance
- CoverStake
- CoverUtilV1
- cxToken
- cxTokenFactory
- cxTokenFactoryLibV1
- Delayable
- Destroyable
- ERC165
- ERC20
- FakeAaveLendingPool
- FakeCompoundDaiDelegator
- FakePriceOracle
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- FaultyAaveLendingPool
- FaultyCompoundDaiDelegator
- Finalization
- ForceEther
- Governance
- GovernanceUtilV1
- IAaveV2LendingPoolLike
- IAccessControl
- IBondPool
- IClaimsProcessor
- ICompoundERC20DelegatorLike
- ICover
- ICoverReassurance
- ICoverStake
- ICxToken
- ICxTokenFactory
- IERC165
- IERC20
- IERC20Detailed
- IERC20Metadata
- IERC3156FlashBorrower
- IERC3156FlashLender
- IFinalization
- IGovernance
- ILendingStrategy
- ILiquidityEngine
- IMember
- InvalidStrategy
- IPausable
- IPolicy
- IPolicyAdmin
- IPriceOracle
- IProtocol
- IRecoverable
- IReporter
- IResolution
- IResolvable
- IStakingPools
- IStore
- IStoreLike
- IUniswapV2FactoryLike
- IUniswapV2PairLike
- IUniswapV2RouterLike
- IUnstakable
- IVault
- IVaultDelegate
- IVaultFactory
- IWitness
- LiquidityEngine
- MaliciousToken
- MockAccessControlUser
- MockCoverUtilUser
- MockCxToken
- MockCxTokenPolicy
- MockCxTokenStore
- MockFlashBorrower
- MockLiquidityEngineUser
- MockProcessorStore
- MockProcessorStoreLib
- MockProtocol
- MockRegistryClient
- MockStore
- MockStoreKeyUtilUser
- MockValidationLibUser
- MockVault
- MockVaultLibUser
- NPM
- NpmDistributor
- NTransferUtilV2
- NTransferUtilV2Intermediate
- Ownable
- Pausable
- Policy
- PolicyAdmin
- PolicyHelperV1
- PoorMansERC20
- POT
- PriceLibV1
- Processor
- ProtoBase
- Protocol
- ProtoUtilV1
- Recoverable
- ReentrancyGuard
- RegistryLibV1
- Reporter
- Resolution
- Resolvable
- RoutineInvokerLibV1
- SafeERC20
- StakingPoolBase
- StakingPoolCoreLibV1
- StakingPoolInfo
- StakingPoolLibV1
- StakingPoolReward
- StakingPools
- Store
- StoreBase
- StoreKeyUtil
- StrategyLibV1
- Strings
- TimelockController
- Unstakable
- ValidationLibV1
- Vault
- VaultBase
- VaultDelegate
- VaultDelegateBase
- VaultDelegateWithFlashLoan
- VaultFactory
- VaultFactoryLibV1
- VaultLibV1
- VaultLiquidity
- VaultStrategy
- WithFlashLoan
- WithPausability
- WithRecovery
- Witness