OrderBook::getOrderDetailsString
function contains redundant logic used to determine the order status, which results in excessive gas usageDescription:
OrderBook::getOrderDetailsString
function contains duplicate logic used determine the order status:
Block 1:
Block 2:
These two blocks of code are equivalent except for the inactive status string ("Expired (Active but past deadline)"
in block 1 vs "Expired (Awaiting Cancellation)"
in block 2).
"Expired (Awaiting Cancellation)"
in block 2 makes more sense in the context of protocol logic. In addition, block 2 is more readable.
Impact:
Duplicate code causes excessive gas consumption.
Recommended Mitigation:
Remove duplicate code (block 1).
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.