Verifying if an ERC4626 wrapper returned the correct amount of tokens is an expensive task in terms of gas and bytecode, and is only effective in the scenario in which the buffer has liquidity, but not enough to do the wrap/unwrap operation (situation in which we need to compare the convert and actual operations). This PR removes this verification, which removes 700 bytes from the Vault code.
A fuzz test of ERC4626 wrappers will compensate for the lack of this verification.
Type of change
[ ] Bug fix
[ ] New feature
[ ] Breaking change
[ ] Dependency changes
[x] Code refactor / cleanup
[ ] Optimization: [ ] gas / [ ] bytecode
[ ] Documentation or wording changes
[ ] Other
Checklist:
[x] The diff is legible and has no extraneous changes
[x] Complex code has been commented, including external interfaces
[x] Tests have 100% code coverage
[x] The base branch is either main, or there's a description of how to merge
Description
Verifying if an ERC4626 wrapper returned the correct amount of tokens is an expensive task in terms of gas and bytecode, and is only effective in the scenario in which the buffer has liquidity, but not enough to do the wrap/unwrap operation (situation in which we need to compare the convert and actual operations). This PR removes this verification, which removes 700 bytes from the Vault code.
A fuzz test of ERC4626 wrappers will compensate for the lack of this verification.
Type of change
Checklist:
main
, or there's a description of how to merge