Linear Distribution Interval Decrease
LinearDistributionIntervalDecrease.sol
is a custom library used by Distribution
to calculate MOR token rewards for a specified period. It supports linear distribution schedules with stepped decreases at regular intervals.
Functions
getPeriodReward
Calculates and returns the reward amount for a given period and distribution parameters. The calculation accounts for partial intervals pro rata.
Parameters
Name | Type | Description |
---|---|---|
| uint256 | The initial reward amount per interval. |
| uint256 | The amount by which the reward decreases each interval. |
| uint128 | The timestamp at which the distribution schedule starts. |
| uint128 | The duration of each interval in seconds. |
| uint128 | The timestamp at which the period starts. |
| uint128 | The timestamp at which the period ends. |
Return Values
Type | Description |
---|---|
uint256 | The reward for the specified period. |
Last updated
Was this helpful?