Skip to content
Business logic Audit finding Intermediate

No bar fees for IndexPools ?

The IndexPool contract does not collect fees for the barFeeTo address, despite having an updateBarFee method. This could cause liquidity providers to favour IndexPool over ConstantProductPool, harming the ecosystem.

0xsanson Follow

Originally disclosed on Code4rena

Submitted by 0xsanson, also found by pauliax

Impact

IndexPool doesn’t collect fees for barFeeTo. Since this Pool contains also a method updateBarFee(), probably this is an unintended behavior. Also without a fee, liquidity providers would probably ditch ConstantProductPool in favor of IndexPool (using the same two tokens with equal weights), since they get all the rewards. This would constitute an issue for the ecosystem.

Recommended Mitigation Steps

Add a way to send barFees to barFeeTo, same as the other pools.

maxsam4 (Sushi) confirmed

The original report as published on Code4rena, by 0xsanson. 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 IndexPool contract lacks the logic to transfer accumulated bar fees to the barFeeTo address, unlike other pool types.

Impact

Liquidity providers could abandon ConstantProductPool in favour of IndexPool, which may destabilise the ecosystem.

What the attacker needed

None

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.

A fee is a small cut of trading fees that goes to a specific address. The IndexPool contract has a setting to change this fee but never actually sends the fee to that address. This means the fee is lost, and traders might prefer this pool because it is cheaper, which could hurt other pools.

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

View all

8 more disclosed reports, best first.

More from Sushi Trident contest phase 1

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.