Consider adding a Dutch Auction implementation
See original GitHub issue🧐 Motivation
TL;DR: Price starts at X reduces by Y every Z minutes until it reaches W.
📝 Details
Found this PR https://github.com/OpenZeppelin/openzeppelin-contracts/pull/989, but it’s way too complex and closed due to staleness.
Example: https://github.com/divergencetech/ethier/blob/main/contracts/sales/LinearDutchAuction.sol (I’m not sure if it’s production-ready)
It would be pretty straightforward to implement, as follows:
uint256 public constant startPrice = 1 ether;
uint256 public constant endPrice = 0.5 ether;
uint256 public constant priceCurveLength = 120 minutes;
uint256 public constant dropInterval = 40 minutes;
uint256 public constant dropPerStep = (startPrice - endPrice) / (priceCurveLength / dropInterval);
function getAuctionPrice() public view returns (uint256) {
if (block.timestamp < startTime) {
return startPrice;
}
if (block.timestamp - startTime >= priceCurveLength) {
return endPrice;
}
uint256 steps = (block.timestamp - startTime) / dropInterval;
return startPrice - (steps * dropPerStep);
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to Create a Dutch Auction Smart Contract - QuickNode
1. Often to perform any transaction between two untrusted parties, there is a need for a trusted middle ... 2. Auctions are platforms...
Read more >Overview Part 1: Dutch auction
Dutch auctions are probably the simplest to implement in a smart contract since only one bid is needed.
Read more >Understanding the Dutch Auction and Its Implementation in ...
With the Dutch auction mechanism in place, the NFT seller opens bidding at the starting price, which doubles as the highest price, and...
Read more >What is a Dutch Auction and Why it Matters in the NFT Space?
The Dutch auction is a bidding technique that considers all bids for a given asset before arriving at a ceiling price, which gradually...
Read more >Understand How A Dutch Auction IPO Works
In the Dutch auction process for an IPO, the underwriter does not set a fixed price for the shares to be sold. The...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So far I don’t think we should implement a dutch auction. I think the problem of NFT drops is more about mechanism design rather than secure implementation. As far as I can tell, dutch auctions are not necessarily the best way to sell NFTs, and it is an active research area. This is an example of a post from just a few days ago proposing a variation on the mechanism.
@frangio @Amxx do you think we should proceed with building a potential dutch auction mechanism? To answer @frangio’s question, many NFT drops today are happening via Dutch Auction, and by having a standard mechanism to do so, a lot of devs would benefit since they wouldn’t have to write code for it that is more susceptible to having issues.