Trustless operation is one of the key concepts behind cryptocurrencies. The idea is that you should not have to personally meet, or trust your peers, in order to perform successful transactions.
Experienced crypto users may take this concept for granted, but come to think of it – every real world transaction before cryptocurrencies came about required some level of trust!
In this context, we find the concept of partially signed Bitcoin transactions (PSBT), where you can split the responsibility for Bitcoin payments with other peers.
Imagine a situation where users, who could be collaborating remotely in some project and who’ve never met each other before, need to collectively agree to make a group payment. (Note: They could have met but Bitcoin makes no such assumption.) Each member will chip in some BTC and everyone will pay for it together, like a group of friends would settle a restaurant bill.
One way to do it would be for each member to prepare a transaction and then send the TXID to a chosen coordinator, who’d gather the payments from each participant and make sure the overall purchase is settled.
This system implies that there’s a central trusted entity – someone who’d have the responsibility to collect the money, make the payment and then make sure it went through correctly so he could send everyone a receipt afterwards.
This is a fine strategy to adopt with friends, but for unknown parties who don’t trust each other there’s an obvious problem: it isn’t a decentralized solution. Whenever a middleman, an escrow or any other trusted party is required, the solution is no longer decentralized. You trust someone to get the job done.
Enter Partially Signed Bitcoin Transactions (PSBT).
You may be familiar with the concept of a multi-signature, or multisig, system? In this type of system two or more people must sign a transaction in order for it to be valid. There are several possible multisig setups, like 3 out of 5 people must sign, husband or wife may sign and so on, but details about them are beyond the scope of this article.
Multisig payments have one limitation, though: the act of signing must be simultaneous. Everyone who agrees with a transaction must sign it at once before it’s broadcast to the network.
Now imagine that there was a protocol such that a Bitcoin transaction that required multiple signatures was created but this transaction didn’t have to be built at once.
One user could sign today, another user could examine the TX and decide whether to sign later on and so forth. All this without a trusted intermediary!
That’s what PSBT achieves. BIP 174 was proposed in mid 2017 to address exactly this scenario – and this system is already available in the latest Bitcoin Core releases! Here’s a simple example scenario that illustrates now PSBT works.
So it’s been decided that a group payment must be performed. One of the group members creates a PSBT and adds unspent outputs, both his and others’ and the desired target inputs (who will receive the payment). He transmits the TX id and the Bitcoin network spreads this unfinished TX.
Other users whose inputs are included in the PSBT have their full nodes running. The node identifies a PSBT that includes a local address and shows the user the partial transaction and what’s inside it. The user analyzes the inputs, outputs and amounts and decides whether it’s legit or not. If there’s agreement, the user then adds his signature to the PSBT.
Once every participant has added their signature, the PSBT is complete. It is then compiled into a regular multisig Bitcoin transaction just as if it had been signed simultaneously. The TX is transmitted and mined like any other transaction.
That’s how PSBT’s work! Fully decentralized – no single entity needs to be relied on or trusted to coordinate and distribute funds.
Users must only know each others’s Bitcoin addresses. This is a requirement for all Bitcoin payment processing anyway. So the only manual coordination that’s needed between users is to know each others’ addresses. For which they can coordinate via email or some other collaboration system.
I hope this short intro to partially signed Bitcoin transactions has made the concept clearer for you! For technical details please consult some of the links at the end of this article.
There is ongoing research into Partially signed contracts, which follow the same logic as Transactions, except a digitally signed contract’s object is some executable code instead of an unspent output (UTXO).
See Blockchain Technology as a Regulatory Technology and A fair contract signing protocol with blockchain support for more on the context of partially signed contracts.