sherlock-audit / 2024-06-velocimeter-judging

0 stars 0 forks source link

Sleepy Lace Nightingale - Burn Function is not a prerequisite in ERC20 token standard. #697

Closed sherlock-admin4 closed 1 month ago

sherlock-admin4 commented 1 month ago

Sleepy Lace Nightingale

Low/Info

Burn Function is not a prerequisite in ERC20 token standard.

Summary

In OptionTokenV4.sol the expire function makes use of the burn function, which might revert.

Vulnerability Detail

If the underlyingToken in OptionTokenV4.sol does not implement the burn function, when the admin calls the expire function, it will always revert.

Impact

The contract OptionTokenV4.sol will not be able to burn the underlyingToken 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 the burn function exists on the underlyingToken when deploying OptionTokenV4.sol