Assessment reports>Anzen and protocol-v2>Threat Model>updateRewardPool

Function: updateRewardPool(uint8 _pid, uint256 _endRewardTime, uint256 _rewardPerSecond)

This function is used by the owner to update the state of the rewardPool for a specific _pid.

Inputs

  • _pid

    • Control: Arbitrary.

    • Constraints: Greater than or equal to zero and less than 256.

    • Impact: Index of rewardPool.

  • _endRewardTime

    • Control: Arbitrary.

    • Constraints: Greater than or equal to block.timestamp.

    • Impact: Time that rewardPool distribution ends.

  • _rewardPerSecond

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Reward-token amount to distribute per second.

Branches and code coverage

Intended branches

  • Update the state variables of the rewardPool with index _pid.

Negative behavior

  • Revert if endRewardTime is greater than or equal to block.timestamp.

Zellic © 2025Back to top ↑