>> April 22, 2020
>> Blog Post #62
As I was saying in the last
blog post I am very hopeful that people in the bitcoin space are going to
actively collaborate to piece together their bits and pieces and offer a better
bitcoin to all. This here is a good example of this.
I am still slowly setting
up my website, but eventually it will have a store attached to it. One of the payment
options will be bitcoin and I will use BTCPay
Server as my payment processing software to do so. The BTCPay Server
instance I have is running on one of the bitcoin nodes I run.
BTCPay server is terrific
and I’ve used it for quite some while now, but it just got better with the 22.214.171.124:
“Block 626048” release, which introduces Payjoin support.
Payjoin is a specific type
of bitcoin transaction that is designed to enhance privacy for users.
I’ll try to summarize it briefly
while maybe giving readers who are not as familiar with how bitcoin works, a
I am going to the bakery to
buy bread. I ask for a baguette, which costs 1 € and pay for it with a 10 €
bill. The transaction looks like this. I give the baker 10 €, he keeps 1 € and
returns 9 € to me.
I am trying to purchase the
same baguette but only have a few coins in my pocket. I have a 50c and three
20c coins. I give them all to the baker, who keeps the equivalent of 1 € since
he will hand me back 10c in change.
If you were trying to make
the same payments in bitcoin, it would work exactly the same. Whatever you have
in your pockets is used as the input to come up with enough money to pay for
the product or service you are looking to buy. The recipient of the transaction
will keep what he is owed, and there is a third component, the change that is
paid back to you. (for people more familiar with bitcoin, the actual
recording of transactions in an “accounting” type of view is different, but I
am just trying to explain here what inputs, outputs and change are).
Some people are trying to
attack bitcoin by tracking its users’ transactions – the chain analysis
companies. This is absolutely unacceptable, as bitcoin should be fungible,
meaning 1 bitcoin should be absolutely equal to any other bitcoin out there.
They are replaceable by one another. Nothing you do with a bitcoin through your
behavior can enhance or reduce the value of a bitcoin.
1 bitcoin = 1 bitcoin
However, the chain analysis
companies are trying to flag users and bring AML/KYC rules in the bitcoin environment.
They do so by analyzing the blockchain and trying to determine what people do
with their coins. They do this through the use of math and … guesswork.
Take example 2 above. When
you look at a transaction that adds 50+20+20+20 and that transaction input gives
birth to two output transactions: one for 100 (1€) and one for 10, it is fairly easy to determine
that a user took several coins to pay for a product or service that cost 100
and that 10c is the change. If the service was 10c, the user would have only
used one of his coins to pay for it. So, the chain analysis company has actually
learned a lot from this transaction, but only if one of their assumptions is
The common input ownership heuristic
One element of “guesswork”
chain analysis companies rely on is that they consider that all inputs used to
build a transaction actually belong to the same user. After all, it is fairly
rare for you to buy bread with coins that belong to the person sitting in front
of you in the line at the bakery.
Payjoin destroys that
heuristic if it is implemented.
In a Payjoin transaction,
both the sender and the recipient of a bread purchase will contribute coins to
the transaction. The transaction generates the appropriate amounts of (1) payment
for the recipient and (2) change for the sender based on both parties’
contributions to the payjoin.
So, what are the advantages?
Payjoin is a privacy
enhancement for the network as a whole if implemented. By making it possible
for different users to collaborate in creating the input of a transaction,
payjoin breaks the assumption that all inputs belong to the same user. Today, I
know of one wallet that proposes such a feature, Samourai Wallet. Through the use of the “Stowaway” feature, Samourai Wallet
users can collaborate to create payjoin type of transactions.
Better privacy for users is
But there is also another
benefit, this time for merchants. By contributing some of his own coins to the
input of the transaction, the merchant will gain the ability to get rid of his
spare change and consolidate his pesky cents into larger amounts. In bitcoin
terms this is batching and is very useful in order to save on network fees.
Through the whole process, the merchant too will gain the privacy benefits of
no one knowing which coins are his and which coins are the customers.
I’m really super happy this
is coming to BTCPay Server and can’t wait to implement it on this website and offer
this as a feature to future customers.
Super Bullish! And congrats
to the BTCPay Server team for this implementation of Payjoin (P2EP)!
Here is the official announcement
made by BTCPay Server