Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: high
Invalid

The Auction favors late buyers and allows early buyers to spend more usdc to buy The Zeno tokens.

Summary

The `Zeno::getPrice()` uses a gradual Dutch aunctioning system that reduces the price of the asset (zeno asset) been aunctioned with a decrease in time, this means that buyers that buys earlier from that auction spends more to purchase the zeno tokens compared to later buyers. Before a user buys zeno tokens from an auction they can always check the price of the zeno tokens by calling `getPrice()`. the user can then decide to buy from the auction when the price of the token hits the floor price.
```javascript
function getPrice() public view returns (uint256) {
if (block.timestamp < state.startTime) return state.startingPrice;
if (block.timestamp >= state.endTime) return state.reservePrice;
@>> return state.startingPrice - (
(state.startingPrice - state.reservePrice) *
(block.timestamp - state.startTime) /
(state.endTime - state.startTime)
);
}
```

Vulnerability Details

To explain this let us define some certain parameters:
1. startingPrice: 100 Zeno = 100 Usdc
2. reservePrice: 100 Zeno = 50 Usdc
3. StartTime of the auction = 1700000000
4. endTime of the auction = 1700003600 (auction should last for 1 hour)
5. Alice buys the zeno token at the time the auction started at the price of `100` usdc for 100 zeno tokens.
6. Bob then comes after 30 minutes and buys `100` zeno tokens for 75 usdc
Alice (the early buyer) spends more usdc to purchase the same amount of zeno tokens compared to Bob(the later buyer).

Impact

The impact it has on the protocol is high, because the implementation of the auction in any way does not give any advantage for early buyers to buy the Zeno bond, instead the late buyers will buy at a lower price compared to the price of the early buyers during the auction. In as much as it does not cause direct loss of funds from the protocol, users will rather wait until the end of the auction when they can buy zeno bonds at a cheaper price.

Tools Used

manual analysis

Recommendations

Consider reconstructing the auctioning system implementation and check which best fits the design of the protocol.

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.