Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: coinbridge on January 20, 2014, 11:12:10 PM



Title: Will Bitcoin client do direct peer-peer coin exchange
Post by: coinbridge on January 20, 2014, 11:12:10 PM
Is there a plan in the future Bitcoin versions to implement a function to allow the user to directly trade Bitcoins with altcoins without the "take and run" risk? I see this as a valuable feature and wonder if it's already built into the current Bitcoin protocol or it can be easily added to the current client via an API.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: BurtW on January 20, 2014, 11:20:12 PM
I assume you are asking for the following:

Wallet one:  send X BTC to wallet two but only after getting Y crapcoins.

Wallet two:  send Y crapcoins to wallet one but only after getting X BTC.

Someone has to go first.

They are on different protocols.

Now I could see someone offering a web site escrow service that would do something like this.

Wallet one:  put X BTC in escrow at the escrow site, waiting on Y crapcoins.

Wallet two:  put Y crapcoins in escrow at the escrow site, waiting on X BTC.

Escrow site:  when both parts of the escrow are confirmed, send Y crapcoins to wallet one (minus a fee) and send X BTC to wallet two (minus a fee).


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: coinbridge on January 20, 2014, 11:28:12 PM
Yes but I want to do it without going through a centralized exchange. The trade needs to be direct peer to peer, no escrow accounts and so on. There can be a website where people post offers and bids and make deals but the actual exchange are purely between their wallets.



Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: BurtW on January 20, 2014, 11:44:55 PM
I do not see a way to do it without escrow because someone has to go first or you have a deadlock - see my post above.

Maybe someone smarter than I can help you out.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: coinbridge on January 20, 2014, 11:55:16 PM
The question always is: who sends first?

That's when middlemen step in, but that's the old world way!

I can see crypto-fiat trade in that fashion because there are no options.

But inter-crypto trades going through centralized exchanges is a disgrace.

It's deeply unsatisfying to see that, especially the solution is very simple for crytocurrencies. I don't know why Bitcoin does not have this feature. May be it never anticipated the viability of altcoins.


 


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: BurtW on January 21, 2014, 12:04:39 AM
The question always is: who sends first?

That's when middlemen step in, but that's the old world way!

I can see crypto-fiat trade in that fashion because there are no options.

But inter-crypto trades going through centralized exchanges is a disgrace.

It's deeply unsatisfying to see that, especially the solution is very simple for crytocurrencies. I don't know why Bitcoin does not have this feature. May be it never anticipated the viability of altcoins.
So, you already have a solution to the "who goes first" issue?  Can you describe it please.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: coinbridge on January 21, 2014, 12:12:28 AM
I do not see a way to do it without escrow because someone has to go first or you have a deadlock - see my post above.

Maybe someone smarter than I can help you out.

Yes you can do it without escrow. I just want to know if Bitcoin or any altcoins already have it in the plan so I'm not wasting my time.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: coinbridge on January 21, 2014, 12:25:59 AM
The question always is: who sends first?

That's when middlemen step in, but that's the old world way!

I can see crypto-fiat trade in that fashion because there are no options.

But inter-crypto trades going through centralized exchanges is a disgrace.

It's deeply unsatisfying to see that, especially the solution is very simple for crytocurrencies. I don't know why Bitcoin does not have this feature. May be it never anticipated the viability of altcoins.
So, you already have a solution to the "who goes first" issue?  Can you describe it please.

I'll describe it that after I get some responses to my original question.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: StevenS on January 21, 2014, 12:44:15 AM
The only way I can see this working is if there is a kind of transaction (tx) that depends on a tx from a different protocol. That is:

tx1: Send X BTC to wallet two if and only if there is a tx2 (which has to be allowed to be attached after tx1 is signed) that meets certain parameters, such that it sends Y altcoin from altwallet two to altwallet one. Part of tx1 has to be a "timeout" value that either cancels the transaction, or sends the BTC somewhere else if tx2 doesn't happen.

After the owner of wallet two sees tx1 on the network, he could then issue tx2, which would do the altcoin transfer and also be attached somehow to the Bitcoin blockchain.

The problem is that this would greatly complicate the Bitcoin protocol. I have trouble seeing how something like this could be made generic enough for arbitrary altcoins.

I would guess that there is a .01% chance of this happening.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: maaku on January 21, 2014, 01:22:22 AM
Someone has to go first.

They are on different protocols.

This is incorrect. See, for example, CoinSwap and the atomic exchange contract on the bitcoin wiki as ways this could be done now.

Also, with protocol extensions the limitations of these techniques could be worked around as well.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: coinbridge on January 21, 2014, 02:26:50 AM
So if Bitcoin does not have such a protocol in place, how hard is it to implement such a protocol in the future? What would prevent it from doing this?


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: BurtW on January 21, 2014, 04:36:08 AM
Coinswap is all Bitcoin and uses the current protocol without any changes.

I was thinking about CoinJoin.  See below.  Oops.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: maaku on January 21, 2014, 06:34:13 AM
There's no reason you can't do CoinSwaps across chains (it's even mentioned in the introductory post). Maybe you're thinking of CoinJoin?


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: BurtW on January 21, 2014, 01:33:15 PM
Ah yes those two names are so similar.  Nevermind.  Carry on.  This could be very interesting as long as it can be done with no changes to Bitcoin.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: coinbridge on January 21, 2014, 09:03:10 PM
Ah yes those two names are so similar.  Nevermind.  Carry on.  This ccould be very interesting as long as it can be done with no changes to Bitcoin.

I'm puzzled by the insistence not to changes Bitcoin protocols. Is it a technical challenge? In my mind they can't they just do that in the next version update?


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: prezbo on January 21, 2014, 09:06:28 PM
Ah yes those two names are so similar.  Nevermind.  Carry on.  This ccould be very interesting as long as it can be done with no changes to Bitcoin.
The atomic cross-chain trading (https://en.bitcoin.it/wiki/Atomic_cross-chain_trading) maaku mentioned already works without any changes to the protocol(s), all it needs is an easy to use implementation.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: BurtW on January 21, 2014, 09:11:12 PM
Ah yes those two names are so similar.  Nevermind.  Carry on.  This ccould be very interesting as long as it can be done with no changes to Bitcoin.

I'm puzzled by the insistence not to changes Bitcoin protocols. Is it a technical challenge? In my mind they can't they just do that in the next version update?
One of the best things about Bitcoin and the Bitcoin protocol is that it is basically impossible to change.  It is one of the reasons I and many others are here.  If it could be changed as easily as a next update then I and many others would not be here because it would just devolve into a total steaming pile of crap trying to satisfy everyone's whims.

Maybe now you can understand why us cranky old timers get so tired of threads that start "Bitcoin is cool but it need to be changed to do _____", because one to the best things about the design of Bitcoin is that it is impossible to change it to suit the desires of the day.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: whtchocla7e on January 21, 2014, 09:12:30 PM
If doesn't matter who sends first as long as both parties initiate the transaction. The bitcoin client acts as the escrow and handles the sending. A black box.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: BurtW on January 21, 2014, 09:13:23 PM
The atomic cross-chain trading (https://en.bitcoin.it/wiki/Atomic_cross-chain_trading) maaku mentioned already works without any changes to the protocol(s), all it needs is an easy to use implementation.
Sounds great.  The OP can take that and run with it.  I am looking forward to the results.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: Klestin on January 21, 2014, 09:17:01 PM
Beat to the punch.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: Mitchell on January 21, 2014, 09:20:54 PM
Well the Bitcoin code can be changed, but it's kinda hard to do because 51% of the network has to agree with these changes. But, I see your point and I totally agree with you. You don't like it? Who the hell cares, bye.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: BurtW on January 21, 2014, 09:30:13 PM
Well the Bitcoin code can be changed, but it's kinda hard to do because 51% of the network has to agree with these changes. But, I see your point and I totally agree with you. You don't like it? Who the hell cares, bye.
No.

Even if 51% of the network agrees with a major change then it does not affect Bitcoin.  What happens is that the 49% that does not agree with the change is still Bitcoin and the 51% that wants the change becomes a new coin by design.

Even if you get 75% to agree (with a major change that causes a hard fork) you still have 25% of the "die hard" miners and clients supporting Bitcoin and the 75% have just created a new alt coin.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: Mitchell on January 21, 2014, 09:44:45 PM
Well the Bitcoin code can be changed, but it's kinda hard to do because 51% of the network has to agree with these changes. But, I see your point and I totally agree with you. You don't like it? Who the hell cares, bye.
No.

Even if 51% of the network agrees with a major change then it does not affect Bitcoin.  What happens is that the 49% that does not agree with the change is still Bitcoin and the 51% that wants the change becomes a new coin by design.

Even if you get 75% to agree (with a major change that causes a hard fork) you still have 25% of the "die hard" miners and clients supporting Bitcoin and the 75% have just created a new alt coin.
Hmmm. I see your point. I never looked at it that way. But wouldn't the coins from the other 49%/25% be worthless, because the majority chooses for the new alt coin?


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: BurtW on January 21, 2014, 09:51:41 PM
Hmmm. I see your point. I never looked at it that way. But wouldn't the coins from the other 49%/25% be worthless, because the majority chooses for the new alt coin?
No, the market would decide the price of the Bitcoins and the Bitcoin alt.

Let's say the change was to invalidate or recycle the coins if they do not move in X years (a very popular change idea) then those two chains would diverge as one chain, the original, did not invalidate the coins and the other one did.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: maaku on January 21, 2014, 09:53:57 PM
If you want to make a hard-fork change to bitcoin, then you need every single node to upgrade. You need 100%.

It happened a couple of times in the early history of bitcoin. At this stage, it's basically impossible except in emergency response to consensus errors.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: Mitchell on January 21, 2014, 09:57:44 PM
Hmmm. I see your point. I never looked at it that way. But wouldn't the coins from the other 49%/25% be worthless, because the majority chooses for the new alt coin?
No, the market would decide the price of the Bitcoins and the Bitcoin alt.

Let's say the change was to invalidate or recycle the coins if they do not move in X years (a very popular change idea) then those two chains would diverge as one chain, the original, did not invalidate the coins and the other one did.
Ah, I see. Of course. Interesting stuff. I really should read the white paper and all the technical stuff. I have been saying that for months and still haven't done it. Oh well.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: BurtW on January 21, 2014, 10:03:32 PM
Ah, I see. Of course. Interesting stuff. I really should read the white paper and all the technical stuff. I have been saying that for months and still haven't done it. Oh well.
Read this entire thread:

https://bitcointalk.org/index.php?topic=352734.0

I think it answers a lot of questions in this area and it is not too long.


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: Mitchell on January 21, 2014, 10:06:04 PM
Ah, I see. Of course. Interesting stuff. I really should read the white paper and all the technical stuff. I have been saying that for months and still haven't done it. Oh well.
Read this entire thread:

https://bitcointalk.org/index.php?topic=352734.0

I think it answers a lot of questions in this area and it is not too long.
Will do, thanks dude ;)


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: e4xit on January 22, 2014, 01:49:46 PM
Well the Bitcoin code can be changed, but it's kinda hard to do because 51% of the network has to agree with these changes. But, I see your point and I totally agree with you. You don't like it? Who the hell cares, bye.
No.

Even if 51% of the network agrees with a major change then it does not affect Bitcoin.  What happens is that the 49% that does not agree with the change is still Bitcoin and the 51% that wants the change becomes a new coin by design.

Even if you get 75% to agree (with a major change that causes a hard fork) you still have 25% of the "die hard" miners and clients supporting Bitcoin and the 75% have just created a new alt coin.

I would argue (semantically) based on nothing but my opinion, that  a chain with greater then 51% of the network agreeing to would continue on as **the** bitcoin (chain), and the 49% left behind without the changes woudl have to be then considered to be the alt-coin.

Surely the larger % (if greater than 50%) must be considered the "main chain". If i were to boot up a pre-hard-fork bitcoin instance now under you logic that might be the only node in the world running *pure* bitcoin, with the 99.99% of us on the current chain simply using an "alt-coin".

Your point largely still stands though...


Title: Re: Will Bitcoin client do direct peer-peer coin exchange
Post by: BurtW on January 22, 2014, 04:04:04 PM
I would argue (semantically) based on nothing but my opinion, that  a chain with greater then 51% of the network agreeing to would continue on as **the** bitcoin (chain), and the 49% left behind without the changes woudl have to be then considered to be the alt-coin.

Surely the larger % (if greater than 50%) must be considered the "main chain". If i were to boot up a pre-hard-fork bitcoin instance now under you logic that might be the only node in the world running *pure* bitcoin, with the 99.99% of us on the current chain simply using an "alt-coin".

Your point largely still stands though...
Yes, a split of any magnitude would cause this to be argued ad nauseum.  "We are the real Bitcoin", "No, we are the real Bitcoin".

But, it is never going to happen because all these people that come up with bright ideas of how to change Bitcoin never actually do it.  They just sit and post about it over and over.  Those that actually do something go create an alt coin with a totally new chain.  Creating an alt as a blockchain branch has a real issue:  all of us that own pre branch coins now own coins on both branches and given any value to the alt we can all dump our alt coins and crash their alt coin market and use the proceeds to buy more real Bitcoins.