Normal behavior:
The Order struct stores all relevant data for each order, including the order ID, seller, token address, amount, price, deadline, and active status. This struct is stored in a mapping, and each order occupies a storage slot.
Issue:
The bool isActive field is not optimally packed within the struct, leading to slightly higher gas costs for storage operations. Solidity stores each variable in a 32-byte slot, and packing smaller variables together can reduce storage usage and gas costs. In this case, the bool could be packed with other smaller variables or moved to the end of the struct for better efficiency.
Likelihood:
Every order creation and update incurs slightly higher gas costs due to suboptimal storage layout.
This occurs for every user interaction with orders, especially in high-volume protocols.
Impact:
Increased gas costs for users, making the protocol less competitive.
Less efficient use of storage, which can add up over time.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.