After an order is filled or cancelled, its data remains in the orders
mapping, even though isActive
is set to false
. For example, cancelSellOrder
does:
The struct Order
for that orderId
is never removed or deleted. Over time, the orders
mapping will accumulate inactive orders, consuming extra storage. This is a gas/storage inefficiency: looking up orders or iterating (if any) will deal with stale data. It also makes the total state larger than necessary.
Likelihood:
every executed order (cancelled or filled) stays in storage indefinitely.
Impact:
wasted storage increases blockchain state size and can incur slightly higher gas costs if orders are accessed or cleared in future extensions. It does not directly cause a security issue but is an inefficiency.
After completing an order (either cancellation or purchase), use delete orders[_orderId]
to clear the struct. This refunds some gas (storage clear) and prevents stale data buildup.
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.