sherlock-audit / 2022-09-knox-judging

0 stars 0 forks source link

GalloDaSballo - M-05 Not using safeTransfer may prevent certain tokens from working #130

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

GalloDaSballo

medium

M-05 Not using safeTransfer may prevent certain tokens from working

Summary

Non Standard ERC20, that have no return value on transfer or approve will not work with the codebase.

function transfer(address, uint256);

Because the solidity compiler will add a check for a non-zero return and those tokens return 0, the tx will revert.

Vulnerability Detail

Impact

Because of the different interface and the extra compiler checks, those tokens will not be compatible with the system

Code Snippet

Tool used

Manual Review

Recommendation

Use safeTransfer to make the code compatible with all ER20s on mainnet