Decentralised exchange for names

Post Reply
domob
Posts: 1120
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Decentralised exchange for names

Post by domob » Tue Oct 30, 2018 8:14 am

I've recently been thinking about how to best implement a decentralised exchange for names (built upon atomic name trading but including some mechanism to post and match offers). I think that the core P2P network can be utilised also to exchange offers (not the blockchain, though, to avoid unnecessary "spam" in it). I've also written up a draft paper about how to avoid spam in this setting:

http://arxiv.org/abs/1810.11675

We certainly want to implement something like this for the Xaya network in the future. It is something that would be useful for core Namecoin as well, I think - so what do you all think about adding it on the Namecoin level already (which would then also be usable for Xaya)?

Basically, we extend the P2P protocol such that it can also exchange offers for names. Full nodes could then keep track of an "order book", and external UIs could display it and help with building ANTs for those names. This all could be optional, perhaps so that users can control with some option whether or not their full node should take part in offer routing (e.g. with a new services bit).
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

biolizard89
Posts: 1978
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: Decentralised exchange for names

Post by biolizard89 » Tue Nov 06, 2018 7:35 pm

domob wrote:
Tue Oct 30, 2018 8:14 am
I've recently been thinking about how to best implement a decentralised exchange for names (built upon atomic name trading but including some mechanism to post and match offers). I think that the core P2P network can be utilised also to exchange offers (not the blockchain, though, to avoid unnecessary "spam" in it). I've also written up a draft paper about how to avoid spam in this setting:

http://arxiv.org/abs/1810.11675

We certainly want to implement something like this for the Xaya network in the future. It is something that would be useful for core Namecoin as well, I think - so what do you all think about adding it on the Namecoin level already (which would then also be usable for Xaya)?

Basically, we extend the P2P protocol such that it can also exchange offers for names. Full nodes could then keep track of an "order book", and external UIs could display it and help with building ANTs for those names. This all could be optional, perhaps so that users can control with some option whether or not their full node should take part in offer routing (e.g. with a new services bit).
Hmm, I'm a bit skeptical of using the Namecoin wire protocol for this. It might be worth considering using a separate process for the P2P protocol; this would make sandboxing easier, and also allow the relevant P2P code to be in a different language (e.g. a memory-safe language instead of C++). It might also be worth considering whether there are any existing order book protocols/applications that we could utilize for this. (Two that come to mind immediately are Bisq and OpenBazaar.)
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

domob
Posts: 1120
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Decentralised exchange for names

Post by domob » Wed Nov 07, 2018 7:54 am

These are valid points, but to me a big advantage of using the Namecoin P2P network itself is that with all other solutions, you need to set up and manage a separate P2P network - including how to seed nodes, perhaps running some stable nodes by the community and so on.

Also, I certainly would like to avoid rewriting yet another P2P gossip protocol. If there are good ones to use around, we can think about using them, though - although I don't like either Bisq or OpenBazaar, because their languages (Java and Python, IIRC) are IMHO both not well suited for building such a system. C++ is actually not too bad - if you make sure you use modern language features and RAII properly, you can actually write code that does not touch any raw pointers at all.

To clarify the requirements a bit more: What the new P2P layer / network would need to do is mainly relay offers for buying or selling names. Those offers would be tied to an UTXO, namely either the name in question or an output that holds the buyer's NMC. So the second main functionality besides relaying and keeping track of offers would be making sure that offers related to a spent or otherwise invalid output are not relayed or removed from the current list. I believe that this is not a hard task, and one quite specific to our needs. Thus, even ignoring the language dislikes I have, I don't think Bisq (even more since Bisq deals with fungible currencies while names are non-fungible) or OpenBazaar would be very useful. The main thing that we may be able to resuse is a generic gossip P2P network layer - which already exists in Namecoin Core and could be used without too much additional coding effort IMHO. But I'm open to use another existing P2P network layer to build this as well.

The UI for displaying offers and allowing the user to interact with them would always be in a separate process anyway, that could hook onto the core daemon using JSON-RPC. So that part (which is probably more similar to Bisq / OpenBazaar and probably also more work coding-wise) would be separated off anyway.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

domob
Posts: 1120
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Decentralised exchange for names

Post by domob » Wed Nov 07, 2018 9:04 am

(Writing a new post to keep some structure and not extend the already existing wall of text.)

After some more thought, all we need is really just a basic P2P gossip network. So perhaps even writing that one from scratch would not be too much work and produce too much complexity - it is probably just a few hundred lines of code. That may actually be a good idea - unless there is a really good, fitting and simple existing P2P code we could use.

While I still think that reusing the P2P layer of Namecoin Core has its benefits, writing a simple and clean stand-alone tool for this purpose may indeed be the way to go. I'll keep thinking about how the overall design would then look like and what interactions there would need to be between this tool, Namecoin Core and a UI. If writing a new tool, then Go could be a good language of choice from my point of view.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

samurai321
Posts: 17
Joined: Sun Aug 27, 2017 10:46 pm
os: windows
Location: varies

Re: Decentralised exchange for names

Post by samurai321 » Sat Dec 08, 2018 3:27 pm

How about an add-on for an already existing decentralized exchange like bisq, barter dex or similar, then there will be just an orderbook but with names for sale and names that people want to buy, after all, to exchange between altcoins and exchange of names is no different. both are trustless.
Keep calm and gather moar namecoins

domob
Posts: 1120
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Decentralised exchange for names

Post by domob » Sat Dec 08, 2018 3:32 pm

samurai321 wrote:
Sat Dec 08, 2018 3:27 pm
How about an add-on for an already existing decentralized exchange like bisq, barter dex or similar, then there will be just an orderbook but with names for sale and names that people want to buy, after all, to exchange between altcoins and exchange of names is no different. both are trustless.
I don't know about Barter Dex, but Bisq is in my opinion quite different from what we would need here. First, because Bisq is about trading fungible currency, while names are non-fungible by nature. Second, because Bisq is all about trading "stuff" vs bitcoin and centred about a trusted arbitration system. The proposed name exchange would be names vs bamecoin and done atomically and trustless in nature. So except for potentially the network and UI for showing an order book, there is not much to share here.

What would be more appropriate is an exchange for NFTs like OpenSea, but that is a) centralised and b) tightly integrated with the Ethereum ecosystem as far as I can tell. But perhaps there is something decentralised like it.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

Post Reply