After debt seizure from InsuranceFund , user can dilute all past participants.
After a debt seizure leaves the insurance fund with pending obligations and zero balance, an attacker can deposit a tiny amount to receive an enormous number of shares, diluting earlier liquidity providers. The attacker then takes a much larger share of future profits.
Submitted by 0xliumin
A user can get a much larger portion of the pool as it recovers from a debt seizure. The intent of the insurance pool seems to be that it could recover from a bad debt event.
Proof of Concept
- Alice is the first LP to the insurance pool, and deposits 1e18 shares.
seizeBadDebtis called with 2e18. Now, there arependingObligations = 1e18, and there is 0 vusd in the insurance fund.- Bob (the attacker) directly transfers 1e18 + 1 vUSD.
- Bob calls deposit with 1e18 vUSD. All pending obligations will be settled, but there will only be 1 vUSD left in the pool before Bob’s deposit. Bob receives
shares = 1e18 * 1e18 / 1. As a result, Bob will get1e36shares, diluting Alice’s share of the pool. Bob will be able to take a much larger share of all future profits from the insurance fund until more bad debt is seized. Bob only provided 2e18 + 1 liqudiity, but received an exponentially larger number of shares than Alice.
Recommended Mitigation Steps
It depends on how you want this to work. You could keep track of the total amount ever contributed by users, and use that for calculations. Or just make staking 1 vUSD = 1 share if the pool total is below the total number of shares.
atvanguard (Hubble) disputed and commented:
Disputing this. It is by design. LPs who were in the insurance fund will be burnt during a bad debt settlement.
JasoonS (judge) decreased severity to Medium
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 share calculation divides by the current pool balance (which can be near zero after a seizure) without accounting for pending obligations or total historical contributions, allowing a small deposit to mint an excessive number of shares.
What the attacker needed
A debt seizure has occurred; attacker can transfer tokens directly; attacker can call deposit
The fix
The report suggests tracking total historical contributions for calculations, or making 1 vUSD equal 1 share when the pool total is below the total number of shares.
How it was found
- Alice deposits 1e18 shares as the first liquidity provider.
- seizeBadDebt is called with 2e18, leaving pendingObligations = 1e18 and zero vusd in the fund.
- Bob directly transfers 1e18 + 1 vUSD to the fund.
- Bob calls deposit with 1e18 vUSD, settling pending obligations and leaving only 1 vUSD before his deposit.
- Bob receives 1e36 shares, diluting Alice's share of the pool.
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.
An insurance fund is a shared pot where people deposit money and get shares representing their portion. When the fund takes a loss, its balance can drop to zero while it still owes money to the pool. The attacker then deposits a very small amount, but because the fund's balance is near zero, the share calculation gives them a huge number of shares, shrinking everyone else's slice.
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.