Function: withdraw(uint256 _pid, uint256 _amount)
Passthrough function for _withdraw
, which sets from
and to
to msg.sender
.
Inputs
_pid
Control: Arbitrary.
Constraints: Must be a a valid pool ID in
poolInfo
.Impact: Decides the token to withdraw and the gauge to withdraw it from. This removes LP balance by burning
amount
frommsg.sender
and transfers LP tokens back tomsg.sender
.
_amount
Control: Arbitrary.
Constraints: Cannot exceed the amount of LP balance the sender is allowed to burn.
Impact: The amount of LP balance to exchange for LP tokens.
Branches and code coverage (including function calls)
Intended branches
Withdraw from pool.
Withdraw from this contract (in case of shutdown).
Withdraw when a stash is defined.
Negative behavior
Withdraw while pool is shut down.
Withdraw under a full shutdown.
Withdraw more than the sender has.