Function: _withdraw(address _caller, address _receiver, address _owner, uint256 _assets, uint256 _shares)
This function overrides ERC4626 _withdraw to add donation attack protection.
Inputs
_callerControl: Full control.
Constraints: None.
Impact: People whose shares were taken away.
_receiverControl: Full control.
Constraints: None.
Impact: People who receive assets.
_ownerControl: Full control.
Constraints: Must equal
_calleror grant sufficient allowance for the burn.Impact: The account whose shares are burned and whose allowance may be consumed.
_assetsControl: Full control.
Constraints: Cannot exceed vault liquidity and must match the share-to-asset exchange rate.
Impact: The amount of the underlying token used for the Vault for accounting, depositing, and withdrawing.
_sharesControl: Full control.
Constraints: None.
Impact: The amount of tokens in the vault. Has a ratio of underlying assets exchanged on mint/deposit/withdraw/redeem (as defined by the Vault).
Branches and code coverage
Intended branches
Negative behavior