Trader Joe contest - bobi's results

One-stop-shop decentralized trading on Avalanche.

General Information

Platform: Code4rena

Start Date: 25/01/2022

Pot Size: $50,000 USDT

Total HM: 17

Participants: 39

Period: 3 days

Judge: LSDan

Total Solo HM: 9

Id: 79

League: ETH

Trader Joe

Findings Distribution

Researcher Performance

Rank: 30/39

Findings: 3

Award: $117.20

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Findings Information

Labels

bug
duplicate
2 (Med Risk)

Awards

60.3184 USDT - $60.32

External Links

Handle

bobi

Vulnerability details

Impact

There are some transferFrom() and transfer() calls without checking the results(eg. against reverting). Moreover, for certain ERC20 tokens, should insufficient tokens be present, no revert occurs whatsoever, and instead, a "false" value is returned, which should definitely be checked. It’s important to check for this since doing otherwise would technically mean that you are skipping over a transfer() error, which is, by all means, dangerous and will result in funds lost.

Proof of Concept

Transfers can be found at:

LaunchEvent.sol::461 => token.transfer(msg.sender, amount);
LaunchEvent.sol::467 => pair.transfer(msg.sender, balance);
LaunchEvent.sol::493 => token.transfer(msg.sender, amount);
LaunchEvent.sol::517 => token.transfer(issuer, balance);
LaunchEvent.sol::543 => token.transfer(penaltyCollector, excessToken);
LaunchEvent.sol::549 => WAVAX.transfer(penaltyCollector, excessWavax);
RocketJoeFactory.sol::133 => IERC20(_token).transferFrom(msg.sender, launchEvent, _tokenAmount);
RocketJoeStaking.sol::195 => rJoe.transfer(_to, rJoeBal);
RocketJoeStaking.sol::197 => rJoe.transfer(_to, _amount);

Tools Used

Manual analysis.

Best mitigation is to consider using OpenZeppelin's SafeERC20 library with safe versions of transfer functions.

#0 - cryptofish7

2022-02-11T00:48:03Z

Duplicate of #12

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax Β© 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter