View Source: contracts/interfaces/IStakingPools.sol
↗ Extends: IMember ↘ Derived Contracts: StakingPoolBase
IStakingPools
Enums
enum StakingPoolType {
TokenStaking,
PODStaking
}
struct AddOrEditPoolArgs {
bytes32 key,
string name,
enum IStakingPools.StakingPoolType poolType,
address stakingToken,
address uniStakingTokenDollarPair,
address rewardToken,
address uniRewardTokenDollarPair,
uint256 stakingTarget,
uint256 maxStake,
uint256 platformFee,
uint256 rewardPerBlock,
uint256 lockupPeriod,
uint256 rewardTokenToDeposit
}
struct StakingPoolInfoType {
string name,
address stakingToken,
address stakingTokenStablecoinPair,
address rewardToken,
address rewardTokenStablecoinPair,
uint256 totalStaked,
uint256 target,
uint256 maximumStake,
uint256 stakeBalance,
uint256 cumulativeDeposits,
uint256 rewardPerBlock,
uint256 platformFee,
uint256 lockupPeriod,
uint256 rewardTokenBalance,
uint256 accountStakeBalance,
uint256 totalBlockSinceLastReward,
uint256 rewards,
uint256 canWithdrawFromBlockHeight,
uint256 lastDepositHeight,
uint256 lastRewardHeight
}
Events
event PoolUpdated(bytes32 indexed key, struct IStakingPools.AddOrEditPoolArgs args);
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(struct IStakingPools.AddOrEditPoolArgs args)
- closePool(bytes32 key)
- deposit(bytes32 key, uint256 amount)
- withdraw(bytes32 key, uint256 amount)
- withdrawRewards(bytes32 key)
- calculateRewards(bytes32 key, address account)
- getInfo(bytes32 key, address you)
Adds or edits the pool by key
function addOrEditPool(struct IStakingPools.AddOrEditPoolArgs args) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
args | struct IStakingPools.AddOrEditPoolArgs |
Source Code
function addOrEditPool(AddOrEditPoolArgs calldata args) external;
function closePool(bytes32 key) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 |
Source Code
function closePool(bytes32 key) external;
function deposit(bytes32 key, uint256 amount) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | |
amount | uint256 |
Source Code
function deposit(bytes32 key, uint256 amount) external;
function withdraw(bytes32 key, uint256 amount) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | |
amount | uint256 |
Source Code
function withdraw(bytes32 key, uint256 amount) external;
function withdrawRewards(bytes32 key) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 |
Source Code
function withdrawRewards(bytes32 key) external;
function calculateRewards(bytes32 key, address account) external view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | |
account | address |
Source Code
function calculateRewards(bytes32 key, address account) external view returns (uint256);
Gets the info of a given staking pool by key
function getInfo(bytes32 key, address you) external view
returns(info struct IStakingPools.StakingPoolInfoType)
Arguments
Name | Type | Description |
---|---|---|
key | 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 key, address you) external view returns (StakingPoolInfoType memory info);
- 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
- FakeCompoundStablecoinDelegator
- FakePriceOracle
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- FaultyAaveLendingPool
- FaultyCompoundStablecoinDelegator
- 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
- INeptuneRouterV1
- 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
- NeptuneRouterV1
- 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