Fair exchange of a Namecoin name to NMC

Post Reply
snailbrain
Posts: 309
Joined: Tue Jul 19, 2011 9:33 pm

Fair exchange of a Namecoin name to NMC

Post by snailbrain »

Image
The transaction is created by the buyer. He uses name_show to look up the address of LOCKED COIN. Then he signs the second input (1000 NMC) using rawtransaction RPC. Currently rawtransaction doesn’t support names, need to implement this. Then he sends the hex-encoded and semi-signed tx to seller.

Seller decodes the hex tx using decoderawtransaction and verifies that the price is correct and his receiving address is correct. He then signs the tx and broadcasts it.

Buyer can also include JSON VALUE in the LOCKED COIN output, so he receives the name with the value that he wants (no need to issue name_update after the deal).

This operation is atomic — either both parties get what they want or both keep what they have. It’s not possible to transfer the name only or money only, since both are in one tx, which is only valid if signed by both parties.

When messages are supported in Namecoin, name trading can be done by sending a hex-encoded tx (offer) directly to the name. Namecoin client can look for such messages, automatically decode and show a pop-up with accept / decline buttons.

virtual_master
Posts: 541
Joined: Mon May 20, 2013 12:03 pm
Contact:

Re: Fair exchange of a Namecoin name to NMC

Post by virtual_master »

snailbrain wrote:Image
The transaction is created by the buyer. He uses name_show to look up the address of LOCKED COIN. Then he signs the second input (1000 NMC) using rawtransaction RPC. Currently rawtransaction doesn’t support names, need to implement this. Then he sends the hex-encoded and semi-signed tx to seller.

Seller decodes the hex tx using decoderawtransaction and verifies that the price is correct and his receiving address is correct. He then signs the tx and broadcasts it.

Buyer can also include JSON VALUE in the LOCKED COIN output, so he receives the name with the value that he wants (no need to issue name_update after the deal).

This operation is atomic — either both parties get what they want or both keep what they have. It’s not possible to transfer the name only or money only, since both are in one tx, which is only valid if signed by both parties.

When messages are supported in Namecoin, name trading can be done by sending a hex-encoded tx (offer) directly to the name. Namecoin client can look for such messages, automatically decode and show a pop-up with accept / decline buttons.
I must say it looks very cool.
:) :) :)
It is a concept or there is an algorithm also how should it work concretely ?
http://namecoinia.org/
Calendars for free to print: 2014 Calendar in JPG | 2014 Calendar in PDF Protect the Environment with Namecoin: 2014 Calendar in JPG | 2014 Calendar in PDF
BTC: 15KXVQv7UGtUoTe5VNWXT1bMz46MXuePba | NMC: NABFA31b3x7CvhKMxcipUqA3TnKsNfCC7S

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: Fair exchange of a Namecoin name to NMC

Post by phelix »

A Namecoin name is always linked to a particular transaction output.

Basically you do this but with a special "name-coin":
https://bitcointalk.org/index.php?topic=112007.0 Atomic coin swapping

It would also be possible to exchange one name for another.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

virtual_master
Posts: 541
Joined: Mon May 20, 2013 12:03 pm
Contact:

Re: Fair exchange of a Namecoin name to NMC

Post by virtual_master »

phelix wrote:A Namecoin name is always linked to a particular transaction output.

Basically you do this but with a special "name-coin":
https://bitcointalk.org/index.php?topic=112007.0 Atomic coin swapping

It would also be possible to exchange one name for another.
Thanks.
Then we should watch this thread and when this colored coin technology will be ready we could implement it in Namecoin also.
http://namecoinia.org/
Calendars for free to print: 2014 Calendar in JPG | 2014 Calendar in PDF Protect the Environment with Namecoin: 2014 Calendar in JPG | 2014 Calendar in PDF
BTC: 15KXVQv7UGtUoTe5VNWXT1bMz46MXuePba | NMC: NABFA31b3x7CvhKMxcipUqA3TnKsNfCC7S

pitbull
Posts: 24
Joined: Wed Oct 23, 2013 4:52 pm
os: linux

Re: Fair exchange of a Namecoin name to NMC

Post by pitbull »

Brilliant, what's stopping this from being implemented now vs. waiting for colored coins?

virtual_master
Posts: 541
Joined: Mon May 20, 2013 12:03 pm
Contact:

Re: Fair exchange of a Namecoin name to NMC

Post by virtual_master »

pitbull wrote:Brilliant, what's stopping this from being implemented now vs. waiting for colored coins?
It was a consensus that rebasing the Namecoin client has the highest priority for now:
http://dot-bit.org/forum/viewtopic.php?f=5&t=1009
http://dot-bit.org/forum/viewtopic.php?f=8&t=519

Until the rebase is not ready only projects which doesn't interfere can be developed parallel with it.

But as far as I know this concept of automatic selling domains for namecoins existed before colored coins even appeared so I am sure that it will be implemented anyway(even if the colored coins project will be abandoned) when the Namecoin development status and capacity will allow it.
http://namecoinia.org/
Calendars for free to print: 2014 Calendar in JPG | 2014 Calendar in PDF Protect the Environment with Namecoin: 2014 Calendar in JPG | 2014 Calendar in PDF
BTC: 15KXVQv7UGtUoTe5VNWXT1bMz46MXuePba | NMC: NABFA31b3x7CvhKMxcipUqA3TnKsNfCC7S

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: Fair exchange of a Namecoin name to NMC

Post by phelix »

pitbull wrote:Brilliant, what's stopping this from being implemented now vs. waiting for colored coins?
Nothing. It should be working "out of the box" as described by snailbrain's post.

To create a decentralized market one could use Bitmessage for now (as the "holy grail" in moneychanger).
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: Fair exchange of a Namecoin name to NMC

Post by khal »

Would 20 bytes be sufficient to do that ?

It would be made of :
- a name_new
- with some locked coins (could match the real offer / 1000 to announce a price)
- sent to the address of current name owner
- and 20 bytes of data

Making an offer is possible, but I don't think signed data would fit.
Maybe with P2SH ? (rebase needed :p)
Or in several messages ? (a bit dirty :p)
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

snailbrain
Posts: 309
Joined: Tue Jul 19, 2011 9:33 pm

Re: Fair exchange of a Namecoin name to NMC

Post by snailbrain »

khal wrote:Would 20 bytes be sufficient to do that ?

It would be made of :
- a name_new
- with some locked coins (could match the real offer / 1000 to announce a price)
- sent to the address of current name owner
- and 20 bytes of data

Making an offer is possible, but I don't think signed data would fit.
Maybe with P2SH ? (rebase needed :p)
Or in several messages ? (a bit dirty :p)
I don't see any specific reason for using NAME_NEW-style 20-byte messages. We can use either normal names, or a new type of non-standard transactions. I'm actually leaning towards the latter approach. The only drawback is that the users of older client won't notice the transaction, while with name they'll see that something was transferred to them and will be able to upgrade the client.

khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: Fair exchange of a Namecoin name to NMC

Post by khal »

snailbrain wrote:
I don't see any specific reason for using NAME_NEW-style 20-byte messages. We can use either normal names, or a new type of non-standard transactions. I'm actually leaning towards the latter approach. The only drawback is that the users of older client won't notice the transaction, while with name they'll see that something was transferred to them and will be able to upgrade the client.
There is only one : name_new will certainly be cheap (less expensive that name_(first)update) because it do not use a unique name (the scarce resources of namecoin), even with the future name fee system.

When we'll implement the message system (with a name_new + a message in that case, to have some persistence/way to ask for the message when you receive a name_new to your address), it will allow all sort of things that would require to be done offchain now, without the need to modify the protocol, only the client softwares.
And, if some usages soft-coded in the client meet success, we can later update the protocol to add new OP_CODE / styles of transactions to do it in the blockchain.


ps : I've no preference for name_new or another one
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

Post Reply