2 of 3 Private Key P2SH Addresses for Nubits and Nushares on Centralized Exchanges

Hi everyone!

Here is an idea that I have been tooling around with in my head for a while, and I wanted to share it with the community. I love the idea of multi-signature Bitcoin addresses, and I have been thinking about how this concept could present people from losing their funds when Mt. Gox/GLBSE/Moolah events occur. I would like to prevent a possible solution: Read-only private keys and 2 of 3 multi-signature wallets for Nubits and Nushares.

Let’s say that you buy 1,000,000 Nushares, and you decide that for some reason, you want to leave them on Bter. This is currently a very bad idea because you could wake up one day to find out that Bter has collapsed, and all of your Nushares are gone. A system could be created that would allow you to create a new multi-signature Nushares wallet. Bter would have to add support for the type of multi-signature Nushares wallet that I am about to describe. You would export three keys from your new multisig Nushares wallet to Bter: 2 read-only private keys, and one normal private key. The 2 read-only private keys could NOT be used to spend funds. They would only be used in combination with the normal private key to generate a multisig Nushares address.

Lets say that that address is 3SjH8Bb5JZQhbTtPMePCd2o5rXAubQ98Xrq

Read only private key 1 (BTER) + Read only private key 2 (BTER) + normal private key 1 (BTER) generates 3SjH8Bb5JZQhbTtPMePCd2o5rXAubQ98Xrq

Normal private key 1 (BTER) + Normal private key 2 (owner) + Normal private key 3 also (owner) also generates 3SjH8Bb5JZQhbTtPMePCd2o5rXAubQ98Xrq

Any 2 of 3 normal private keys are needed to spend the funds held at 3SjH8Bb5JZQhbTtPMePCd2o5rXAubQ98Xrq, so the exchange can never spend the funds without the consent of the owner. If the exchange goes under, the owner can still recover the funds since he or she will always control at least 2 of the 3 private keys. the funds are held on the exchange, but never under the control of the exchange.

So how does one execute a trade? The owner would run a desktop client that would monitor the price index of the asset that the owner wants to buy using Nushares (let’s say Bitcoin). As soon as the price hits the target, the client authorizes 1 private key to “vote” for spending Nushares to buy BTC. The exchange provides the second vote, and the BTC are bought at the desired price.

A scripting mechanism could be generated such that when the trigger is hit, only an amount of Nushares predetermined by the buyer could be spent. For example, if the owner had 1,000,000 Nushares on Bter, he or she might authorize spending 100,000 Nushares for one NSR/BTC trade. Since the exchange only has 1 of 3 private keys, it has no choice but to comply. If the owner’s desktop client sees that the amount of the pending transaction is some value other than 100,000 Nushares, it will simply reject the transaction, and not sign the transaction with its private key.

Why would exchanges go for this? Because they would have no choice. Once this system were implemented, no one would deposit Nushares (or any other crypto-currency) on any centralized exchange using the old method.

How will the person who bought your Nushares at the exchange get the spending private key of the bought sum?

Hi mhps!

Once the exchange provided its private key and you (the current owner) provided your private key, then the funds (minus a small fee collected by the exchange) would be sent to a new Nushares address (another multisig address) owned by the new owner. The BTC that you just bought would be sent to a 2 of 3 BTC address under your control.

Seems that the exchange doesn’t need any key at all. It just does order matching and informs the users to initiate the trade.

mphps says: Seems that the exchange doesn’t need any key at all. It just does order matching and informs the users to initiate the trade.

@mhps, yes, this is true. The only reason for them having a key at all is to stroke them a little bit, and make them feel like they are a “partner”. In reality, the only thing that an exchange should care about is the ability to collect fees. They don’t need control of your private keys. It is a system of checks and balances. You have 2 of 3 private keys, but you don’t know the Nushares address of the person who wants to buy your Nushares. The exchange only has one private key but they also have the critical piece of information: the Nushares address of the buyer. So for the trade to go through, you have to agree to let them have 1 vote (with their private key) and you agree to pay whatever reasonable fee that they demand.

So here is how the whole system would work.
Owner wants to buy 1 BTC with Nushares:

Case 1:

  • owner agrees to pay BTER fee = FALSE
  • private key 1 (BTER) = doesn’t matter in this case, since owner has rejected paying BTER fee.
  • private key 2 (owner) = TRUE
  • private key 3 (owner) = TRUE
  • BTER provides buyer’s Nushares address = FALSE
  • Transaction occurs = FALSE

Case 2:

  • owner agrees to pay BTER fee = TRUE
  • private key 1 (BTER) = TRUE
  • private key 2 (owner) = TRUE
  • private key 3 (owner) = doesn’t matter in this case, since owner has accepted paying BTER fee.
  • BTER provides buyer’s Nushares address = TRUE
  • Transaction occurs = TRUE

Not touching the keys might have favorable regulatory and tax implications for the exchange.

Anyway, the exchange could just kick anyone who don’t pay the fee out, like any pay-to-use site.

Not touching the keys might have favorable regulatory and tax implications1 for the exchange.
Anyway, the exchange could just kick anyone who don’t pay the fee out, like any pay-to-use site.

Nice! If a centralized implemented what I have just proposed, I would switch to them in a heartbeat. I lost a significant amount of BTC in the GLBSE collapse a few years ago, and such a system would have prevented that from happening. I think that either centralized exchanges will cease to exist when decentralized exchanges rise in popularity, or they will have to adopt something similar to what I have proposed to survive.