Closed code423n4 closed 2 years ago
WatchPug
Calling ERC20.transfer() without handling the returned value is unsafe.
ERC20.transfer()
https://github.com/code-423n4/2021-12-amun/blob/cf890dedf2e43ec787e8e5df65726316fda134a1/contracts/basket/contracts/singleJoinExit/SingleNativeTokenExitV2.sol#L104-L104
outputToken.transfer(msg.sender, outputTokenBalance);
Consider using OpenZeppelin's SafeERC20 library with safe versions of transfer functions.
SafeERC20
duplicate #232
Duplicate of #192
Handle
WatchPug
Vulnerability details
Calling
ERC20.transfer()
without handling the returned value is unsafe.https://github.com/code-423n4/2021-12-amun/blob/cf890dedf2e43ec787e8e5df65726316fda134a1/contracts/basket/contracts/singleJoinExit/SingleNativeTokenExitV2.sol#L104-L104
Recommendation
Consider using OpenZeppelin's
SafeERC20
library with safe versions of transfer functions.