question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
frangiocommented, Apr 8, 2022

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.

2reactions
mw2000commented, Mar 26, 2022

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found