Submitted by shikhar229169, also found by Honour, Circolors, Maroutis, KupiaSec, 3th, ke1caM, 0xfox, 0xSecuri, Sancybars, Strausses, kennedy1030, Stormreckson, and 0x486776
The vulnerability is present in the VaultManagerV2::liquidate function where it doesnt have any check for whether the vault has enough exogenous collateral leading to no liquidation even if the non-kerosene value is less than DYAD minted.
It is intended that the position of users DNFT has enough exogenous collateral and should be 150% overcollateralized. But there will arise a case when a position is no doubt 150% collateralized by the support of kerosene value, but the non-kerosene value is reduced below the DYAD token minted. As a result of which the vault doesnt have enough required exogenous collateral. But due to the missing check for enough non-kerosene value collateral in liquidate function, the liquidation will never happen and reverts.
The position will never be liquidated, for the above discussed case. As a result of which the (DYAD Minted > Non Kerosene Value), making the value of DYAD to fall.
Add the below test file in test/fork/v2.t.sol, and add the imports:
Run the test (Replace the $ETH_MAINNET_RPC_URL by your eth mainnet rpc url):
Unit Test in Foundry
Update the line 214 in VaultManagerV2.sol:
Context
0xMax1 (DYAD) commented:
shafu0x (DYAD) confirmed
Koolex (judge) commented:
shafu0x (DYAD) commented:
Koolex (judge) commented:
adam-idarrha (warden) commented:
T1MOH (warden) commented:
McToady (warden) commented:
Abdessamed (warden) commented:
McToady (warden) commented:
Koolex (judge) commented:
Note: For full discussion, see here.
