Submitted by CertoraInc
FuseTokenAdapterV1.sol#L76
FuseTokenAdapterV1.sol#L98
The code is doing wrong check, so when things will work it will revert.
In the function wrap() there is this lines:
but mint returns the amount that minted, so when error = amount the check will fail even though it worked good.
Same in unwrap:
the redeem returns the amount.
I recommend to change the lines like this:
in wrap:
if ((error = ICERC20(token).mint(amount)) != amount) { revert FuseError(error); }
and in unwrap:
if ((error = ICERC20(token).redeem(amount)) != amount) { revert FuseError(error); }
0xfoobar (Alchemix) confirmed, disagreed with severity and commented:
0xleastwood (judge) decreased severity to Medium and commented:
