Recently a survey / poll was published on bitcointalk on the topic of whether code for a decentralized exchange should be developed for bitcoin core.
The survey / poll (multiple choice) was conducted over the course of a total of seven days and the results were as follows:
- The survey / poll question was: "Satoshi included prelim code for decentralized exchange in #bitcoin, but it was removed after Satoshi's departure. Should it be put back in?"
- There were 82 respondents
- 61% selected "Yes, add to bitcoin core"
- 22% responded "No, let alts try that 1st"
- 17% responded "Neither, I use bitsquare"
The interest in having a decentralized exchange of some sort appear in core / reference client(s) prompted me to open this issue for discussion.
1) History / background
Preliminary code authored by Satoshi relating to this topic was at one time present in bitcoin core, but was removed on February 14, 2010 by "non-github user." The code was not functional as a decentralized exchange or market, but appeared to have been provided with that idea in mind. Satoshi retired from active / public bitcoin development, after the release of version 0.3.19 which was in December 2010.
2) A suggested definition
It may be, that with the various approaches to what a "decentralized exchange" is, some qualifications or a definition should be provided before discussing this further.
A truly "decentralized exchange" in my view is one that has the following characteristics:
a) Must be p2p -- must rely on software you install and communicates with other computers that also have that software (not requiring servers or services), and must not require you to obtain some special token(s) in order to use it or to exchange one thing for another. Good examples of the decentralized exchange are bitsquare / bisq and mercury. Good example of the decentralized market is openbazaar.
b) may require you to identify yourself in some way on the network at such times when you are participating in the exchange system (example being through use of a PGP key or through a bitcoin based identifier) to limit identity spamming and to allow users to build reputation
c) must not be based upon I2P in order to work, must not be based upon some Tor hidden service, and must not require WebRTC, but may provide Tor or I2P support
d) must not require ShapeShift (or some other third party) in order to provide functionality
e) must provide an option for users to exchange fiat for cryptocurrency (not solely some crypto for bitcoin) and to do so without exposing themselves to (bank or non-bank institutions, organizations, services).
3) Limitations (cons) of having decentralized exchange in Core or other reference clients (in other cryptos), and some other perspectives (pros)
One simple con of this idea would be "feature bloat" is not desireable for Core. In some alts, features have been explored and added to the extent they have been able to do so or depending upon the priority of the development schedule of certain alts. However, in Core, "feature bloat" has generally been avoided.
One pro of this idea would be the potential for greater fungibility as a result. This is further discussed in item (4) below. Another potential pro of this idea would be if an exchange in Core were to be developed utilizing features of Lightning, which is not yet implemented in Core, then there would be available (in part) rapid payments, no third-party trust, reduced blockchain load, and onion-style routing. Notably, in this particular scenario, due to the features of Lightning / lnd, "payments can be routed across more than one blockchain (including altcoins and sidechains) as long as all the chains support the same hash function to use for the hash lock, as well as the ability the ability to create time locks." (as quoted from bitcoinwiki on Lightning)
In other words, with eventual Segwit activation and potentially down the road with Lightning implementation, there would likely be an evolution toward something like a decentralized exchange at any rate as a result of the features of Lightning. The question then becomes, how would this be integrated into Bitcoin Core.
4) Reference to other bitcoin issue relating to fungibility
In this issue a reference is being made to #6568 due to the fungibility item being discussed in that issue [which was published for meta tracking issues on transaction privacy / fungibility]. In that issue description, it was mentioned in part that "Tightly linked to privacy is fungibility, an essential characteristic of a money like good. When coins are overly distinguishable and people find themselves feeling obligated to consult (likely centralized) blacklists before accepting coins the utility of Bitcoin as a money is reduced." Because a truly decentralized exchange does contribute to the protection of fungibility, that issue is being referred to in part here.
5) Conclusion
There may be an opportunity to improve fungibility in Bitcoin system via decentralized exchange development in reference client down the road, particularly with the evolution and trajectory of developments such as Segwit and Lightning. There are definitely pros and cons to this concept and it is worth a discussion.
All discussion and points of view are welcome on this issue. Thanks in advance for comments you might contribute on this item.