Assessment reports>Staking>Threat Model>unstakeLpForAccount

Function: unstakeLpForAccount(address _account, address _gsPool, uint256 _amount)

Allows handler to unstake lp on behalf of account.

Inputs

  • _account

    • Control: Fully controlled by the handler.

    • Constraints: None.

    • Impact: lp is unstaked on behalf of _account.

  • _gsPool

    • Control: Fully controlled by the handler.

    • Constraints: None; should be a registered pool.

    • Impact: The pool to unstake from.

  • _amount

    • Control: Fully controlled by the handler.

    • Constraints: None.

    • Impact: Amount to be unstaked.

Branches and code coverage (including function calls)

Intended branches

  • Unstakes from gsPool for account's reward tracker.

  • Acts on behalf of _account.

  • Assumes all other relevant checks are performed in IRewardTracker.unstakeForAccount.

Negative behavior

  • Should not allow calling an unregistered pool.

  • Should not be callable by anyone other than the handler.

Zellic © 2024Back to top ↑