The vault obtains the token list from the tokenManager
. When a token is removed from the tokenManager
, its value is not immediately taken into account. If a borrower deposits this token as collateral, it may lead to the premature liquidation of the borrower's assets.
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/SmartVaultV3.sol#L67#L73
vault obtains the token list from the tokenManager
tokenManager
implement removeAcceptedToken
function
Assuming
alice deposit 100e18 arb and 0.1 ether as collateral
alice mint 250e18 euros
owner removed arb from token manager
alice's asset is undercollateralised
Here is my test written using foundry
As we can see after arb is removed from list alice's asset being undercollateralised.
full test file:
https://gist.github.com/coffiasd/3355b9f12307fd588ff5201fccd05192
borrower's asset being liquidated prematurely
Foundry
recommend to record token list in vault contract
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.