Pool interface

IPool

this defines the core Pool contract interface



stakingTokens() → address[] (external)

Returns

  • staking tokens for Pool


rewardTokens() → address[] (external)

Returns

  • reward tokens for Pool


stakingBalances(address user) → uint256[] (external)

Returns

  • staking balances for user


stakingTotals() → uint256[] (external)

Returns

  • total staking balances for Pool


rewardBalances() → uint256[] (external)

Returns

  • reward balances for Pool


usage() → uint256 (external)

Returns

  • GYSR usage ratio for Pool


stakingModule() → address (external)

Returns

  • address of staking module


rewardModule() → address (external)

Returns

  • address of reward module


stake(uint256 amount, bytes stakingdata, bytes rewarddata) (external)

stake asset and begin earning rewards

Parameters

  • amount: number of tokens to stake

  • stakingdata: data passed to staking module

  • rewarddata: data passed to reward module



unstake(uint256 amount, bytes stakingdata, bytes rewarddata) (external)

unstake asset and claim rewards

Parameters

  • amount: number of tokens to unstake

  • stakingdata: data passed to staking module

  • rewarddata: data passed to reward module



claim(uint256 amount, bytes stakingdata, bytes rewarddata) (external)

claim rewards without unstaking

Parameters

  • amount: number of tokens to claim against

  • stakingdata: data passed to staking module

  • rewarddata: data passed to reward module



update(bytes stakingdata, bytes rewarddata) (external)

method called ad hoc to update user accounting

Parameters

  • stakingdata: data passed to staking module

  • rewarddata: data passed to reward module



clean(bytes stakingdata, bytes rewarddata) (external)

method called ad hoc to clean up and perform additional accounting

Parameters

  • stakingdata: data passed to staking module

  • rewarddata: data passed to reward module



gysrBalance() → uint256 (external)

Returns

  • gysr balance available for withdrawal


withdraw(uint256 amount) (external)

withdraw GYSR tokens applied during unstaking

Parameters

  • amount: number of GYSR to withdraw


transferControlStakingModule(address newController) (external)

transfer control of the staking module to another account

Parameters

  • newController: address of new controller


transferControlRewardModule(address newController) (external)

transfer control of the reward module to another account

Parameters

  • newController: address of new controller


multicall(bytes[] data) → bytes[] results (external)

execute multiple operations in a single call

Parameters

  • data: array of encoded function data