Skip to content
Business logic Audit finding Intermediate

Unused slippage params

The addLiquidity function in VaderRouter (V1 and V2) ignores the slippage parameters amountAMin and amountBMin, leaving liquidity additions vulnerable to sandwich attacks and MEV. An attacker could manipulate the pool price before and after the transaction to profit at the user's expense.

pauliax Follow

Originally disclosed on Code4rena

Submitted by pauliax, also found by TomFrenchBlockchain

Impact

Unused slippage params. function addLiquidity in VaderRouter (both V1 and V2) do not use slippage parameters:

 uint256, // amountAMin = unused
 uint256, // amountBMin = unused

making it susceptible to sandwich attacks / MEV. For a more detailed explanation, see: https://github.com/code-423n4/2021-09-bvecvx-findings/issues/57

Recommended Mitigation Steps

Consider paying some attention to the slippage to reduce possible manipulation attacks from mempool snipers.

SamSteinGG (Vader) disputed:

Slippage checks are impossible in the Thorchain CLP model.

alcueca (judge) commented:

Taking as main over #1 as it is a more general issue, but refer to #1 for a more detailed description and justification for the severity rating.

The original report as published on Code4rena, by pauliax. 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

The contract accepts slippage parameters but does not use them in the addLiquidity function.

Impact

Liquidity providers could lose funds to sandwich attacks or MEV, though the protocol team disputes that slippage checks are possible in their model.

What the attacker needed

None

The fix

The slippage parameters should be used to enforce minimum amounts, but the team disputed that this is possible in their model.

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.

When you add money to a trading pool, you can set a minimum amount you are willing to receive to protect against price changes. Here, those minimums are ignored, so someone watching the pending transaction can change the price to their advantage and take value from you.

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 pauliax

View all

16 more disclosed reports, best first.

More from Vader Protocol 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.