OmniLayer / spec

Omni Protocol Specification (formerly Mastercoin)
The Unlicense
340 stars 116 forks source link

Include a direct BTC-MetaCoin trade in the Metacoin decentralized exchange #175

Open ripper234 opened 10 years ago

ripper234 commented 10 years ago

Currently the Master Protocol defines two decentralized exchanges:

  1. A BTC <--> MSC exchange with a one-sided order book
  2. A MSC <--> Metacoin exchange AKA the Metadex, which allows bi-directional trading between MSC and any MSC-derived currency.

An often discussed idea is to automatically combine these two exchanges and allow someone to purchase metacoins directly via BTC. The way this would work is by combining the mechanisms and order books of the two exchanges.

Just like #142 , there is a heated discussion among the community whether implementing such a unified BTC-Metacoin DEx is actually beneficial to holders of MSC. It is my belief that it is, even though it reduces some of the need to hold or 'go through' MSC.

I believe that for a buyer holding BTC, it is an undeeded and risky step to acquire MSC just for the purpose of exchanging it with another token, and the best experience for them would be to be able to buy metacoins directly with BTC. The value and utility of MSC will be maintained by other aspects of the protocols. E.g., we do not know of any way to create a seamless bi-directional metadex that touches BTC directly (Counterparty has something like that, but it has very different security and usability properties and requires users to stay online for the exchange).

So I would like to start the debate on this as well, as part of a strategic decision on the level of openness that the Master Protocol should have. FYI I am writing an open letter that addresses both this and #142 and would like to involve the community in these decisions.

dacoinminster commented 10 years ago

BTC doesn't work very well for dEX (one sided order book). dEX is one of the core uses of MSC, and I don't think we should change that!

dexX7 commented 10 years ago

If we find a way to attach MSC to an output, then the whole dilemma might be solved and the step of "accept orders" may be skipped. Maybe with some kind of "lock boxes" where metacoins are stored for at least x hours, so a potential buyer/seller knows 100 % for sure, the MSC are there.

The basic idea:

Seller side: construct a transaction which spends x BTC to the seller's address and add an input/output which sends MSC from the lockbox. The tx would be constructed in a way that anyone can add additional inputs (to pay for the BTC) and also add an additional output for the receiver reference.

Buyer side: an input for x BTC is signed, as well as an output reference to the buyer and an unsigned input, spending from a lockbox. An additional output to spend the BTC may be added. The potential seller signes the "spend from lockbox" input and credits the buyer with MSC. He also adds an output to his address to receive the BTC.

I'm not yet 100 % sure about the details, but I played a little with the different signing types (anyonecanpay, single input etc.) and this seem do-able. Instead of publishing the whole transactions only the relevant parts (signatures) + meta data could be published on the blockchain and clients reconstruct the missing parts -- because they know the basic prototype anyway.

Edit: sorry for being vague, this is merely an idea, but I may do some research, if this is wanted and we'd actually do something like this in the nearer future.

LOLLOLOOLOL commented 10 years ago

IMO bridge the gap between Master Protocol and bitcoin as little as possible. The biggest problem is usability. Buying Mastercoin on the dEX is possible, but seriously not practical. By forcing users to trade MSC for metacoins, the dEX has a much higher chance being usable and worth using - because trades won't be made unnecessarily complicated and lengthy due to the "impermanent" nature of Master Protocol transactions. On that note, each buy into the Master Protocol represents a risk on the buyers side. This risk should be minimized.

ripper234 commented 10 years ago

BTC doesn't work very well for dEX (one sided order book). dEX is one of the core uses of MSC, and I don't think we should change that!

I agree that the BTC-MSC DEx doesn't work well, and there are some inherent reasons for that. Similarily, the BTC-Metacoin DEx would inherit these properties.

However it would still make life easier for someone who owns BTC and just wants to acquire a metacoin on the DEx. Rather than go through two steps, he'll have access to the metacoins using a single step.

For users who want to continuously trade metacoins, staying inside the MSC ecosystem and DEx would be the preferable way to go, and so liquidity on MSC will still remain. The impact of this direct BTC-Metacoin DEx would be to smooth out the curve and eliminate cases where people just buy into MSC temporarily and then ditch it for some metacoin.

dacoinminster commented 10 years ago

I'd be fine with supporting one-step buys of metacoins using BTC which are routed through a MSC seller. In other words, the protocol could support bitcoin holders saying "I wish to purchase these 10 MetaCoins with BTC", and the BTC goes to a MSC seller, the MSC goes to the metacoin seller, and the metacoins go to the BTC buyer. This would essentially automate the process they would have to do manually otherwise.

Obviously this would be a feature for after the metadex launched, and would be driven by how many of our users wanted it.

On Sat, May 31, 2014 at 6:06 AM, Ron Gross notifications@github.com wrote:

BTC doesn't work very well for dEX (one sided order book). dEX is one of the core uses of MSC, and I don't think we should change that!

I agree that the BTC-MSC DEx doesn't work well, and there are some inherent reasons for that. Similarily, the BTC-Metacoin DEx would inherit these properties.

However it would still make life easier for someone who owns BTC and just wants to acquire a metacoin on the DEx. Rather than go through two steps, he'll have access to the metacoins using a single step.

For users who want to continuously trade metacoins, staying inside the MSC ecosystem and DEx would be the preferable way to go, and so liquidity on MSC will still remain. The impact of this direct BTC-Metacoin DEx would be to smooth out the curve and eliminate cases where people just buy into MSC temporarily and then ditch it for some metacoin.

— Reply to this email directly or view it on GitHub https://github.com/mastercoin-MSC/spec/issues/175#issuecomment-44747792.

ripper234 commented 10 years ago

Yeah, it sounds like it's not part of the MVP, but I'm glad you agree it's a useful feature to have.

dacoinminster commented 10 years ago

OR we could have a general protocol-wide rule that every TX which does not directly use MSC must compensate by B̏͆̍ͧ҉U̢̐ͤͦ͛͗̈ͬ́Rͨͯͬ̍͌̚̚̚N̏̒͏I̊͛͠N̵̆̅̀̀͗ͦ̿̓̐͡G̴̢̅͆̊ͤ͒ a small amount of MSC!!

marv-engine commented 9 years ago

@m21 This issue doesn't prevent us from merging PR #165, tx21.