There is a check that PerpMarket::checkOpenInterestLimits()
that checks if the newOpenInterest
is bigger than the maxOpenInterest
and if yes it should revert. The problem is that this will cause unexpected behaviours and bad experience for the users. There will be cases where traders will not be able to open position because the interest is over the maximum and they will need to wait for someone's else position to be liquidated or decreased.
This is the check in the checkOpenInterestLimits()
function
The problem is that in the current implementation of the contract in order for a user to be liquidated he needs to lose all of his collateral in the account not his margin of the position which means that liquidations will happen much more rare. So when the open interest is almost at the max the other traders will just need to wait for someone to reduce or close their position so they will be DoSed for indefinite time so they will not be able to enter the market when they want to which means that they will not be able to follow their strategy.
High because there will be cases where trader's will be DoSed for indefinite time which will prevent them from following their trading strategy
Manual review
Remove the open interest check
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.