Assessment reports>Staking>Threat Model>stakeLp

Function: stakeLp(address _amount, uint256 _gsPool)

Allows msg.sender to stake lp on behalf of msg.sender.

Inputs

  • _amount

    • Control: Fully controlled by the handler.

    • Constraints: None.

    • Impact: Amount to be staked.

  • _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

  • Allows msg.sender to stake lp.

  • Calls IRewardTracker.stakeForAccount with lp tracker.

  • Calls IRewardTracker.stakeForAccount with bonus tracker.

  • Calls IRewardTracker.stakeForAccount with fee tracker.

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

Negative behavior

  • Should not allow calling an unregistered pool.

Zellic © 2024Back to top ↑