Assessment reports>StaFi>Threat Models>redelegate

Function: redelegate(uint256 _fromValidatorId, uint256 _toValidatorId, uint256 _amount)

Allows the stake manager to redelegate.

Inputs

  • _fromValidatorId

    • Control: Fully controlled by the stake manager.

    • Constraints: None.

    • Impact: The validator to redelegate from.

  • _toValidatorId

    • Control: Fully controlled by the stake manager.

    • Constraints: None.

    • Impact: The validator to redelegate to.

  • _amount

    • Control: Fully controlled by the stake manager.

    • Constraints: None.

    • Impact: The amount to redelegate.

Branches and code coverage (including function calls)

Intended branches

  • Should call migrateDelegation on the gov stake manager with the given parameters.

Negative behavior

  • Should not be callable by anyone other than the stake manager. Ensured through onlyStakeManager.

Function call analysis

  • govStakeManager.migrateDelegation(_fromValidatorId, _toValidatorId, _amount)

    • What is controllable? fromValidatorId, toValidatorId, and amount.

    • 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? Then the redelegate will fail.

Zellic © 2024Back to top ↑