Comment on page
The escrow contract responsible for dripping RING into the staking rewards
The RingRewardsDistributor contract is responsible for sending rewards to the RingStakingRewards contract with weekly frequency.
The release schedule for the total reward amount R of RING is a linearly decreasing RING distribution. The distribution function is:
This function has a duration of d before it hits a 0 distribution rate. The area under the curve is R, because the y-intercept is 2R/d, by simply multiplying base times height times 1/2.
Set the "unreleased function" U(t) equal to the area under this curve between the current elapsed time t and the total duration d. Note that for t=d the output is equal to 0 as all of the RING should be released. The formula is:
Sent RING to the RingStakingRewards contract
A withdrawal of RING from the distributor
Change the drip frequency
Change in the RUSD reward for dripping
A change in the staking contract to send RING to.
function incentiveAmount() external view returns (uint256);
Returns the amount of RUSD sent to the caller of
function dripFrequency() external view returns (uint256);
The minimum frequency allowed between rewards distribution.
function isDripAvailable() external view returns (bool);
Returns true if
nextDripAvailable()preceeds the current block timestamp
function nextDripAvailable() external view returns (uint256);
The next block timestamp when reward distribution is allowed by the contract. Equals
lastDistributionTime() + dripFrequency()
function lastDistributionTime() external view returns (uint256);
The last block timestamp when rewards were distributed from the contract.
function stakingContract() external view returns (IStakingRewards);
function totalReward() external view returns (uint256);
Returns the total amount of rewards released over the entire window, including claimed, released, and unreleased.
function releasedReward() external view returns (uint256);
Returns the amount of
rewardTokenavailable for claiming by the pool. Calculated as
rewardBalance() - unreleasedReward().
function unreleasedReward() external view returns (uint256);
The unreleased reward function following the formula shown in the Release Schedule section above. It starts at the
totalReward()amount and then wind down to 0 over the
durationof the window.
function rewardBalance() external view returns (uint256);
function distributedRewards() external view returns (uint256);
function drip() external returns (uint256);
function governorWithdraw(uint256 amount) external;
function governorRecover(address tokenAddress, address to, uint256 amount) external;
tokenAddressERC20 tokens from the RingStakingRewards contract to address
to. This is used if there were AMM rewards distributed.
function setDripFrequency(uint256 _frequency) external;
Sets the frequency with which the contract calls the RingStakingRewards.
function setIncentiveAmount(uint256 _incentiveAmount) external;
Sets the incentive amount for calling
function setStakingContract(address _stakingRewards) external;
Sets the staking contract to send RING to.
RewardsDistributor Interface ABI