The setAuctionConfig()
function in the DaiGoldAuction.sol
reverts only if the current auction has not ended. This check can be moved earlier in the function to avoid unnecessary state changes before reverting.
In the setAuctionConfig()
function, the check if (!epochs[_currentEpochId].hasEnded()) { revert InvalidOperation(); }
is performed after some initial checks. This check can be moved to the beginning of the function to revert early and avoid unnecessary state changes, thus gas wasting:
Reverting early can save gas and avoid unnecessary state changes, which makes the function more efficient.
Manual review.
Move the check for the auction end status to the beginning of the setAuctionConfig()
function.
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.