The amendSellOrder
function is designed to allow order owners to modify their orders including extending deadlines, with a MAX_DEADLINE_DURATION
limit to prevent excessively long-running orders.
The function calculates the new deadline from the current block.timestamp
rather than from the original order creation time, allowing sellers to repeatedly extend their orders beyond the intended maximum duration by calling the function multiple times before expiration.
Likelihood:
This vulnerability will occur whenever sellers want to keep their orders active beyond the intended maximum duration and repeatedly call amendSellOrder
before expiration
Sellers can exploit this immediately after order creation by strategically timing their amendments to continuously extend deadlines
Impact:
Complete circumvention of the MAX_DEADLINE_DURATION
security control allowing indefinite order extensions
Potential market manipulation through artificially prolonged order availability
Undermining of the protocol's intended order lifecycle management
Possible griefing attacks where sellers can maintain stale orders indefinitely
This test demonstrates how a seller can extend their order deadline indefinitely by repeatedly calling amendSellOrder
before expiration:
Add a createdAt
field to track order creation time and enforce deadline limits based on the original creation timestamp rather than current time:
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.