IStakingRewardCalculator
The IStakingRewardCalculator
provides an interface that can be implemented for calculating extra staking rewards.
Usage¶
calculateStakingReward
function calculateStakingReward(address _owner, uint256 _tokenId, uint256 _reward) external view returns (uint256);
- Calculate the staking reward based on the base reward and a potential multiplier. Calculation defined by implementer.
_owner
: The owner of the token._tokenId
: The ID of the token._reward
: The base reward.- Returns the new reward.
Example¶
See TokenIdStakingRewardCalculator for an example.