isIncreasing()
returns a wrong flag for some cases.
isIncreasing()
checks if the position size is increasing.
If the position is increased, createMarketOrder()
checks if the market and settlement are enabled and reverts if not.
But isIncreasing()
returns false when the absolute value of position size is increased from negative to positive(from -10 to 100), or from positive to negative(from 10 to -100).
So traders can increase their positions by reversing the direction twice for disabled markets(from -10 to 100, and 100 to -1000).
Traders can open positions(or increase positions) on disabled markets.
Manual Review
isIncreasing()
should return true when the absolute size of the position is increased.
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.