Trader Joe contest - Dravee'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: 4/39

Findings: 3

Award: $2,523.08

🌟 Selected for report: 24

πŸš€ Solo Findings: 0

Findings Information

Labels

bug
duplicate
2 (Med Risk)

Awards

60.3184 USDT - $60.32

External Links

Handle

Dravee

Vulnerability details

Impact

Silent failures (lack of failure detection / revert in case of failure).

Proof of Concept

ERC20 transfer()/transferFrom() do not return booleans: Contracts compiled with solc >= 0.4.22 interacting with such functions will revert. Use OpenZeppelin's SafeERC20 (wrappers around ERC20 operations that throw on failure when the token contract implementation returns false. Tokens that return no value and instead revert or throw on failure are also supported with non-reverting calls assumed to be successful. Adds safeTransfer, safeTransferFrom, safeApprove, safeDecreaseAllowance, and safeIncreaseAllowance)

Instances include:

contracts\LaunchEvent.sol:458: token.transfer(msg.sender, amount); contracts\LaunchEvent.sol:464: pair.transfer(msg.sender, balance); contracts\LaunchEvent.sol:490: token.transfer(msg.sender, amount); contracts\LaunchEvent.sol:514: token.transfer(issuer, balance); contracts\LaunchEvent.sol:538: token.transfer(penaltyCollector, excessToken); contracts\LaunchEvent.sol:543: WAVAX.transfer(penaltyCollector, excessWavax); contracts\RocketJoeFactory.sol:133: IERC20(_token).transferFrom(msg.sender, launchEvent, _tokenAmount); contracts\RocketJoeStaking.sol:184: rJoe.transfer(_to, rJoeBal); contracts\RocketJoeStaking.sol:186: rJoe.transfer(_to, _amount);

While some of those are known tokens, several others are arbitrary ERC20 tokens. safeTransfer/safeTransferFrom would be a good practice here

Tools Used

VS Code

Consider using safeTransfer/safeTransferFrom consistently.

#0 - cryptofish7

2022-02-10T21:45:59Z

Duplicate of #12

#1 - dmvt

2022-02-22T10:50:00Z

This could result in a loss of funds given the right external conditions.

2 β€” Med (M): vulns have a risk of 2 and are considered β€œMedium” severity when assets are not at direct risk, but the function of the protocol or its availability could be impacted, or leak value with a hypothetical attack path with stated assumptions, but external requirements.

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