Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Unsafe ERC20 Operations should not be used

Summary

ERC20 functions may not behave as expected.

Vulnerability Details

  • Found in src/RapBattle.sol Line: 46

    oneShotNft.transferFrom(msg.sender, address(this), _tokenId);
  • Found in src/RapBattle.sol Line: 47

    credToken.transferFrom(msg.sender, address(this), _credBet);
  • Found in src/RapBattle.sol Line: 72

    credToken.transfer(_defender, defenderBet);
  • Found in src/RapBattle.sol Line: 73

    credToken.transferFrom(msg.sender, _defender, _credBet);
  • Found in src/RapBattle.sol Line: 76

    credToken.transfer(msg.sender, _credBet);
  • Found in src/RapBattle.sol Line: 80

    oneShotNft.transferFrom(address(this), _defender, defenderTokenId);
  • Found in src/Streets.sol Line: 34

    oneShotContract.transferFrom(msg.sender, address(this), tokenId);
  • Found in src/Streets.sol Line: 80

    oneShotContract.transferFrom(address(this), msg.sender, tokenId);

Impact

This contract has weird ERC20s in the protocol making it susceptible to an attack.

Tools Used

Aderyn

Recommendations

It is recommended to use OpenZeppelin's SafeERC20 library.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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