Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: Elwar on April 11, 2013, 11:56:06 PM



Title: A decentralized exchange!
Post by: Elwar on April 11, 2013, 11:56:06 PM
A decentralized exchange would require each person converting dollars to Bitcoins or the other way around to become a registered currency exchanger according to FinCEN. This comes will $millions in fees.

Gotta love government created monopolies.


Title: Re: A decentralized exchange!
Post by: gollum on April 12, 2013, 02:00:37 AM
A decentralized exchange would require each person converting dollars to Bitcoins or the other way around to become a registered currency exchanger according to FinCEN. This comes will $millions in fees.

Gotta love government created monopolies.

We are discussing a solution for a p2p based decentralized bitcoin exchange.
https://bitcointalk.org/index.php?topic=172705.0
https://github.com/p2p/bitcoin-exchange


Title: Re: A decentralized exchange!
Post by: wumpus on April 12, 2013, 04:27:42 AM
Elwar: I suppose the idea around that is to trade small amount between people, so no one is really "the exchanger". A bit like bitcoin-otc but more automated and easier to use.

We are discussing a solution for a p2p based decentralized bitcoin exchange.
https://bitcointalk.org/index.php?topic=172705.0
https://github.com/p2p/bitcoin-exchange
Even with a github repository with only a README.md in it, you're already doing 1000% more than all people theorizing around here :) Good luck!


Title: Re: A decentralized exchange!
Post by: Mike Christ on April 12, 2013, 04:31:45 AM
The answer:

Demand payment in Bitcoin!

And if that doesn't work, wait a while, get more people to say it with you, and the say it again.

Repeat as many times as it takes ;D


Title: Re: A decentralized exchange!
Post by: gollum on April 12, 2013, 04:41:56 AM
Elwar: I suppose the idea around that is to trade small amount between people, so no one is really "the exchanger". A bit like bitcoin-otc but more automated and easier to use.

We are discussing a solution for a p2p based decentralized bitcoin exchange.
https://bitcointalk.org/index.php?topic=172705.0
https://github.com/p2p/bitcoin-exchange
Even with a github repository with only a README.md in it, you're already doing 1000% more than all people theorizing around here :) Good luck!


Every great project begins with a ReadMe File :)


Title: Re: A decentralized exchange!
Post by: Elwar on April 12, 2013, 04:47:00 AM
A decentralized exchange would require each person converting dollars to Bitcoins or the other way around to become a registered currency exchanger according to FinCEN. This comes will $millions in fees.

Gotta love government created monopolies.

We are discussing a solution for a p2p based decentralized bitcoin exchange.
https://bitcointalk.org/index.php?topic=172705.0
https://github.com/p2p/bitcoin-exchange


Just be sure to address this:

Quote
a person is an exchanger and a money transmitter if the person accepts such de-centralized convertible virtual currency from one person and transmits it to another person as part of the acceptance and transfer of currency, funds, or other value that substitutes for currency.


When a follow up was asked of FinCEN, no minimum was included. Anybody who exchanges bitcoins for fiat is an exchanger.

Even at bitcoin-otc or localbitcoins they are exchanging money illegally if doing it in the US without a license.

If you plan on trying to do it but stay under the radar then you may want to make sure it will run in Tor and mimick the Silk Road approach.


Title: Re: A decentralized exchange!
Post by: Sage on April 12, 2013, 04:52:46 AM
A decentralized exchange would require each person converting dollars to Bitcoins or the other way around to become a registered currency exchanger according to FinCEN. This comes will $millions in fees.

Gotta love government created monopolies.

We are discussing a solution for a p2p based decentralized bitcoin exchange.
https://bitcointalk.org/index.php?topic=172705.0
https://github.com/p2p/bitcoin-exchange


Just be sure to address this:

Quote
a person is an exchanger and a money transmitter if the person accepts such de-centralized convertible virtual currency from one person and transmits it to another person as part of the acceptance and transfer of currency, funds, or other value that substitutes for currency.


When a follow up was asked of FinCEN, no minimum was included. Anybody who exchanges bitcoins for fiat is an exchanger.

Even at bitcoin-otc or localbitcoins they are exchanging money illegally if doing it in the US without a license.

If you plan on trying to do it but stay under the radar then you may want to make sure it will run in Tor and mimick the Silk Road approach.

Better yet... set it up to run on it's own network, using existing darknet open-source code.


Title: Re: A decentralized exchange!
Post by: Bitobsessed on April 12, 2013, 05:38:05 AM
What about Ripple?


Title: Re: A decentralized exchange!
Post by: SGExodus on April 12, 2013, 05:44:04 AM
Decentralized exchange is not possible because fiat money are involved in the transaction.

Sell order may be easy to distribute.  New "sell" function can be added to the existing client.  The client can check the wallet to ensure that you really have that much to sell, and then the coin can be "wrapped" in a digital envelope and transfer into the existing P2P network (to prevent double spend/double sell) to wait for the transaction to happen. A built-in sale-order chart can be added into the client.  This can display stats, such as average transacted price, volume, all the current sales order etc.

However,  buy order is tricky.  You need to prevent fake buy order that has no fund to execute the order.   Fake buy order can easily manipulate prices in the exchange.    

In the end, you will still need some trust worthy external escrow services, the like of the current exchanges such as mtgox, btc-e, to hold the fiat fund to ensure the validity of the buy order, and to transfer the fiat fund to the seller.



Title: Re: A decentralized exchange!
Post by: gollum on April 12, 2013, 05:45:34 AM
Decentralized exchange is not possible because fiat money are involved in the transaction.

Sell order may be easy to distribute.  New "sell" function can be added to the existing client.  The client can check the wallet to ensure that you really have much to sell, and then the coin can "wrapped" in a digital envelope and transfer into the existing P2P network (to prevent double spend/double sell) to wait for the transaction to happen. A built-in sale-order chart can be added into the client.  This can display stats, such as average transacted price, volume, all the current sales order etc.

However,  buy order is tricky.  You need to prevent fake buy order that has no fund to execute the order.   Fake buy order can easily manipulate prices in the exchange.    

In the end, you will still need some trust worthy external escrow services, the like of the current exchanges such as mtgox, btc-e, to hold the fiat fund to ensure the validity of the buy order, and to transfer the fiat fund to the seller.



Yes, we still need mtgox, btce and bitstamp to handle our fiat and bitcoins- but their role will be as brokers instead of exchanges.


Title: Re: A decentralized exchange!
Post by: wumpus on April 12, 2013, 05:57:55 AM
I found out that people have been working on decentralized exchanges already for a long time.

Overview of current projects:

- bitcoinx: http://www.bitcoinx.org/  

Protocol description: https://bitcoil.co.il/BitcoinX.pdf
Other code, as well as links to the forum can be found here: http://www.bitcoinx.org/resources/  
Repositories here on github: https://github.com/bitcoinx
Wiki: http://wiki.bitcoinx.org/index.php/Main_Page

- darkxchange "Dark Exchange is a distributed p2p exchange for bitcoin.". Uses the I2P network.

Source available at https://github.com/macourtney/Dark-Exchange  
Described on bitcoin wiki: https://en.bitcoin.it/wiki/Dark_Exchange .
Also has a forum thread: https://bitcointalk.org/index.php?topic=26063.0;

- opentransactions

Description on bitcoin wiki: https://en.bitcoin.it/wiki/Open_Transactions
Wiki: https://github.com/FellowTraveler/Open-Transactions/wiki
Source: https://github.com/FellowTraveler/Open-Transactions

Though it's not completely decentralized, you don't need to trust any single server.

- bitcoin-otc  http://bitcoin-otc.com

Not really software, but a P2P exchange nevertheless, and frontend software could be built.
Uses PGP web of trust combined with a reputation system.

IRC: #bitcoin-otc on freenode

=====
Any others? I know about ripple (https://ripple.com/), but it isn't really a distributed exchange. From what I understood the plan is to have central servers, owned by one company, to get fiat money into the system.


Title: Re: A decentralized exchange!
Post by: moni3z on April 12, 2013, 05:58:34 AM
A decentralized exchange would require each person converting dollars to Bitcoins or the other way around to become a registered currency exchanger according to FinCEN. This comes will $millions in fees.

Gotta love government created monopolies.

Yes

Also the person who invented such an exchange would be responsible for reporting everything that happens on the network and staffing compliance officers. Lol not joking

This is only going to work if done anonymously using Gnunet but sadly infrastructure not ready, Gnunet is too young to fend off the ddos internal flood knocking down the escrow peers


Title: Re: A decentralized exchange!
Post by: Severian on April 12, 2013, 06:00:04 AM
Non-negotiable warehouse receipts aren't money by anyone's standards.

Create cooperatives of gold/silver dealers and exchanges. Exchange deposits $100,000 (for example) with PM dealer. PM dealers issue non-negotiable warehouse receipts to purchasers with a code instead of PMs, up to the amount that exchange has on deposit. The code is convertible only on the exchanges in the co-op. At the end of the day, the exchange turns in warehouse receipts to PM dealer and deposit is re-upped.

PM dealers make money on fees and their metal never leaves the shop. People get onto exchanges without directly using fiat. Exchanges and users don't have to mess with banks.

Best of all, banks are cut out completely.



Title: Re: A decentralized exchange!
Post by: Elwar on April 12, 2013, 06:02:45 AM
Non-negotiable warehouse receipts aren't money by anyone's standards.

Create cooperatives of gold/silver dealers and exchanges. Exchange deposits $100,000 (for example) with PM dealer. PM dealers issue non-negotiable warehouse receipts to purchasers with a code instead of PMs, up to the amount that exchange has on deposit. The code is convertible only on the exchanges in the co-op. At the end of the day, the exchange turns in warehouse receipts to PM dealer and deposit is re-upped.

PM dealers make money on fees and their metal never leaves the shop. People get onto exchanges without directly using fiat. Exchanges and users don't have to mess with banks.

Best of all, banks are cut out completely.



Quote
or other value that substitutes for currency


Title: Re: A decentralized exchange!
Post by: moni3z on April 12, 2013, 06:03:07 AM
Open Transactions when it's ready will be good enough. If enough federated servers can just create our own currencies and act as exchanges for the fiat in and out of the system. These can be run over Gnunet and come with the bonus of crypto verification instead of relying on GnuNet DHT which is unreliable and possibility nodes can be faked (like faking an escrow node to scam..uhoh).


Title: Re: A decentralized exchange!
Post by: wumpus on April 12, 2013, 06:08:44 AM
Open Transactions
I forgot that one, I'll add it to my list! Though it's not completely decentralized, you don't need to trust any single server or company, which is already better than Mtgox etc.


Title: Re: A decentralized exchange!
Post by: gollum on April 12, 2013, 06:09:40 AM
Open Transactions
I forgot that one, I'll add it to my list! Though it's not completely decentralized, you don't need to trust any single server or company, which is already better than Mtgox etc.


Ive listed them all in github :)


Title: Re: A decentralized exchange!
Post by: Severian on April 12, 2013, 06:13:30 AM


Quote
or other value that substitutes for currency

I believe currency substitutes are foreign currency specifically. There are many domestic alternative currencies that aren't regulated.

A PM dealer issuing his own funny non-negotiable scrip to a consenting party is a-ok unless the sale of gold and silver for cash is being regulated again.


Title: Re: A decentralized exchange!
Post by: wumpus on April 12, 2013, 06:13:39 AM
Ive listed them all in github :)
Great!

I think one of the issues that needs to be addressed with the current projects is that they're unapproachable by normal users (and even normal developers). Bitcoin would likely not have lifted off if Satoshi hadn't made a simple Windows GUI for bitcoin.

Also, for example the opentransactions description and features list is kind of difficult to parse if you're not already into financial cryptography.


Title: Re: A decentralized exchange!
Post by: elebit on April 12, 2013, 06:16:14 AM
Sure, but what would you be exchanging _against_?

Perhaps USD, but paid how? Bank transfers between peers? Those take a day, during which the buyer can simply cancel if the bitcoins drop in value. So that's skewed to buyers. Credit cards? Good luck processing those. Paypal? Chargebacks.

There is already a decentralised exchange. It's called OTC. It has all these problems. If you want to reimplement it, at least look into solving them.


Title: Re: A decentralized exchange!
Post by: moni3z on April 12, 2013, 06:20:23 AM
Sure, but what would you be exchanging _against_?

Perhaps USD, but paid how? Bank transfers between peers? Those take a day, during which the buyer can simply cancel if the bitcoins drop in value. So that's skewed to buyers. Credit cards? Good luck processing those. Paypal? Chargebacks.

There is already a decentralised exchange. It's called OTC. It has all these problems. If you want to reimplement it, at least look into solving them.

You would create your own altcoin called Derp's USD coin and peg it to USD. Then you are now the gateway to cash fiat out of the network. They pay you to get Derpcoins and you hold money until somebody cash's out. People trade your altcoins against bitcoin and it acts as a voucher but secure. You would obviously mine these yourself. Could also use Open Transactions to do this. Whoever wanted to trade Derpcoin with you then could.

Problem with this is it's highly illegal with bullshit FinCen rules


Title: Re: A decentralized exchange!
Post by: gollum on April 12, 2013, 06:22:19 AM
Sure, but what would you be exchanging _against_?

Perhaps USD, but paid how? Bank transfers between peers? Those take a day, during which the buyer can simply cancel if the bitcoins drop in value. So that's skewed to buyers. Credit cards? Good luck processing those. Paypal? Chargebacks.

There is already a decentralised exchange. It's called OTC. It has all these problems. If you want to reimplement it, at least look into solving them.

I have described a complete exchange-broker-client system in github based on what Ive read in bitcointalk, and own experience from trading stocks/futures.

Im sure the best model is to have the exchange 100% decentralized and let the brokers work as they do today, having their own website and their own system handling clients funds. but instead of working separately they must start to collaberate and trust eachother and settle dollars & bitcoins regulary.

https://github.com/p2p/bitcoin-exchange


Title: Re: A decentralized exchange!
Post by: wumpus on April 12, 2013, 06:24:24 AM
There is already a decentralised exchange. It's called OTC. It has all these problems. If you want to reimplement it, at least look into solving them.
Yes, OTC is the obvious starting point. It's the only working decentralized exchange at this point. But I the current interface with IRC and PGP is not very usable for most people. Is there a project for a more friendly frontend? (I mean software, not so much a website, as that's again a single point of failure...) Also, though it is peer-to-peer, it currently completely leans on freenode maintaining the channel isn't it? And the gribble bot?


Title: Re: A decentralized exchange!
Post by: gollum on April 12, 2013, 06:26:27 AM
There is already a decentralised exchange. It's called OTC. It has all these problems. If you want to reimplement it, at least look into solving them.
Yes, OTC is the obvious starting point. It's the only working decentralized exchange at this point. But I think the current interface with IRC and PGP is not very usable for most people. Is there a project for a more friendly frontend?


If the brokers use the OTC the end users dont need to even know about OTC. They will trade happily and easily in the frontend as they do today without knowing whats happening in the backend.


Title: Re: A decentralized exchange!
Post by: moni3z on April 12, 2013, 06:31:42 AM
There is already a decentralised exchange. It's called OTC. It has all these problems. If you want to reimplement it, at least look into solving them.
Yes, OTC is the obvious starting point. It's the only working decentralized exchange at this point. But I the current interface with IRC and PGP is not very usable for most people. Is there a project for a more friendly frontend? (I mean software, not so much a website, as that's again a single point of failure...) Also, though it is peer-to-peer, it currently completely leans on freenode maintaining the channel isn't it?


You could actually make a pretty decent p2p IRC group of servers over gnunet that would be resistant to ddos with pseudo anonymous communications resistant to timing analysis which is Gnunet's strength. You can also run Tor IRC servers and Freenet/i2p servers easily.

IRC is the solution. It already exists, and is being used to bootstrap most p2p node propagation.
http://ieeexplore.ieee.org/xpl/articleDetails.jsp?reload=true&arnumber=5159226

paywall but there's copies around

Users don't use reg IRC clients they use a front end for it that automates everything including identifying with gribble (the bot(s) that would run on the decentralized network, not flooding the existing bitcoin-otc channel) and have a chat or trollbox they could use


Title: Re: A decentralized exchange!
Post by: virtualmaster on April 12, 2013, 08:29:04 AM
Ripple is unfortunately more complicated than bitcoin, namecoin, litecoin and ppcoin together.
And even bitcoin is to complicated for the most people than how should they use ripple ?
We need a more simple and understandable solution. Like Liberty Reserve for EUR and USD but decentralized and based on bitcoin technology.
Lets say Cryptodollar and Cryptoeuro. 1 cryptodollar= 1 dollar, 1 cryptoeuro= 1 euro.
Then you can change bitcoin for cryptodollar by a cryptochange like bitparking was. This type of exchanges are less regulated than fiat exchanges because all are virtual.


Title: Re: A decentralized exchange!
Post by: Sage on April 12, 2013, 09:22:49 AM
A decentralized exchange would require each person converting dollars to Bitcoins or the other way around to become a registered currency exchanger according to FinCEN. This comes will $millions in fees.

Gotta love government created monopolies.

Yes

Also the person who invented such an exchange would be responsible for reporting everything that happens on the network and staffing compliance officers. Lol not joking

This is only going to work if done anonymously using Gnunet but sadly infrastructure not ready, Gnunet is too young to fend off the ddos internal flood knocking down the escrow peers

A bitcoin miner driven darknet network solves this problem.


Title: Re: A decentralized exchange!
Post by: elebit on April 12, 2013, 09:31:03 AM
You would create your own altcoin called Derp's USD coin and peg it to USD. Then you are now the gateway to cash fiat out of the network. They pay you to get Derpcoins and you hold money until somebody cash's out. People trade your altcoins against bitcoin and it acts as a voucher but secure. You would obviously mine these yourself. Could also use Open Transactions to do this. Whoever wanted to trade Derpcoin with you then could.
That's a promising idea. I like it, but I am skeptical on how you could possibly bootstrap a coin pegged to USD. It would not be an altcoin based on a blockchain, just signed by an authority who guaratees the value. There are some obvious trust issues here.

But I'm all for it in principle, as it would empower the decentralised exchanges. This is the core problem to solve. Focus on this, not on how to build yet another useless peer-to-peer web framework. A thousand of those would bloom if there was a medium of fiat exchange that could work decentralised without the risk of chargebacks etc.


Title: Re: A decentralized exchange!
Post by: moni3z on April 12, 2013, 10:22:24 AM
You would create your own altcoin called Derp's USD coin and peg it to USD. Then you are now the gateway to cash fiat out of the network. They pay you to get Derpcoins and you hold money until somebody cash's out. People trade your altcoins against bitcoin and it acts as a voucher but secure. You would obviously mine these yourself. Could also use Open Transactions to do this. Whoever wanted to trade Derpcoin with you then could.
That's a promising idea. I like it, but I am skeptical on how you could possibly bootstrap a coin pegged to USD. It would not be an altcoin based on a blockchain, just signed by an authority who guaratees the value. There are some obvious trust issues here.

But I'm all for it in principle, as it would empower the decentralised exchanges. This is the core problem to solve. Focus on this, not on how to build yet another useless peer-to-peer web framework. A thousand of those would bloom if there was a medium of fiat exchange that could work decentralised without the risk of chargebacks etc.

various fiat gateways around the world would release their own vouchers/coin pegged to fiat who had otr ratings and were trusted enough to use, then in the exchange users would just p2p trade between themselves through escrow nodes/bots run by anybody with trusted rating, or between users who trust each other enough to trade and are gpg identified like what happens everyday on #bitcoin-otc.

mtgoxusd/vouchx is the same thing basically. if you had one of these vouchers or exchanger coins you could cash directly from whoever issued it or trade it p2p with somebody else looking to buy in and get coins. ripple sort of works this way too, except it's closed source .

now you can write a bot and have it buy/sell automatically for you across the network using escrow bots. jack up the anonymity level on it (choosing your level of anonymity is actually a gnunet feature), configure stop loss, and it could trade safely since nobody could find it. it would only be identified by it's gpg authentication handle/ratings and resolved GADS name through dht, which other traders could look up, which hopefully had some sort of contact info if there was a problem. because bitcoin does multisig cold wallets you could run a separate security bot to watch and verify trades with a second signature to move the coins, either automatically or it sends a signal to user to manually initiate trade if they are satisfied.

on the users end they would just enter a price/market/limit and click sell and bot would do it's thing until it found a match based on pre defined trust levels and prompt you if you wanted to proceed or configure it to auto trade and let it go for awhile trying to find the best price.


Title: Re: A decentralized exchange!
Post by: elebit on April 12, 2013, 12:18:54 PM
various fiat gateways around the world would release their own vouchers/coin pegged to fiat who had otr ratings and were trusted enough to use, then in the exchange users would just p2p trade between themselves through escrow nodes/bots run by anybody with trusted rating, or between users who trust each other enough to trade and are gpg identified like what happens everyday on #bitcoin-otc.

That's where we disagree. I think trading mtgoxusd-vouchers have obvious trust issues and that that is the reason they are not used more, and not that traders are somehow unwilling to use IRC/PGP. There are issues around divisibility, MtGox' availability, and the sheer paper work required to get bank transfers going (not to mention the two week waiting list) that needs to work a lot smoother before the user interface turns out to be the primary problem.


Title: Re: A decentralized exchange!
Post by: BkkCoins on April 12, 2013, 01:07:46 PM
The problem of a decentralized exchange could be reduced the the establishment of an escrow and trade recording network.

The trade messaging and recording could be done with a modified copy of Bitcoin where the escrow agents use their keys to sign messages about trades. Call it BitTrade.

A trade would involve the bitcoin seller sending coins into escrow (via Bitcoin) until the fiat is paid directly to the seller. The recording of settlement is handled by the escrow agent who then signs messages for each stage onto the BitTrade network which are recorded into it's chain.

Stages might be: Offer (Bid/Ask), Accept Escrow, Complete, Cancelled. So those messages with qty/price and other details would get encoded into the chain. The escrow agent signs them to validate each stage is genuine and builds up a trust level based on past transaction count.

With escrow signing built into Bitcoin this type of escrow can be handled easily and the only step that needs to occur in the "real"world is transfer of fiat to the seller. This could be handled in numerous ways from meeting in person, postal mail order, WU, ACH transfer, or bank transfer.

A BitTrade client would view the BitTrade blockchain and always be able to present a market view based on activity globally at any moment. Info would consist of trades initiated, in escrow and completed or cancelled. Some nice charts could be drawn up too.

This could be seen as an automated version of bitcoin-otc with it's own validating recording blockchain. Outsiders need not even know what any money transferred was for. Could be anything much like buying/selling on eBay could be anything.


Title: Re: A decentralized exchange!
Post by: elebit on April 12, 2013, 01:54:48 PM
A trade would involve the bitcoin seller sending coins into escrow (via Bitcoin) until the fiat is paid directly to the seller.

Adding an escrow option to OTC would indeed be a good idea, but it doesn't really solve any of the bigger issues around it. In your system the buyer essentially has a buyer's remorse option for about half a day before the bank transfer is final. He/she would just cancel the transfer in case the price development during those hours is not satisfactory, while the seller has the coins locked up in escrow. It is a system that is good when price is long term stable but it is very far from a trading platform.


Title: Re: A decentralized exchange!
Post by: BkkCoins on April 12, 2013, 02:50:20 PM
A trade would involve the bitcoin seller sending coins into escrow (via Bitcoin) until the fiat is paid directly to the seller.

Adding an escrow option to OTC would indeed be a good idea, but it doesn't really solve any of the bigger issues around it. In your system the buyer essentially has a buyer's remorse option for about half a day before the bank transfer is final. He/she would just cancel the transfer in case the price development during those hours is not satisfactory, while the seller has the coins locked up in escrow. It is a system that is good when price is long term stable but it is very far from a trading platform.
There are various ways of working around this, though not all choices would be suitable for quick trading. One would be for each escrow agent to potentially offer accounts and hold money. Even though they then act more centralized they still settle and share trade info through the network. Another would be to have some way to verify funds transfer and if not within some time frame then cancel the trade. Obviously only trades completed are treated as "price movers". Many aspects of this would need to be figured out and I doubt it could handle trading as fast as an independent exchange. A decentralized network will never handle trading as fast as a single server processing SQL transactions.