RewardMath
Allows computing rewards given some parameters of stakes and incentives
Functions
computeRewardAmount
Compute the amount of rewards owed given parameters of the incentive and stake
Parameters:
Name | Type | Description |
---|---|---|
| uint256 | The total amount of unclaimed rewards left for an incentive |
| uint160 | How many full liquidity-seconds have been already claimed for the incentive |
| uint256 | When the incentive rewards began in epoch seconds |
| uint256 | When rewards are no longer being dripped out in epoch seconds |
| uint128 | The amount of liquidity, assumed to be constant over the period over which the snapshots are measured |
| uint160 | The seconds per liquidity of the liquidity tick range as of the beginning of the period |
| uint160 | The seconds per liquidity of the liquidity tick range as of the current block timestamp |
| uint256 | The current block timestamp, which must be greater than or equal to the start time |
Return Values:
Name | Type | Description |
---|---|---|
| uint256 | The amount of rewards owed |
| uint160 | The total liquidity seconds inside the position's range for the duration of the stake |
Last updated