The checkAuctionEnded
function is responsible for verifying if the auction has ended. However, the current implementation does not properly track the auction’s completion, which can lead to unintended behavior.
Lack of a completion flag: The function does not track whether the auction has already been finalized, allowing multiple calls and redundant event emissions.
Potential re-entrancy risks: If other contract logic depends on the auction ending status, an attacker could attempt to exploit the lack of a clear termination state.
The auction may never officially end within the contract logic, leading to incorrect function behavior.
The AuctionEnded
event could be emitted multiple times, causing confusion for off-chain systems tracking the auction.
External functions that rely on the auction’s finality may fail to execute correctly
Manual review
To properly finalize the auction and prevent multiple calls to checkAuctionEnded()
, introduce a boolean flag auctionEnded
.
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.