Synth tokens can get over-minted
The Synth token minting logic does not deduct or lock the foreign reserve when native deposits are added, allowing Synth tokens to be over-minted. An attacker could exploit this to mint unbacked Synth tokens and later redeem them for pool funds.
Submitted by WatchPug
Per the document:
It also is capable of using liquidity units as collateral for synthetic assets, of which it will always have guaranteed redemption liquidity for.
However, in the current implementation, Synth tokens are minted based on the calculation result. While nativeDeposit be added to the reserve, reserveForeign will remain unchanged, not deducted nor locked.
Making it possible for Synth tokens to get over-minted.
Proof of Concept
- The Vader pool for BTC-USDV is newly created, with nearly 0 liquidity.
- Alice add liquidity with
100,000 USDVand1 BTC; - Bob
mintSynth()with100,000 USDV, got0.25 BTC vSynth; - Alice remove all the liquidity received at step 1, got all the
200k USDVand1 BTC.
The 0.25 BTC vSynth held by Bob is now backed by nothing and unable to be redeemed.
This also makes it possible for a sophisticated attacker to steal funds from the Vader pool.
The attacker may do the following in one transaction:
- Add liquidity with
10 USDVand10,000 BTC(flash loan); - Call
mintSynth()with10 USDV, repeat for 10 times, got1461 BTC vSynth; - Remove liquidity and repay flash loan, keep the
1461 BTC vSynth; - Wait for other users to add liquidity and when the BTC reserve is sufficient, call
burnSynth()to stealUSDVfrom the pool.
Given that the codebase attempts to implement the Thorchain rust code in a one-to-one fashion, findings that relate to the mathematical accuracy of the codebase will only be accepted in one of the following cases:
- The code deviates from the Thorchain implementation
- A test case is created that illustrates the problem
While intuition is a valid ground for novel implementations, we have re-implemented a battle-tested implementation in another language and as such it is considered secure by design unless proven otherwise.
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 minting function does not update the foreign reserve balance when native tokens are deposited, so the collateral accounting is incorrect.
Impact
An attacker could over-mint Synth tokens and later redeem them to steal funds from the pool, potentially draining liquidity.
What the attacker needed
Ability to add and remove liquidity; Ability to call mintSynth and burnSynth; Flash loan for large capital (optional)
How it was found
- Alice adds liquidity with 100,000 USDV and 1 BTC to a newly created BTC-USDV pool.
- Bob calls mintSynth() with 100,000 USDV and receives 0.25 BTC vSynth.
- Alice removes all her liquidity, receiving back all 200k USDV and 1 BTC.
- Bob's 0.25 BTC vSynth is now unbacked and cannot be redeemed.
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 Synth token is a synthetic asset that should be backed by collateral in a pool. The bug is that when you deposit one asset to mint Synths, the other asset in the pool is not reduced, so you can create more Synths than the pool can actually back. This means someone could create fake Synths and later trade them for real assets, stealing from the pool.
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.