Skip to content
Business logic Audit finding Beginner

Malicious owner can arbitrarily change fee to any % value

The market owner can change the trading fee to any percentage without emitting an event or enforcing a timelock, so users cannot monitor or react to the change. An attacker could set the fee to 100% and users would only notice after their trades execute, damaging confidence in the market.

0xRajeev Follow

Originally disclosed on Code4rena

Submitted by 0xRajeev

The Tracer protocol like any other allows market creators to charge fees for trades. However, a malicious/greedy owner can arbitrarily change fee to any % value and without an event to observe this change or a timelock to react, there is no easy way for users to monitor this via front-end or off-chain monitoring tools.

The impact is that, if the users are trading on a market with 0.1% fees and the owner suddenly changes this to 100%, the users realise this only after their trades are executed. Market loses confidence. Protocol takes a reputational hit.

See similar Medium-severity finding in ConsenSys’s Audit of 1inch Liquidity Protocol

Recommend implementing an Emit event, and providing a timelock for users to react and establish an upper threshold for fees that is decided across markets by governance.

raymogg (Tracer) confirmed:

Like the idea of having a timelock for any update parameter update that immediately affects traders

The original report as published on Code4rena, by 0xRajeev. 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 fee-setting function lacks an event emission, a timelock, and an upper bound, allowing the owner to change fees arbitrarily and instantly.

Impact

Users could be charged an unexpectedly high fee (up to 100%) without prior notice, leading to loss of confidence and reputational damage to the protocol.

What the attacker needed

Malicious or greedy market owner; users trading on the affected market

The fix

The report recommends emitting an event, adding a timelock, and setting an upper fee threshold decided by governance; the project confirmed they like the timelock idea.

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.

In this trading system, the person who creates a market can set a fee that traders pay. The problem is that this fee can be changed instantly to any value, even 100%, and there is no warning or delay. So traders might agree to a small fee but end up paying almost everything to the owner without knowing until after the trade.

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 0xRajeev

View all

61 more disclosed reports, best first.

More from Tracer 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.