when liquidateAccounts()
will clear pedding MarketOrder
but don't cancel all offchain orders
when liquidateAccounts()
we will clear pedding MarketOrder
And it didn't cancel all offchain orders
may result in an unintended position
for the user
Example:
The current user position.size = 1000
User signs an offchain order targetPrice = 10e18
with sizeDelta = -1000
i.e., price is less than 10e18, position clears to 0
However, since it was liquidated, but the liquidation did not cancel all offline orders, when the user added collateral, this offchain order was executed accidentally
This resulted in the user's position.size = -1000
, not the original clear 0
This is not the intended behavior of the user, resulting in a funding risk
add cancel all offchain
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.