Closed codehawks-bot closed 1 year ago
Medium Risk
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DSCEngine.sol#L157
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DSCEngine.sol#L274
safetransferFrom in place of transferFrom.
safeTransfer just ensures that if the destination address is a contract that it has the ability to transfer the token again.
Token can get locked by accident if the contract in which tokens send can't send back.
Manually
Use safetransferFrom in place of transferFrom.
Known
safetransferFrom
Severity
Medium Risk
Relevant GitHub Links
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DSCEngine.sol#L157
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DSCEngine.sol#L274
Summary
safetransferFrom in place of transferFrom.
Vulnerability Details
safeTransfer just ensures that if the destination address is a contract that it has the ability to transfer the token again.
Impact
Token can get locked by accident if the contract in which tokens send can't send back.
Tools Used
Manually
Recommendations
Use safetransferFrom in place of transferFrom.