Skip to content
Business logic Audit finding Intermediate

Minting and burning synths exposes users to unlimited slippage

The mintSynth function in VaderPoolV2 allows users to mint synths without specifying a minimum amount, so a frontrunner can manipulate pool reserves to make the user receive less valuable synths. The same issue applies to burning synths, where manipulation can reduce the native asset received.

TomFrenchBlockchain Follow

Originally disclosed on Code4rena

Submitted by TomFrenchBlockchain, also found by cmichel

Impact

The amount of synths minted / assets received when minting or burning synths can be manipulated to an unlimited extent by manipulating the reserves of the pool

Proof of Concept

See VaderPool.mintSynth: https://github.com/code-423n4/2021-11-vader/blob/607d2b9e253d59c782e921bfc2951184d3f65825/contracts/dex-v2/pool/VaderPoolV2.sol#L126-L167

Here a user sends nativeDeposit to the pool and the equivalent amount of foreignAsset is minted as a synth to be sent to the user. However the user can’t specify the minimum amount of synth that they would accept. A frontrunner can then manipulate the reserves of the pool in order to make foreignAsset appear more valuable than it really is so the user receives synths which are worth much less than what nativeDeposit is worth. This is equivalent to a swap without a slippage limit.

Burning synths essentially runs the same process in behalf so manipulating the pool in the opposite direction will result in the user getting fewer of nativeAsset than they expect.

Recommended Mitigation Steps

Add a argument for the minimum amount of synths to mint or nativeAsset to receive.

SamSteinGG (Vader) acknowledged and disagreed with severity:

We believe the severity should be set to medium as there are no loss of funds and its exploit requires special circumstances to be profitable.

The original report as published on Code4rena, by TomFrenchBlockchain. 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 mintSynth and burnSynth functions lack a slippage protection parameter, allowing pool reserves to be manipulated before the user's transaction.

Impact

A frontrunner could manipulate pool reserves so the user receives synths worth much less than their deposit, or fewer native assets when burning; the project argued this is medium severity as no funds are lost and special circumstances are needed.

What the attacker needed

Attacker can frontrun transactions; user mints or burns synths

The fix

Add an argument for the minimum amount of synths to mint or nativeAsset to receive.

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 mint or burn synths, you trade one asset for another. Without a minimum amount you will accept, someone can change the exchange rate just before your transaction and you get a worse deal. This is like buying something without checking the price first.

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 TomFrenchBlockchain

View all

28 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.