Function: withdraw(uint256 assets, address receiver, address _owner)
This burns shares from the owner and sends exactly assets of underlying tokens to the receiver.
Inputs
assetsControl: Full.
Constraints: Must be less than or equal to the max withdrawable assets for the owner.
Impact: The amount of underlying assets that will be transferred to the receiver.
receiverControl: Full.
Constraints: Needs to be a valid, nonzero address.
Impact: Address to receive assets.
_ownerControl: Full.
Constraints: Needs to be a valid, nonzero address.
Impact: Address of the owner.
Branches and code coverage (including function calls)
Intended branches
Should burn shares when withdrawing with LP tokens.
Should return correct result for
previewWithdraw()with zero outstanding shares.Should return total LP tokens when calling
maxWithdraw().
Negative behavior
withdraw()should revert when in safe harbor mode.previewWithdraw()should not revert when in safe harbor mode.maxWithdraw()should not revert when in safe harbor mode.
Function call analysis
rootFunction -> maxWithdraw(address)What is controllable? N/A.
If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? N/A.
rootFunction -> previewWithdraw(uint256)What is controllable? N/A.
If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? N/A.