namecoin / namecoin-core

Namecoin full node + wallet based on the current Bitcoin Core codebase.
https://www.namecoin.org/
MIT License
463 stars 147 forks source link

Consider auctioning expired names via mempool and RBF #415

Open JeremyRand opened 3 years ago

JeremyRand commented 3 years ago

Is your feature request related to a problem? Please describe.

If two people both try to register a name that is expiring soon, they have to quickly broadcast a registration as soon as the name expires, and hope they get into the mempool of a miner first.

This induces the following problems:

Describe the solution you'd like

Benefits:

Describe alternatives you've considered

This proposal was brainstormed during a conversation with @yanmaani. @yanmaani has an alternate proposal on the forum; I have not carefully compared it to this one yet.

Additional context

Possible reason to not do this: having this feature would allow third parties to see what the "bids" are on a name before it has expired. I am not sure what attacks this would open up. Perhaps it would enable miners to front-run popular domains in order to resell them? Maybe we could eliminate such attacks (if they exist) by significantly decreasing the auction window, e.g. only allowing name_firstupdate to enter the mempool 3 blocks before expiration? Or we could figure that users who want resistance to frontrunning will only broadcast a few blocks in advance anyway, and that Namecoin is not designed to prevent users from willfully leaking their intent to buy a name anyway, so 2016 blocks is fine but users who care about this attack will pick a much smaller window.

domob1812 commented 3 years ago

I'm not sure it makes sense to pay the fee to miners, as that could lead to bad incentives. Also it means that the miner who finds the block where the name expires can get the name for free.

The proposal on the forum (especially my variant with just burning coins from name_firstupdate) is what I think is the best solution, in case we want to implement this at all.

yanmaani commented 3 years ago

This has been discussed on the forum for a bit, so I won't reiterate everything. This proposal mostly differs in the matter of to whom the fees are paid, and the specific manner of conducting the auction, so I'll address these points.

If you let the miners get the rewards, you'll have an uneven block subsidy. If there's a block with a reward of NMC 6000 when the average block reward comes to something like NMC 12.5, miners have stronger incentives to just continually re-mine the block with the big reward than to actually continue the chain.

(Some people have speculated this isn't a problem, and I linked some papers in footnote 1 of the proposal, but I'd be pretty bummed to find out the hard way. Namecoin might be extra susceptible because of AuxPoW, although I haven't really thought about that aspect.)

As regards to auctions, I think a Dutch auction would be preferable, since it results in a higher clearing price. That should mean higher economic efficiency, which means the names will be more human-readable. Schematically: if there's only one bidder, he'd pay the minimum bid in an English auction, but something close to his fair value if it's a Dutch auction and he doesn't know he's the only one.

(In very simplified terms, there's more psychological pressure on the market participants in a Dutch auction, which makes them put more aggressive bids.)