Skip to content

Code4rena

Trader Joe contest

Every publicly disclosed report for Trader Joe contest and what kind of bugs they were.

disclosed reports
17
most reported class
Business logic
bug classes found
4
first disclosure
2022
Find Trader Joe contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Trader Joe contest chose to make public.

Business logic

LP Tokens May Be Locked in Contract Due to allowEmergencyWithdraw() in Stage 3

The allowEmergencyWithdraw() function can be called by the owner at any time, and if called during Stage 3 after a pair is created, it sets stopped to true, causing withdrawal functions to revert and locking LP tokens. As a result, depositors and issuers cannot withdraw their LP tokens or incentives.

Trader Joe contest

Medium
DoS

createPair() expects zero slippage

The createPair() function calls addLiquidity() with zero slippage tolerance, so if the pool's ratio changes before the call, the transaction reverts and users cannot create the pair. An attacker with early access to the new token could front-run the call to cause this denial of service.

Trader Joe contest

Medium
Smart contracts

Re-enterable Code When Making a Deposit to Stake

The deposit function in the staking contract updates the user's balance and reward debt only after transferring reward tokens, so if the reward token gave control back during the transfer an attacker could re-enter deposit and receive the same pending reward repeatedly. The author states this could drain the contract's entire rJoe balance, but notes the current token does not relinquish control, so it is not exploitable today.

Trader Joe contest

Medium
Business logic

Incompatibility With Rebasing/Deflationary/Inflationary tokens

The TraderJOE contracts do not account for tokens whose balances change during transfers or over time, such as rebasing, deflationary, or inflationary tokens. An attacker could use such a token to cause a loss of funds for users who unknowingly interact with the protocol.

Trader Joe contest

Medium
Smart contracts

Failed transfer with low level call could be overlooked

The contract's internal AVAX transfer helper uses a low-level call and only checks the success flag, which the EVM sets to true even when the target address has no code. If the penalty collector address points to a self-destructed contract, the transfer silently fails without reverting, so funds may not reach the intended recipient.

Trader Joe contest

Medium
Business logic

Lack of input checks (withrawal penalties should always be greater than 0)

The protocol allows withdrawal penalties to be set to zero when creating a token launch, which removes the economic deterrent against price manipulation attacks. An attacker could exploit this to manipulate the token price and invalidate the launch.

Trader Joe contest

Medium
DoS

Owner of LaunchEvent token has the ability to DOS attack the event

The owner of a token used in a LaunchEvent can create a JoePair for that token before the LaunchEvent does, causing the LaunchEvent's createPair call to revert. This prevents the LaunchEvent from initialising its pair, blocking users from withdrawing their LP tokens and incentives.

Trader Joe contest

Medium
Business logic

Uninitialized RocketJoeStaking.lastRewardTimestamp can inflate rJoe supply

The RocketJoeStaking contract's lastRewardTimestamp is uninitialized, so if someone transfers Joe tokens directly to the contract before the first updatePool call, a large amount of rJoe is minted to the contract. This inflates the rJoe total supply, though the tokens are not distributed to users.

Trader Joe contest

Medium
Business logic

Improper Upper Bound Definition on the Fee

The contract's emission rate parameter lacks upper and lower bounds, so an owner could set an excessively large value. This would cause reversions in critical functions that rely on the rate.

Trader Joe contest

Medium
Business logic

Wrong token allocation computation for token decimals != 18 if floor price not reached

The token allocation calculation in the launch event used the token's own decimals instead of a fixed 18-decimal scale, so for tokens with decimals other than 18 the result was wrong. When the floor price was not reached, this could allocate zero tokens to the pool instead of the correct reduced amount.

Trader Joe contest

High
Business logic

Users can lose value in emergency state

The emergency withdrawal function reverts because the WAVAX reserve was already used to provide liquidity, and users do not receive their LP tokens either, so they lose their entire deposit.

Trader Joe contest

High
Smart contracts

withdrawAVAX() function has call to sender without reentrancy protection

The withdrawAVAX() function in LaunchEvent.sol makes an external call to the caller without a reentrancy guard, allowing the caller to reenter this and other functions. An attacker could exploit this to reenter and potentially drain funds or manipulate state.

Trader Joe contest

Medium
Business logic

ERC20 return values not checked

The contract does not check the boolean return value of ERC20 transfer and transferFrom calls. If a token returns false instead of reverting on failure, the contract treats the transfer as successful, potentially causing a loss of funds.

Trader Joe contest

Medium