Submitted by 0xAlix2, also found by falconhoof, 0x175, pontifex, DedOhWale, Emmanuel, Honour, Myrault, vahdrak1, SBSecurity, sashik_eth, koo, Vasquez, miaowu, Giorgio, Maroutis, Stefanov, KupiaSec, Aamir, Circolors, 3th, ducanh2706, Jorgect, ke1caM, ljj, VAD37, 0xnev, shikhar229169, lian886, adam-idarrha, iamandreiski, alix40, Angry_Mustache_Man, AlexCzm, kennedy1030, 3docSec, Abdessamed, 0x486776, and T1MOH
When a positions collateral ratio drops below 150%, it is subject to liquidation. Upon liquidation, the liquidator burns a quantity of DYAD equal to the target Notes DYAD minted balance, and in return receives an equivalent value plus a 20% bonus of the liquidated positions collateral. If the collateral ratio is <100%, all the positions collateral should be moved to the liquidator, this logic is done in VaultManagerV2::liquidate.
However, that function is only moving the non-Kerosene collateral to the liquidator, which is wrong. All collateral including Kerosene should be moved to the liquidator in the case of full liquidation.
This will affect both the liquidated and liquidator positions:
This assumes that a reported bug is fixed, which is using the correct licenser. To overcome this, we had to manually change the licenser in addKerosene and getKeroseneValue.
Make sure to fork the main net and set the block number to 19703450:
Add the following to VaultManagerV2::liquidate:
Error
shafu0x  (DYAD) confirmed
