Add custom errors to avoid underflows/overflows
Alexangelj opened this issue · comments
Alexander commented
Functions like computeMaxInput
in RMM01Portfolio.sol will revert with underflows if the arguments are not within some bounds. This function should have a custom error for this instead of relying on the overflow/underflow reverts, since those are extremely hard to find the location they were thrown and debug in general.