Closed code423n4 closed 2 years ago
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:
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.
Handle
WatchPug
Vulnerability details
Per the document:
However, in the current implementation,
Synth
tokens are minted based on the calculation result. WhilenativeDeposit
be added to the reserve,reserveForeign
will remain unchanged, not deducted nor locked.Making it possible for
Synth
tokens to get over-minted.PoC
100,000 USDV
and1 BTC
;mintSynth()
with100,000 USDV
, got0.25 BTC vSynth
;200k USDV
and1 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:
10 USDV
and10,000 BTC
(flash loan);mintSynth()
with10 USDV
, repeat for 10 times, got1461 BTC vSynth
;1461 BTC vSynth
;burnSynth()
to stealUSDV
from the pool.