Any user can burn their EUROs by calling burn()
from another user’s vault, leading to incorrect accounting for the minted
variable in the vault where the function was called.
There is no access control in the burn()
function of SmartVaultV3
If Bob burns their EUROs by calling burn()
from Alice’s vault, minted
would be decreased in Alice’s vault by the amount burned by Bob, and Bob’s EUROs balance would be decreased by the amount burned. However, minted
would remain unchanged in Bob's vault.
The minted
variable is used to track how many EUROs were minted by the owner of the vault.
If the minted
variable differs from the balance due to a lack of access control, it will impact liquidation and collateral withdrawal through the following functions:
undercollateralised()
which is called from liquidate()
in a require statement.
canRemoveCollateral()
which is called from removeCollateral
, removaCollateralNative
and removeAsset()
inside require statements.
More importantly, a user could mint more than allowed without adding collateral, breaking a protocol invariant.
user: Owner of vault. Deposit 1 ETH as collateral. Mint 1250 EUROs and mint again 1000 EUROs after otherUser burned 1200 EUROs from its vault.
otherUser: Owner of otherVault. Deposit 1 ETH as collateral. Mints 1250 EUROs and burn 1200 EUROs by calling burn()
on user vault.
This test can be pasted in SmartVaultManager.js
under context
block (L117)
Manual review
Add onlyOwner
and onlyVaultManager
modifiers to the burn()
function.
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.