The Auction.sol
contract implements a Gradual Dutch Auction (GDA) system, where the price of ZENO
tokens decreases over time until reaching a reserve price. However, due to the whenActive
modifier, users cannot bid at t = endTime
, preventing them from purchasing tokens at the lowest allowed price (reservePrice
). This behavior contradicts the documentation, which states that bidding should continue until the auction reaches its predetermined end time or the full allocation is sold.
Auction pricing logic (getPrice
) correctly decreases the price until it reaches reservePrice
at t = endTime
.
The buy
function has a whenActive
modifier.
The whenActive
modifier prevents bidding at t = endTime
, meaning no one can buy at reservePrice
.
According to the project documentation under Auction Mechanism
section:
https://docs.raac.io/core/zeno/ZENO_BOND
"The auction price starts at an initial value and decreases at a steady rate until it reaches a floor limit. The price will not drop below this reserve price."
This statement implies that users should be able to bid at the reserve price, ensuring they can purchase tokens at the lowest allowable value before the auction ends.
However, due to the whenActive
modifier, bidding is blocked at t = endTime
, meaning users are unable to bid at the reserve price, which contradicts the intended auction mechanism.
The getPrice()
function correctly returns reservePrice
at t = endTime
, but the whenActive
modifier prevents bids at this time. Hence, users would always pay more than the expected reserve price
.
The auction mechanism does not work as intended as no one can purchase at the lowest price (reservePrice
).
Impact Metric | Details |
---|---|
Severity | Medium |
Likelihood | High (Users will expect to bid at reserve price) |
Funds at Risk | Potentially some ZENO tokens remain unsold |
User Impact | Users miss the chance to buy at reserve price |
Manual Review
Update the getPrice
function in such a way that reservePrice
occurs before reaching the endTime
Or,
Modify the whenActive modifier to allow bidding at t = endTime
:
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.