When creating an order, there is a check done using the checkPendingOrder
function. This check is to ensure that the order has existed for the minimum order lifetime.
This prevents recently updated orders from entering the market. But there is no check for this when filling an order that was recently created.
The lack of this check results in the following vulnerability:
Recently created orders will enter the market without reaching the criteria for the marketOrderMinLifetime
once their pass on the fillOrder
.
Loss of Funds: recently created orders will change skew/OI and be filled before updated orders.
Unfairness: recently created orders can be filled before the checkPendingOrder
validation.
Manual Review
Add the marketOrder.checkPendingOrder()
for the _fillOrder
function. This will ensure that all filled orders have met the minimum market order lifetime.
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.