Assessment reports>Prisma Finance>Threat Models>registerAccountWeightAndVote

Function: registerAccountWeightAndVote(address account, uint256 minWeeks, Vote[] votes)

Record the current lock weights for account and submit new votes.

Inputs

  • account

    • Control: Controlled by the user.

    • Constraints: N/A.

    • Impact: The voting power of this account is registered.

  • minWeeks

    • Control: Controlled by the user.

    • Constraints: Must be a nonnegative integer.

    • Impact: The minimum number of weeks-to-unlock to record weights for.

  • votes

    • Control: Controlled by the user.

    • Constraints: N/A.

    • Impact: Array of tuples of vote data (recipient ID, vote points).

Branches and code coverage (including function calls)

Intended branches

  • Successful with recording for an account and voting.

Negative behavior

  • Test with an account that has no active locks.

Zellic © 2025Back to top ↑