In liquidition process, the whole openInterest
and skew
will be changed and should be updated. The system lacks of this part.
In liquidation process, the perpMarket.openInterest
and perpMarket.skew
will be changed after we finish liquidation. There two parameters should be updated.
Although we have called perpMarket.updateOpenInterest(ctx.newOpenInterestX18, ctx.newSkewX18);
, actually ctx.newOpenInterestX18
and ctx.newSkewX18
is not initialized and keeps 0. This means that after one liquidation, the perpMarket.openInterest
and perpMarket.skew
will come to zero. This is incorrect and will increase the whole system's risk.
Checking the previous cyfrin report 7.4.3, we delete checkOpenInterestLimits
to avoid the possible dos. But the vulnerability is that once we delete this part, this will lead to ctx.newOpenInterestX18, ctx.newSkewX18
uninitialized.
One proper fix should be that we calculate the new OpenInterest and new skew and don't check ExceedsSkewLimit
and ExceedsOpenInterestLimit
.
We use maxSkew
to control the difference between Long position and Short position. This is one system protection. Because of the incorrect OI and skew update, this protection will not take effect.
Manual
Calculate the new OpenInterest and new Skew and update correctly.
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.