Assessment reports>WOOFI Stake>Threat Model>compound

Function: compound(uint256 start, uint256 end)

This is a utility function for compounding a range of users. Replicates the range logic from allUsers(start, end). This is an admin-only function.

Inputs

  • start

    • Control: Fully controllable by the admin.

    • Constraints: Should be less than end and strictly less than the length of the users set.

    • Impact: The index of the first address to include in the compound.

  • end

    • Control: Fully controllable by the admin.

    • Constraints: Should be larger than start and up to the length of the users set.

    • Impact: The index to stop at (and not include) when compounding.

Branches and code coverage

Intended branches

  • Called by admin for a single user.

  • Called by admin with >1 users.

Negative behavior

  • Called by non-admin.

  • Called with invalid indexes or start>end.

Zellic © 2024Back to top ↑