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 unstakeesGsb
.All underlying unstake functions are called (
feeTracker
,bonusTracker
, andrewardTracker
).If
shouldReduceBnGs
is true, should increase the amount ofbnGs
staked bymsg.sender
.Assumes all other relevant checks are performed in
IRewardTracker.unstakeForAccount
,IRewardTracker.claimForAccount
, andIRestrictedToken.burn
.
Negative behavior
Should not allow unstaking more than the staked amount.
Should not allow unstaking zero amount.