IRewardDistributor
Title: IRewardDistributor
Interface for the RewardDistributor contract that allocates staking rewards based on price discrepancy between oracle and Curve pool.
Functions
distributeRewards
Permissionless function to distribute accumulated USDC rewards.
Calculates price discrepancy, acquires tokens, and donates to vaults.
function distributeRewards() external returns (uint256 callerReward);
Returns
| Name | Type | Description |
|---|---|---|
callerReward | uint256 | Amount of USDC sent to caller as incentive. |
previewDistribution
Preview the distribution without executing.
function previewDistribution()
external
view
returns (uint256 bearPct, uint256 bullPct, uint256 usdcBalance, uint256 callerReward);
Returns
| Name | Type | Description |
|---|---|---|
bearPct | uint256 | Expected percentage to BEAR stakers (basis points). |
bullPct | uint256 | Expected percentage to BULL stakers (basis points). |
usdcBalance | uint256 | Current USDC balance available for distribution. |
callerReward | uint256 | Expected caller reward. |
Events
RewardsDistributed
Emitted when rewards are distributed to staking vaults.
event RewardsDistributed(uint256 bearAmount, uint256 bullAmount, uint256 bearPct, uint256 bullPct);
Parameters
| Name | Type | Description |
|---|---|---|
bearAmount | uint256 | Amount of plDXY-BEAR donated to StakedToken. |
bullAmount | uint256 | Amount of plDXY-BULL donated to StakedToken. |
bearPct | uint256 | Percentage of rewards allocated to BEAR stakers (basis points). |
bullPct | uint256 | Percentage of rewards allocated to BULL stakers (basis points). |
Errors
RewardDistributor__DistributionTooSoon
Thrown when distribution is attempted before cooldown expires.
error RewardDistributor__DistributionTooSoon();
RewardDistributor__NoRewards
Thrown when there are no rewards to distribute.
error RewardDistributor__NoRewards();
RewardDistributor__SplitterNotActive
Thrown when the SyntheticSplitter is not in ACTIVE status.
error RewardDistributor__SplitterNotActive();
RewardDistributor__ZeroAddress
Thrown when a constructor parameter is zero address.
error RewardDistributor__ZeroAddress();