Assessment reports>TruFin Injective Staker>Threat Model>Message: ExecuteMsg::DistributeRewards

Message: ExecuteMsg::DistributeRewards

This distributes staking rewards from the sender to a specified recipient based on the current allocation and share price.

Inputs

  • info.sender

    • Validation: Verified to ensure the sender is whitelisted. Confirmed to have at least one allocation.

    • Impact: Acts as the distributor of rewards.

  • recipient

    • Validation: Ensures the recipient address is valid. Confirms the sender has an allocation to the specified recipient.

    • Impact: Receives distributed rewards.

  • in_inj

    • Validation: N/A.

    • Impact: Determines if the rewards should be distributed in INJ.

  • info.funds

    • Validation: If provided, ensures it is handled correctly, either as additional rewards or refunded if not required.

    • Impact: May be redistributed or refunded to the sender.

Branches and code coverage (including function calls)

Intended branches

  • Distribute rewards to the recipient based on the allocation and share price.

  • Handle cases where no rewards are available for distribution.

  • Refund unused INJ back to the sender.

Negative behavior

  • Fail if the contract is paused.

  • Fail if the sender is not whitelisted.

  • Fail if the recipient address is invalid.

  • Fail if no allocations exist for the sender.

  • Fail if there is no allocation to the specified recipient.

Zellic © 2025Back to top ↑