Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A semi-automatic hybrid mechanism to enable a two-sided order book involving bitcoins on one side #269

Open
marv-engine opened this issue Oct 8, 2014 · 1 comment

Comments

@marv-engine
Copy link

As we all know, the Master Protocol cannot enforce the transfer of bitcoins between addresses. So there's no way the protocol can implement a two-sided order book with bitcoins such that bitcoins are transferred as a result of MP-based automatic order matching.

So, we automate as much as we can and involve the user to complete the process.

When User S (seller) creates a wallet in Mastercore or Omniwallet, he provides contact information, e.g. an email address and/or an SMS text number. This will be used by a notification service that runs as part of the wallet.

At a high level, the steps are:

  1. User S posts an offer to sell BTC for MSC. This is like a classified ad. There's no enforcement to complete the sale.
  2. This offer is listed in the order book in the Mastercore wallet or Omniwallet, with a flag highlighting that it's a BTC for MSC offer and requires special handling.
  3. User B (buyer) looks at the order book and chooses to accept that specific offer. This creates a complementary tx20 sell offer by User B at the terms set by User S.
  4. The wallet asks the notification service to alert User S that User B wants to trade his MSC for User S's BTC, per the newly created tx20.
  5. User S gets the notification, signs in to the wallet which provides a quick/easy way for User S to send a tx22 Accept followed by a bitcoin send for the corresponding number of BTC.

Instead of creating the tx20, is it possible for User B's wallet to use P2SH to create a transaction that's signed by User B that has to be countersigned by User S to exchange the BTC for MSC?

@dexX7
Copy link
Member

dexX7 commented Oct 8, 2014

Ah, this is more clear. Thanks.

So the user could post his buy intend and once a seller is willing to sell, the buyer is notified. If the potential buyer responds, the seller could then create a proper sell offer and the potential buyer sends an accept offer/payment transaction?

Instead of creating the tx20, is it possible for User B's wallet to use P2SH to create a transaction that's signed by User B that has to be countersigned by User S to exchange the BTC for MSC?

What would the exact mechanism be in this case?

Instead of going the tx 20 -> tx 22 -> payment route, maybe a modified version of tx 20 could be created which reserves the tokens for sale, but in particular for the potential buyer?

  1. Buyer posts buy intend (off-chain)
  2. A potential seller appears
  3. Seller and buyer ping each other to ensure both are present (off-chain)
  4. Seller publishes a targeted tx 20 which reserves the tokens for the buyer (on-chain)
  5. Buyer sends the BTC payment (on-chain)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants