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

Function: _receiveVotingResults(uint128 wTime, address[] markets, uint256[] anzenAmounts)

This function is used to receive voting results from VotingController and add these results to the market reward data. Only the first message for a timestamp will be accepted; all subsequent messages will be ignored.

Inputs

  • wTime

    • Control: Arbitrary.

    • Constraints: Receive voting results only from VotingController.

    • Impact: A timestamp indicating the voting result.

  • markets

    • Control: Arbitrary.

    • Constraints: Receive voting results only from VotingController.

    • Impact: An array representing the market addresses.

  • anzenAmounts

    • Control: Arbitrary.

    • Constraints: Receive voting results only from VotingController.

    • Impact: An array representing the number of Anzen rewards for the corresponding market.

Branches and code coverage

Intended branches

  • Ensure that the voting result of each timestamp is only received once.

  • Iterate over the markets array, merge new rewards with existing rewards, and update the market's reward rate and status.

Negative behavior

  • Revert if the markets and anzenAmounts arrays are not of equal length.

Zellic © 2025Back to top ↑