Function: unstakeEsGs(uint256 _amount)
Allows msg.sender
to unstake esGs
.
Inputs
_amount
Control: Fully controlled by handler.
Constraints: None.
Impact: Amount to be unstaked.
Branches and code coverage (including function calls)
Intended branches
Allows
msg.sender
to unstakeesGs
.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.