A user can burn their EUROs if their collateral ratio falls below the minimum collateral requirement.
In SmartVaultV3, the burn()
function does not check if the position is healthy or not. A user could burn its EUROs before being liquidated. The user can then remove their collateral or open a new position.
Bob deposits WBTC as collateral and mints EUROs.
Bob monitors the mempool to front-run any call to the runLiquidation()
function with the tokenId
of his vault as an argument.
The WBTC price falls sharply, lowering Bob’s collateral value, and now he is under-collateralized.
Alice calls runLiquidation()
to liquidate Bob’s vault, but Bob front-runs Alice’s transaction and burns his EUROs.
Alice’s call reverts because vault.underCollateralised()
in liquidateVault()
function returns false.
Bob successfully avoids liquidation and can then either mint new EUROs from a newly created vault or remove his collateral.
By front-running any call to the runLiquidation()
function with the tokenId
of their own vault, a user can constantly avoid liquidation, enabling the user to engage in a kind of 'risk-free trade'. This practice prevents the distribution of fees and liquidation bonuses, which are intended to incentivize liquidators to act promptly, thereby avoiding any bad debt to the system.
Briefly describe the vulnerability.
user: User is under-collateralized, removes his collateral by front-runnning the liquidation transaction.
protocol: Tries to liquidate user's unhealthy position.
Add the following test to smartVault.js
inside describe('burning') block.
Manual review
Add the following check in the burn()
function to avoid any frontrunning during the liquidation process:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.