Author

Topic: How to Approximate a Decentralized Exchange (Read 1349 times)

hero member
Activity: 574
Merit: 500
multigateway.org has been up and running for a year or so and is a good approximate to a decentralized exchange.

full member
Activity: 132
Merit: 100
willmathforcrypto.com
I fleshed out this idea and wrote a paper "Multisig Derivatives." Here's the pdf:

http://willmathforcrypto.com/multisigderivs.pdf

Here's a post about it:

https://bitcointalksearch.org/topic/multisig-derivatives-1102062
hero member
Activity: 1582
Merit: 502
Did you notice CIYAM AT & ACCT ?

Automated Transactions (AT) is a technology created by CIYAM Developers which provides "Turing complete smart contracts" for any blockchain that implements it.
http://ciyam.org/at/

Atomic Cross Chain Trading
http://ciyam.org/at/at_atomic.html

Burst & Qora just integrated CIYAM AT / ACCT ino their existing chains! More to come soon! IF more communites would integrate AT/ACCT into their chains, then truly decentralized exchanges could get executed.

If you have questions concerning about, don't hesitate to contact me anytime!

Best
jan
CIYAM Developers

i still cant understand why this community didnt notice it yet, is aBIG STEP what the ciyam guys already did between burst&quora and ppl seems like nothing happend or maybe they didnt notice it yet dunno, but for me this a very good news.

They have laid the foundation stone, cmon devs lets continue it is a great beginning but you guys should continue it.

Because at the end of the day this is a Bitcoin forum, and altcoins are mostly ignored.
Can this technology be applied to Bitcoin? maybe it could be proposed in a BIP. I don't think people is going to be using Qora or whatever only because of that. We need all the good stuff to be integrated into Bitcoin.

That is true.
However, we see a lot more innovations from altcoins rather than Bitcoin development.
The fact is however that Bitcoin was designed to be used as a currency (with some level of anonimity) and is considered and used by most as just that - a currency.
So I wouldn't expect any cool features added to Bitcoin anytime soon.
 
legendary
Activity: 1401
Merit: 1008
northern exposure
Because at the end of the day this is a Bitcoin forum, and altcoins are mostly ignored.
Can this technology be applied to Bitcoin? maybe it could be proposed in a BIP. I don't think people is going to be using Qora or whatever only because of that. We need all the good stuff to be integrated into Bitcoin.

ofc man i agree with you, this is a bitcoin forum but you cant ignore whats is happening on those subforums, as you can see there are some good devs who are doing awesome things with alt coins, we should be the first who should not ignore it.

im not a dev, but im 100% sure that good ideas are always welcome Wink


AT is indeed huge and deserves the necessary attention. BTC can implement this technology if decided so. Please correct me if I'm wrong.

When it comes to the usability of altcoins, many people use them and others see opportunities with them. E.g. Qora has so many features that people can use in various ways.

exactly, Wink btw as i sayd what those devs guys do with qora&burst are just awesome.
full member
Activity: 132
Merit: 100
willmathforcrypto.com
I definitely find advances in trustless cross chain trading interesting and potentially useful. Probably my original post wasn't clear though. I was trying to describe a way to simulate a Crypto <-> Fiat exchange using multisig (using only bitcoin). It would be similar to what Coinapult used to do with "locks," but without relying on a central point of failure like Coinapult.
legendary
Activity: 1386
Merit: 1016
We talk about decentralized exchange long time ago. But it still didn't work right now.
I don't think decentralized exchange can replace the centralized exchange. Yes centralized exchange got a lot of problem, but it is still more convenience than decentralized exchange.
Probably you haven't noticed the advantages decentralized exchanges will bring to us! Many ppl are getting fed up with the security issues, hacks, law compliance, high fee etc! Decentralized exchanges may resolve all of these issues! This technology is under development! We still need to wait for it!
legendary
Activity: 1708
Merit: 1000
Reality is stranger than fiction
Did you notice CIYAM AT & ACCT ?

Automated Transactions (AT) is a technology created by CIYAM Developers which provides "Turing complete smart contracts" for any blockchain that implements it.
http://ciyam.org/at/

Atomic Cross Chain Trading
http://ciyam.org/at/at_atomic.html

Burst & Qora just integrated CIYAM AT / ACCT ino their existing chains! More to come soon! IF more communites would integrate AT/ACCT into their chains, then truly decentralized exchanges could get executed.

If you have questions concerning about, don't hesitate to contact me anytime!

Best
jan
CIYAM Developers

i still cant understand why this community didnt notice it yet, is aBIG STEP what the ciyam guys already did between burst&quora and ppl seems like nothing happend or maybe they didnt notice it yet dunno, but for me this a very good news.

They have laid the foundation stone, cmon devs lets continue it is a great beginning but you guys should continue it.

Because at the end of the day this is a Bitcoin forum, and altcoins are mostly ignored.
Can this technology be applied to Bitcoin? maybe it could be proposed in a BIP. I don't think people is going to be using Qora or whatever only because of that. We need all the good stuff to be integrated into Bitcoin.

AT is indeed huge and deserves the necessary attention. BTC can implement this technology if decided so. Please correct me if I'm wrong.

When it comes to the usability of altcoins, many people use them and others see opportunities with them. E.g. Qora has so many features that people can use in various ways.
hero member
Activity: 770
Merit: 509
Did you notice CIYAM AT & ACCT ?

Automated Transactions (AT) is a technology created by CIYAM Developers which provides "Turing complete smart contracts" for any blockchain that implements it.
http://ciyam.org/at/

Atomic Cross Chain Trading
http://ciyam.org/at/at_atomic.html

Burst & Qora just integrated CIYAM AT / ACCT ino their existing chains! More to come soon! IF more communites would integrate AT/ACCT into their chains, then truly decentralized exchanges could get executed.

If you have questions concerning about, don't hesitate to contact me anytime!

Best
jan
CIYAM Developers

i still cant understand why this community didnt notice it yet, is aBIG STEP what the ciyam guys already did between burst&quora and ppl seems like nothing happend or maybe they didnt notice it yet dunno, but for me this a very good news.

They have laid the foundation stone, cmon devs lets continue it is a great beginning but you guys should continue it.

Because at the end of the day this is a Bitcoin forum, and altcoins are mostly ignored.
Can this technology be applied to Bitcoin? maybe it could be proposed in a BIP. I don't think people is going to be using Qora or whatever only because of that. We need all the good stuff to be integrated into Bitcoin.
legendary
Activity: 1401
Merit: 1008
northern exposure
Did you notice CIYAM AT & ACCT ?

Automated Transactions (AT) is a technology created by CIYAM Developers which provides "Turing complete smart contracts" for any blockchain that implements it.
http://ciyam.org/at/

Atomic Cross Chain Trading
http://ciyam.org/at/at_atomic.html

Burst & Qora just integrated CIYAM AT / ACCT ino their existing chains! More to come soon! IF more communites would integrate AT/ACCT into their chains, then truly decentralized exchanges could get executed.

If you have questions concerning about, don't hesitate to contact me anytime!

Best
jan
CIYAM Developers

i still cant understand why this community didnt notice it yet, is aBIG STEP what the ciyam guys already did between burst&quora and ppl seems like nothing happend or maybe they didnt notice it yet dunno, but for me this a very good news.

They have laid the foundation stone, cmon devs lets continue it is a great beginning but you guys should continue it.
sr. member
Activity: 462
Merit: 250
We talk about decentralized exchange long time ago. But it still didn't work right now.
I don't think decentralized exchange can replace the centralized exchange. Yes centralized exchange got a lot of problem, but it is still more convenience than decentralized exchange.
full member
Activity: 228
Merit: 100
CIYAM - UI/UX design
Did you notice CIYAM AT & ACCT ?

Automated Transactions (AT) is a technology created by CIYAM Developers which provides "Turing complete smart contracts" for any blockchain that implements it.
http://ciyam.org/at/

Atomic Cross Chain Trading
http://ciyam.org/at/at_atomic.html

Burst & Qora just integrated CIYAM AT / ACCT ino their existing chains! More to come soon! IF more communites would integrate AT/ACCT into their chains, then truly decentralized exchanges could get executed.

If you have questions concerning about, don't hesitate to contact me anytime!

Best
jan
CIYAM Developers
full member
Activity: 132
Merit: 100
willmathforcrypto.com
Thanks for the pointers everyone. I'll do some reading about these options.

Mercury looks interesting, but it's only for cross chain trading. This seems like the easiest case to decentralize in a trustless way, but obviously people are still using centralized exchanges for some reason. I need to look further into Mercury.

what you're saying about bitsquare and bitshares? https://bitshares.org/

are they really a decentralized exchange, i thought they are still a myth, and why no one is using it instead of using the traditional exchange?

Bitshares is closest to what I'm describing. To be honest, the main reason I'm not using bitshares is because I couldn't successfully compile and run their source code under linux. Maybe I should join their forum and get someone to help me with troubleshooting.
legendary
Activity: 3248
Merit: 1070
what you're saying about bitsquare and bitshares? https://bitshares.org/

are they really a decentralized exchange, i thought they are still a myth, and why no one is using it instead of using the traditional exchange?
full member
Activity: 168
Merit: 100
Perhaps something like this project is what you are looking for: https://bitcointalksearch.org/topic/mercury-fully-trustless-cryptocurrency-exchange-looking-for-testers-946174. It is a trustless, decentralized exchange where all of the transactions occur on the blockchain(s).

Thanks for the heads up, that is the spirit of the idea I once saw.
legendary
Activity: 1708
Merit: 1006
Perhaps something like this project is what you are looking for: https://bitcointalksearch.org/topic/mercury-fully-trustless-cryptocurrency-exchange-looking-for-testers-946174. It is a trustless, decentralized exchange where all of the transactions occur on the blockchain(s).
full member
Activity: 168
Merit: 100
Some years back on btc-e, I saw a gentleman post an idea for a decentralized exchange. It was built into a crypto wallet client and it envisioned a pure peer-to-peer alt coin exchange. There were tabs for the various alt currencies that would be traded. There was an interface for buy/sell orders for all the various alt currencies. No fees with instant coin transfers to the p2p wallet.

So the front end was created this way as a working concept, but the backend was never developed. Some blockchain magic would secure and the drive the exchange data between the p2p wallets.  The main caveat was that this exchange did not trade fiat as that would entail some sort of centralized control, btc being the main exchange currency.

It's a brilliant approach, theoretically, to having a decentralized exchange.

H.
sr. member
Activity: 304
Merit: 250
PUSS Lover
Very Good Idea. We really need decentralized exchange ......... because all centralized exchanges have security problem & your btc will be stolen any time............
full member
Activity: 132
Merit: 100
willmathforcrypto.com
When problems pop up with centralized exchanges, as they repeatedly do, people start posting about the need for decentralized exchanges. An obvious question is how to interface with fiat, but this question misses the point that there are two distinct uses for exchanges. (1) To exchange one currency for another vs. (2) To hedge against volatility or speculate on prices. For purpose (2) there does not need to be an actual interface with fiat. A "decentralized exchange" designed to only support (2) can be built on top of Bitcoin using colored coins or Counterparty or Omni/Mastercoin. Similarly one could do this with assets in NxT or BitShares. I think in most of these cases there's a dependence on the ability to redeem the "digital asset" (e.g., the colored coin) for the asset it represents. BitShares uses a different mechanism, and seems to be a bit closer to what I'm about to describe. However, what I will describe doesn't need an altcoin or alternative network.

I've been thinking about a different way to simply use bitcoin with multisig to "exchange" in the sense of (2). Something like it must have been discussed before, so someone who's been around longer can hopefully point me to earlier threads. Here's a simple high level example.

Simple Example

Suppose Alice and Bob both have 1 bitcoin. Alice wants to try to make sure to keep at least $220 worth of bitcoin and is worried the price will fall. Bob thinks the price is about to rise and wants to profit from this. Alice and Bob could make a transaction T with their 2 bitcoins as inputs and with 2 outputs. The first output would be an OP_RETURN with a message (the "contract") and the second output would be a 2-of-2 multisig with both their addresses. The contract would say: "After 1 week, Alice gets paid X bitcoins and Bob gets paid 2-X bitcoins where X*P = 220 and P is the price of a bitcoin in USD." (To be more precise, if P < 110, then X must be 2.) While I've written this "contract" in English, it would be abbreviated to give the essential information in an OP_RETURN. Then after 1 week, Alice and Bob can look up the price P, build the transaction spending T's multisig output and both sign it. If the price is $200, then Alice gets 1.1 bitcoin and Bob gets 0.9 bitcoins. If the price is $250, then Alice gets 0.88 bitcoins and Bob gets 1.12 bitcoins.

Here is where there's a potential problem: they may not agree on P. Alice may say the price is $200 and Bob may say the price is $250. As long as they can't agree, the 2 bitcoins are locked up and neither benefits. It seems from a game theory perspective, they are incentivized to come to an agreement. Furthermore, since this is all on the blockchain, people can inspect the transaction and see that there has not been an agreement. Alice could publicly publish a partially signed transaction spending it assuming P = $200 and Bob could do the same with another partially signed transaction spending it assuming P = $250. Everyone could see these cryptographic commitments, look at the price on the day in question, and use it to determine whether or not to trust Alice or Bob (or neither) in the future. Suppose the price is $200 but Alice gives in, signing Bob's version (agreeing the price is $250). People can see that Bob said the price was higher than it really was (to his benefit) and distrust him in the future.

Another problem is that Alice or Bob might die or lose the private key, in which case both lose their money.

Example with Escrow

To some degree the problems could be mitigated by having a "decentralized exchange" as an escrow. This would simply be a bitcoin address I'll call Dentex. Instead of Alice and Bob sending their 2 bitcoins to a 2-of-2 multisig, they would send it to a 2-of-3 with addresses for Alice, Bob and Dentex, along with some "escrow fee" to Dentex. Just as before, Alice and Bob can agree on the price after the contract expires and sign the appropriate spend. If, however, they cannot agree, then Dentex can look up the price and sign a transaction spending the appropriate amounts to Alice and Bob. At that point, it's only up to Alice or Bob to sign and complete the contract. Dentex's reputation would be formed over time by people noting that Dentex correctly signed multisig txouts with a correct price at the correct times. Dentex could not simply run off with the money. There is still a problem (Sybil): Dentex might actually be Alice (or Bob). In this case Dentex could agree with Alice that the price is $200 even if the price is "really" $250. However, this would destroy Dentex's reputation immediately, so at least the attack could not continue. Also, in case Dentex were incapacitated (killed, shut down, imprisoned, gag ordered), all the "customers" revert to the 2-of-2 case in which they must agree on the price in order to free their money.

Dentex could be completely pseudonymous, with no one needing to know who or where they are. (This might be necessary if the "decentralized exchange" wants to avoid KYC/AML compliance.) Or Dentex could be completely open about who they are as a way of trying to get customers to trust them more.

Of course, this could be made more sophisticated in various ways, but hopefully I've gotten the idea across. Is anyone already doing this? Are there problems or attacks I'm not seeing? Thoughts?
Jump to: