15,000 USDC
View results
Submission Details
Severity: low

Large transfers may not work with some ERC20 tokens

Summary

Some IERC20 implementations (e.g UNI, COMP) may fail if the valued transferred is larger than uint96. Source.

Vulnerability Details

bool success = IERC20(tokenCollateralAddress).transferFrom(msg.sender, address(this), amountCollateral);

https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DSCEngine.sol#L157

bool success = IERC20(tokenCollateralAddress).transfer(to, amountCollateral);

https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DSCEngine.sol#L287

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.