You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
redeem does not check if the _minAmount asset requirement is met. The other three similar functions check if the assets amount is at least _minAmount.
Technical Details
deposit() and mint() verify the deposit amount is greater than minDeposit while withdraw() checks that the asset amount is greater than the user-specified _minAmount before transferring tokens. redeem() does have a comparable minimum value check before assets are transferred.
Impact
Informational.
Recommendation
Consider adding the line if (_assets < _minAmount) revert Errors.InsufficientAssets(); into redeem() to keep the GVault consistent with how it uses _minAmount.
The text was updated successfully, but these errors were encountered:
challenged: Not and issue
reasoning: the EIP-4626 compatible withdraw functions do not use the user specified minAmount, only the added withdraw function does. We dont really see any need to implement a secondary redeem function that uses minAmount to protect against potential slippage
redeem
does not check if the_minAmount
asset requirement is met. The other three similar functions check if the assets amount is at least_minAmount
.Technical Details
deposit()
andmint()
verify the deposit amount is greater thanminDeposit
whilewithdraw()
checks that the asset amount is greater than the user-specified_minAmount
before transferring tokens.redeem()
does have a comparable minimum value check before assets are transferred.Impact
Informational.
Recommendation
Consider adding the line
if (_assets < _minAmount) revert Errors.InsufficientAssets();
intoredeem()
to keep the GVault consistent with how it uses_minAmount
.The text was updated successfully, but these errors were encountered: