Skip to content
Business logic Audit finding Intermediate

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.

pedroais Follow

Originally disclosed on Code4rena

Submitted by pedroais

If penalties are set to 0 the protocol would be vulnerable to price manipulations like the one described in the contest documentation.

Proof of Concept

The protocol uses economic penalties to punish withdraws to protect against economic price manipulation attacks. If these penalties are set to 0 in the creation of a token launch the sale would be vulnerable to this kind of attack. The penalties should never be 0 for any token sale.

The economic attack that could be done with 0 penalties is detailed on page 7 of the whitepaper.

https://github.com/traderjoe-xyz/research/blob/main/RocketJoe_Launch_Platform_for_Bootstrapping_Protocol-Owned_Liquidity.pdf

I consider this to be a medium risk since it could completely invalidate a token launch but it’s still unlikely (but possible) the creators will set penalties to 0. This could be done by mistake or by the creators of the launch event to exploit it themselves.

Recommended Mitigation Steps

Require penalties to be greater than 0 either in the initializer function or in the factory.

cryptofish7 (Trader Joe) acknowledged, but disagreed with Medium severity and commented:

Disagree with severity, should be 1 (Low).

LSDan (judge) commented:

I agree with the warden on risk here.


The original report as published on Code4rena, by pedroais. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the initializer or factory does not enforce that withdrawal penalties are greater than zero.

Impact

If penalties are zero, an attacker could perform a price manipulation attack that could completely invalidate a token launch, though this requires the penalties to be set to zero by mistake or by malicious creators.

What the attacker needed

Penalties set to 0 at launch creation

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This is a smart contract for launching tokens. It uses a penalty fee on early withdrawals to stop people from manipulating the token price. If that fee can be set to zero, the protection is gone and someone could manipulate the price to their advantage.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by pedroais

View all

6 more disclosed reports, best first.

More from Trader Joe contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.