Assessment reports>Staking>Threat Model>unstakeEsGsb

Function: unstakeEsGsb(uint256 _amount)

Allows msg.sender to unstake esGsb.

Inputs

  • _amount

    • Control: Fully controlled by the handler.

    • Constraints: None.

    • Impact: Amount to be unstaked.

Branches and code coverage (including function calls)

Intended branches

  • Allows msg.sender to unstake esGsb.

  • All underlying unstake functions are called (feeTracker, bonusTracker, and rewardTracker).

  • If shouldReduceBnGs is true, should increase the amount of bnGs staked by msg.sender.

  • Assumes all other relevant checks are performed in IRewardTracker.unstakeForAccount, IRewardTracker.claimForAccount, and IRestrictedToken.burn.

Negative behavior

  • Should not allow unstaking more than the staked amount.

  • Should not allow unstaking zero amount.

Zellic © 2024Back to top ↑