Submitted by 0xAlix2, also found by NentoR, Abdessamed (1, 2), DarkTower, 0xlucky, CodeWasp, sashik_eth (1, 2, 3), Egis_Security, Maroutis, TheFabled, 0xabhay (1, 2), itsabinashb (1, 2), Infect3d, windhustler, btk, Limbooo, KupiaSec, SpicyMeatball (1, 2), imare, Circolors, gumgumzum, web3km, n4nika, 0xtankr, cu5t0mpeo, Ryonen, ke1caM, oakcobalt, TheSchnilch, XDZIBECX, steadyman, VAD37, shaflow2, lian886, iamandreiski, dimulski, 0x486776 (1, 2), Giorgio, T1MOH, kennedy1030, TheSavageTeddy, carrotsmuggler, zhaojohnson (1, 2), and Krace
The protocol expects users to migrate their collateral from V1 vaults to V2 vaults, this significantly increases the TVL of the protocols V2. At the same time, the Kerosene price depends on the TVL, in UnboundedKerosineVault::assetPrice the numerator of the equation is:
This will always revert until the TVL becomes > Dyads supply, which is around 600k. So when users deposit Kerosene in either Kerosene vaults their Kerosene will temporarily get stuck in there.
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.
Because of another reported issue, a small change should be made to the code to workaround it, in VaultManagerV2::withdraw, replace _vault.oracle().decimals() with 8. This just sets the oracle decimals to a static value of 8.
Make sure to fork the main net and set the block number to 19703450:
This is a bit tricky, but I think the most straightforward and logical solution would be to block the usage of the Kerosene vaults (just keep them unlicensed) until enough users migrate their positions from V1, i.e. the TVL reaches the Dyads total supply.
Under/Overflow
shafu0x (DYAD) confirmed and commented:
