Closed sherlock-admin4 closed 1 month ago
Sleepy Lace Nightingale
Low/Info
In OptionTokenV4.sol the expire function makes use of the burn function, which might revert.
OptionTokenV4.sol
expire
burn
If the underlyingToken in OptionTokenV4.sol does not implement the burn function, when the admin calls the expire function, it will always revert.
underlyingToken
The contract OptionTokenV4.sol will not be able to burn the underlyingToken tokens as it was supposed to.
calling burn on underlyingToken
Manual Review
Either handle the revertion gracefully and consider transferring the tokens to an unreachable address e.g. 0xdead Or validate that the burn function exists on the underlyingToken when deploying OptionTokenV4.sol
0xdead
Sleepy Lace Nightingale
Low/Info
Burn Function is not a prerequisite in ERC20 token standard.
Summary
In
OptionTokenV4.sol
theexpire
function makes use of theburn
function, which might revert.Vulnerability Detail
If the
underlyingToken
inOptionTokenV4.sol
does not implement theburn
function, when the admin calls theexpire
function, it will always revert.Impact
The contract
OptionTokenV4.sol
will not be able to burn theunderlyingToken
tokens as it was supposed to.Code Snippet
calling burn on underlyingToken
Tool used
Manual Review
Recommendation
Either handle the revertion gracefully and consider transferring the tokens to an unreachable address e.g.
0xdead
Or validate that theburn
function exists on theunderlyingToken
when deployingOptionTokenV4.sol