Assessment reports>H20 vlPSDN>Threat Models>moveRewardsToLock

Function: moveRewardsToLock(address[] tokens, uint256[] amounts)

Transfers tokens from the contract to the vlPsdn address.

Inputs

  • tokens

    • Control: Controlled by the caller.

    • Constraints: None.

    • Impact: Decides what tokens are transferred into vlPsdn.

  • amounts

    • Control: Controlled by the caller.

    • Constraints: None.

    • Impact: Dictates the amount of each token transferred.

Branches and code coverage (including function calls)

Intended branches

  • Should successfully transfer tokens if the caller has the REWARDS_ROLE role.

Negative behavior

  • Should revert if the caller does not have the REWARDS_ROLE role.

Function call analysis

  • moveRewardsToLock -> IERC20(tokens[i]).safeTransfer

    • What is controllable? Callee and arguments are controllable.

    • If return value controllable, how is it used and how can it go wrong? N/A.

    • What happens if it reverts, reenters, or does other unusual control flow? N/A.

Zellic © 2023Back to top ↑