RewardMath

Allows computing rewards given some parameters of stakes and incentives

Functions

computeRewardAmount

  function computeRewardAmount(
    uint256 totalRewardUnclaimed,
    uint160 totalSecondsClaimedX128,
    uint256 startTime,
    uint256 endTime,
    uint128 liquidity,
    uint160 secondsPerLiquidityInsideInitialX128,
    uint160 secondsPerLiquidityInsideX128,
    uint256 currentTime
  ) internal pure returns (uint256 reward, uint160 secondsInsideX128)

Compute the amount of rewards owed given parameters of the incentive and stake

Parameters:

Return Values:

Last updated