Skip to content

rewards pool contracts

RewardsPool Contract: Reward Token Distribution

RewardsPool handles the distribution of a single token to a parent pool such as the SDLPool. A parent pool may control multiple RewardsPools if stakers receive rewards in the form of multiple different tokens.

Returns the address of the rewards token this pool distributes

function token() external view returns (address)
Name Type Description
token address Address of rewards token

Returns an account’s total unclaimed rewards

function withdrawableRewards(address _account) public view returns (uint256)
Name Type Description
_account address Address of account
Name Type Description
rewards uint256 Total unclaimed rewards

Withdraws the sender’s unclaimed rewards

function withdraw() external

Withdraws an account’s unclaimed rewards

function withdraw(address _account) external
Name Type Description
_account address Account to withdraw for

ERC677 implementation that receives rewards and distributes them

function onTokenTransfer(address, uint256, bytes) external

Distributes new rewards that have been deposited

function distributeRewards() public

Updates an account’s principal reward balance

function updateReward(address _account) public
Name Type Description
_account address Address of account