The checkAuctionEnded()
function only checks if the auction's end time has been reached, but fails to account for the case where all ZENO tokens have been sold before the end time, which is a valid auction completion condition according to the documentation.
According to the ZENO Bond documentation, the auction can conclude in two ways:
The total supply of ZENO is fully purchased
The auction reaches its predetermined end time
However, the current implementation only checks for the second condition:
This means that even if all ZENO tokens are sold (state.totalRemaining == 0
), the function will still revert if called before endTime
, preventing the proper signaling of auction completion.
This issue can:
Block critical post-auction processes that depend on the AuctionEnded
event
Create confusion among participants about the auction's actual status
Delay or prevent the transition to post-auction phases
Emit the incorrect price in the AuctionEnded
event
Manual review
Add the following test case to the test/Zeno/Integration.test.js
file:
Update the checkAuctionEnded()
function to account for both completion conditions:
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.