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
Use Custom error message instead of revert strings
As the code is already using a compiler version >= 0.8.4, there is a more convenient and gas-efficient way to handle revert strings: custom errors. Custom errors decrease both deploy and runtime gas costs. Source: https://blog.soliditylang.org/2021/04/21/custom-errors/
Recommended Mitigation Steps
Refactor code and use Solidity custom errors.
Useless access control check (also a high risk finding)
Use Custom error message instead of revert strings
As the code is already using a compiler version >= 0.8.4, there is a more convenient and gas-efficient way to handle revert strings: custom errors. Custom errors decrease both deploy and runtime gas costs. Source: https://blog.soliditylang.org/2021/04/21/custom-errors/
Recommended Mitigation Steps
Refactor code and use Solidity custom errors.
Useless access control check (also a high risk finding)
The following check is useless: https://github.com/code-423n4/2022-04-mimo/blob/b18670f44d595483df2c0f76d1c57a7bfbfbc083/supervaults/contracts/SuperVault.sol#L83 as anyone could take a flashloan of a tiny amount to call this function with the arguments of its choice. Indeed when taking a flashloan you can choose the target and data to pass to
executeOperation
See https://docs.aave.com/developers/v/2.0/guides/flash-loans:
The text was updated successfully, but these errors were encountered: