lst rewards splitter contracts
LSTRewardsSplitter Contract: Split LST Staking Rewards
The LSTRewardsSplitter enables an account to deposit LSTs and split any earned rewards between itself and other addresses.
View Functions
Section titled “View Functions”controller
Section titled “controller”Returns the address of the controller contract
function controller() external view returns (address)Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| controller | address | address of LSTRewardsSplitterController |
Returns the address of the liquid staking token handled by this contract
function lst() external view returns (address)Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| lst | address | address of LST |
principalDeposits
Section titled “principalDeposits”Returns the total number of tokens deposited without rewards
function stakingPool() external view returns (uint256)Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| principalDeposits | uint256 | total principal deposits |
checkUpkeep
Section titled “checkUpkeep”Returns whether a call should be made to performUpkeep to split new rewards
function checkUpkeep(bytes) external view returns (bool, bytes)Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| upkeepNeeded | bool | true if performUpkeep should be called, false otherwise |
| bytes |
getFees
Section titled “getFees”Returns a list of all fees
function getFees() external view returns (struct LSTRewardsSplitter.Fee[])Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| fees | struct LSTRewardsSplitter.Fee[] | list of fees |
Write Functions
Section titled “Write Functions”deposit
Section titled “deposit”Deposits tokens
function deposit(uint256 _amount) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| _amount | uint256 | amount to deposit |
withdraw
Section titled “withdraw”Withdraws tokens
function withdraw(uint256 _amount, address _receiver) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| _amount | uint256 | amount to withdraw |
| _receiver | address | address to receive tokens |
performUpkeep
Section titled “performUpkeep”Splits new rewards between fee receivers
function performUpkeep(bytes) externalsplitRewards
Section titled “splitRewards”Splits new rewards between fee receivers
Bypasses rewardThreshold
function splitRewards() externaladdFee
Section titled “addFee”Adds a new fee
function addFee(address _receiver, uint256 _feeBasisPoints) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| _receiver | address | receiver of fee |
| _feeBasisPoints | uint256 | fee in basis points |
updateFee
Section titled “updateFee”Updates an existing fee
function updateFee(uint256 _index, address _receiver, uint256 _feeBasisPoints) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| _index | uint256 | index of fee |
| _receiver | address | receiver of fee |
| _feeBasisPoints | uint256 | fee in basis points |