Local.Bitcoin.com's blind escrow for everyone

2019-03-06T16:51:19.000Z Honest Cash

Since it promises to be quite revolutionary, for peer-to-peer trading, the announcement of local.Bitcoin.com (LBC) has attracted a lot of attention. But its main enabling feature, the blind escrow, is technical and this might leave most people suspicious of the platform, as they can’t verify the claims. To be transparent about it, Bitcoin.com published the bitcoin scripts/contracts used in the escrow but, in practice, that mostly satisfies the curiosity of people that already have the technical knowledge. It does little to help the general audience understand how it works.

In this post I’ll try to establish a bridge and translate the contract in simple terms. You can jump right to the bottom but I’ll start with an high level view and a description of typical situations before getting to the escrow itself. Hopefully things will be clear enough, by then, for you to “get it” without needing to blindly trust yet another person on the Internet.

The high level view

First, some high level view of the process. In general, LBC could be used for any trade paid with Bitcoin Cash. The same way you can choose “Cash (in person)”, meaning you will meet in person and pay cash for BCH, you could agree to trade stamps or even potatoes for BCH. The point is that one part of the trade is off-chain and only the seller and the buyer know about it. This is important because this also means that the seller (the one with BCH) is the one that must make the first Bitcoin Cash transaction (to lock the funds in the blind escrow) and typically it’s the buyer (the one wanting BCH) that finally spends those funds into their wallet.

The typical situation

Below is a sequence showing the typical situation. As mentioned, the seller is the one that locks the Bitcoin Cash into the escrow. To do that, first he sends the agreed BCH into an addresses provided by LBC. This money can only be moved out when both the seller and buyer agree that the trade is finished. After that, the buyer gives the fiat money to the seller to pay for the Bitcoin Cash.

The "magical" step happens afterwards. The seller, after receiving the fiat money and checking it is good, does not sign the escrow contract. Instead, he passes a unique stamp back to the buyer. This stamp is unique to this particular escrow and serves as a replacement for a standard signature. This means that, after this point, the seller can continue his merry life because the buyer has everything needed to take the Bitcoin Cash out of the escrow. She uses the seller's stamp to mark its approval and then does a normal signature, like in any other Bitcoin Cash transaction. Since this last step is a new transaction she could move the money to any wallet she wanted although, since this process is automated by LBC, the BCH will go to the buyer’s LBC wallet.

In the the typical situation, where the seller and buyer all behave nicely, there's two Bitcoin Cash transactions and no other party is involved. But the key aspect is that only the person taking the Bitcoin Cash, that is, making the withdrawal transaction needs to sign the transaction. The other party is replaced by a unique stamp and it's this mechanism (enabled by the new opcode) that allows Bitcoin.com to participate as an arbiter. Bitcoin.com's stamps can replace either party in the escrow.

Not so typical situations

Maybe the most common problem, for the honest buyer, is when the seller runs away after receiving the fiat money, goes missing unexpectedly, or demands more money or conditions to accept the trade and pass the approval stamp to the buyer. In all those cases, the result is the same: fiat is gone, Bitcoin Cash is out of reach.

That’s when the blind escrow requiring only one signature comes in handy. She can sign her part but needs to ask Bitcoin.com for a stamp that replaces the seller’s. After showing that the money was deposited as agreed and getting the replacement stamp, she can make the withdrawal transaction.

Obviously, the same can happen the other way around, that is, the seller can deposit the Bitcoin Cash and then the buyer goes missing for a long period of time. In that case, Bitcoin.com will provide, to the seller, a stamp that replaces the buyer and the seller can take back his Bitcoin Cash from the escrow. What can’t happen, is having the Bitcoin Cash taken by Bitcoin.com. The escrow always requires one signature from either the seller or buyer and the person doing the signature is the one deciding where the Bitcoin Cash goes

The translated escrow

From the high level view we can already see that there are 4 ways the escrow can be resolved. The important aspect is that only one participant signs and the other is replaced by a stamp. The rest of the contract are just technical details. You can find the escrow script in LBC’s faq. Here’s my translation of it.

Responses


RE: Local.Bitcoin.com's blind escrow for everyone

by @TheOneLaw

Very well composed.

If I had money in my account I would upvote.

This is excellently readable.

======================

Now for a semantic correction:

The usage of the terms "Buyer" and "Seller" is mindbreakingly upside-down.

We ->use<- BCH to buy things and to pay for services.

That is almost what defines any currency - something used to purchase random goods.

To write that we are "selling" BCH makes it read as if we want to get rid of it.

We "sell stuff" when we want to "replace stuff" with something that has more useful value.

Those who are working to expand market adoption are trying very hard to change attitudes and habits.

They are working to demonstrate that anyone can use BCH to BUY goods and services.

The mindset of "hear here! - we are selling BCH" reads tragically like some kind of telemarketing scam.

If you want BCH from me you had better be offering to sell something of incredible value.


RE: RE: Local.Bitcoin.com's blind escrow for everyone

by @m4ktub

> The usage of the terms "Buyer" and "Seller" is mindbreakingly upside-down.

I agree with you 100% and it seemed so obvious/intuitive to me that I started to write things the other way around. But since my goal was to explain/translate the Bitcoin.com escrow contract I ended up settling for their terminology. Even after trying to use their seller/buyer definition I've regularly mixed things up.

Why does Bitcoin.com call the one with BCH the seller? I don't know because in the UI, if I remember correctly, they use "make offer" and "take offer" which works both for people buying BCH and people selling BCH. I think those are the terms that matter.

> To write that we are "selling" BCH makes it read as if we want to get rid of it.

About that and the "telemarketing scam", I don't think it's that serious. In any trade between BCH and fiat, regardless of the terminology, there's always someone that values fiat currency more. Otherwise the trade wouldn't happen. If local.bitcoin.com was being advertised as "a place were you can sell you BCH" I would also say that was not my preferred marketing strategy. But it's being advertised as "a non-custodial trading platform, on top of Bitcoin Cash, without KYC rules, [where anyone can get what they value most]".


RE: RE: RE: Local.Bitcoin.com's blind escrow for everyone

by @TheOneLaw

Fair enough.

They are merely unimportant words few will pay much attention to anyway.