Pieces Protocol

First Flight #32
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: high
Invalid

Unsafe ERC20 Operations should not be used

Summary

Unsafe ERC20 Operations should not be used

Vulnerability Details

- Found in src/TokenDivider.sol [Line: 133]()
```solidity
bool transferSuccess = IERC20(erc20).transfer(msg.sender, amount);
```
- Found in src/TokenDivider.sol [Line: 207]()
```solidity
IERC20(tokenInfo.erc20Address).transferFrom(msg.sender,to, amount);
```
- Found in src/TokenDivider.sol [Line: 248]()
```solidity
IERC20(tokenInfo.erc20Address).transferFrom(msg.sender,address(this), amount);
```
- Found in src/TokenDivider.sol [Line: 305]()
```solidity
IERC20(order.erc20Address).transfer(msg.sender, order.amount);
```

Impact

ERC20 functions may not behave as expected

Tools Used

Foundry

Recommendations

It is recommended to use OpenZeppelin's SafeERC20 library.
Updates

Lead Judging Commences

fishy Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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