Assessment reports>Staking>Threat Model>stakeLpForAccount

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

Allows handler to stake lp on behalf of account.

Inputs

  • _account

    • Control: Fully controlled by the handler.

    • Constraints: None.

    • Impact: lp is staked on behalf of _account.

  • _amount

    • Control: Fully controlled by the handler.

    • Constraints: None.

    • Impact: lp is staked on behalf of _account.

  • _gsPool

    • Control: Fully controlled by the handler.

    • Constraints: None --- should be a registered pool.

    • Impact: The pool to stake in.

Branches and code coverage (including function calls)

Intended branches

  • Stake on behalf of address(this) for account.

  • Call IRewardTracker.stakeForAccount with lp tracker.

  • Call IRewardTracker.stakeForAccount with bonus tracker.

  • Call IRewardTracker.stakeForAccount with fee tracker.

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

Negative behavior

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

  • Should not allow calling an unregistered pool.

Zellic © 2024Back to top ↑