liquidateAccounts()
resets OpenInterest
and Skew
every time.
liquidateAccounts()
calls perpMarket.updateOpenInterest()
after a liquidation.
But these two values are 0 because there is no logic to update them in liquidateAccounts()
.
During an order settlement, these values are updated in checkOpenInterestLimits().
But liquidateAccounts()
doesn't call checkOpenInterestLimits()
because it would bring an unexpected reverting.
So updateOpenInterest()
will be called with the uninitialized OpenInterest
and Skew
.
The protocol won't work properly after a liquidation because OpenInterest
and Skew
are reset.
Manual Review
liquidateAccounts()
should call checkOpenInterestLimits()
without checking any limitation to update these 2 values.
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.