What is bitcoin multisig escrow and how does it work?

First published: 12/12/2022
| Last updated: 01/18/2023
| -- min read

If you need to trade with someone when there’s uncertainty about them holding up their end of the deal, you might consider escrow, an arrangement that ensures the obligations of an agreement are met before payment is settled. Traditionally, this involves funds being held by a trusted third party, known as an escrow agent, who acts on behalf of the parties involved in the agreement. However, with bitcoin, a new type of escrow based on multisig is possible.

How bitcoin multisig escrow works

In a bitcoin multisig escrow, funds are deposited in a multisig wallet constructed using the public keys of the two parties participating in the transaction and one or more intermediaries. When the conditions of the agreement have been fully met, a quorum of keys can sign a transaction that releases the funds from the escrow.

Benefits of bitcoin multisig escrow

Trustless and timely settlement makes multisig escrow a powerful tool for many escrow scenarios, and bitcoin multisig escrow takes advantage of the programmatic and immutable nature of bitcoin transactions to provide a secure and transparent escrow process.

The many benefits of multisig escrow over more traditional escrow arrangements include:

  • Trustless: Traditional escrow means trusting a third party with custody of funds. Bitcoin multisig escrows are trustless; they don’t require trusting a third-party escrow agent with unilateral control of escrow funds. This can reduce cost and increase efficiency.
  • Secure and transparent: Compared to traditional escrow, bitcoin multisig escrow provides increased security and transparency through bitcoin’s immutable transactions and its transparent ledger, called the blockchain. This can help to prevent fraud and ensure that all parties involved in the escrow are held accountable.
  • Faster settlement times: Traditional escrow can take days to settle. Bitcoin multisig escrows offer faster settlement times, allowing for the assurance of an uncensorable payment that can be delivered within minutes.
  • Flexibility and customization: Bitcoin multisig escrow allows for greater flexibility and customization of the escrow agreement. Users can set unique requirements to be met to broadcast transactions depending on their circumstances.
  • Global and censorship-resistant: Traditional escrow providers are typically limited in the currencies they support. The global and censorship-resistant nature of the bitcoin network makes seamless cross-border transactions possible.

Constructing an escrow wallet

A bitcoin multisig escrow is created by combining the public keys of the participating parties using multisig wallet software such as Sparrow, Caravan, or other platform-specific tools. The multisig wallet is constructed using a predetermined quorum, or “m-of-n” configuration, where “n” is the total number of keys used to create the wallet, and “m” is the number of keys required to authorize a transaction.

Then, a deposit address is constructed for the multisig wallet, and funds are sent to this address. Funds can only be released when the required number of keyholders agree that the conditions of the escrow have been met and sign a transaction to disburse funds. No single party can move the funds without the authorization of one or more of the other parties.

Example bitcoin multisig escrow scenarios

The simplest structure for a bitcoin multisig escrow is a 2-of-3 multisig wallet in which one key is held by each of the two trading parties and one by an intermediary. In this scenario, the keys privately held by three individuals are combined to construct the wallet, with signatures from two of the three keys required to disburse funds. Let’s look at some example scenarios.

Scenario 1: Full final settlement

In this example, a buyer funds a multisig wallet controlled by three parties: the buyer, the seller, and an intermediary. The seller then ships the product to the buyer, who confirms proper receipt of the items to the intermediary. The intermediary then combines keys with the buyer or the seller to release the funds from the multisig wallet.

The purpose of this escrow is to protect both the buyer and the seller. For the buyer, the escrow ensures that the product is delivered on time and in good condition. For the seller, the escrow ensures that the final bill for the goods shipped is paid upon delivery. By using a bitcoin multisig escrow, the parties involved in the transaction can have confidence that their interests are protected and that the funds will be released in a timely and secure manner.

Example: Bob wants to sell ten ASICs to Steve. Steve deposits funds in a multisig wallet to be released upon receipt of the machines in good condition. Bob, Steve, and the intermediary combine keys to construct a single multisig wallet to fund the transaction. Upon confirmation of delivery from Bob, the intermediary signs a transaction with Steve releasing the funds. If a dispute arises, the intermediary can supervise a return of the items and provide a refund to the buyer, as explained next.

Scenario 2: Escrow refund

In this example scenario, a bitcoin multisig escrow is used to coordinate a refund to a prospective buyer per the escrow agreement. The funds are placed in the multisig escrow as a good-faith down payment on a purchase, with conditions that must be met prior to the sale being finalized. If the conditions of the sale are not met, the multisig escrow can be used to coordinate the refund.

Example: Mary wants to buy a 20-unit apartment building from Jane. She deposits 10% of the purchase price in a multisig escrow account with the keys of Mary, Jane, and an intermediary. After an inspection of the property, numerous issues were discovered and Mary changes her mind about the purchase. The intermediary constructs a transaction for Mary to sign providing her with a full refund of the deposit.

Scenario 3: Split settlement

With split settlement, an upfront deposit is made by the buyer which is all or partially refundable based on the terms of the escrow agreement. In this scenario, the intermediary judges what portion of the deposited funds should be refunded to the buyer and what portion should be settled to the seller, and signs transactions with each of the two parties accordingly.

Example: Fred agrees to rent an apartment from Bill. Bill requires a security deposit of two months’ rent. Fred, Bill, and an intermediary set up a 2-of-3 multisig escrow wallet. At the end of the lease, Bill assesses the condition of the apartment and determines that damage occurred equal to half of the security deposit. The intermediary constructs two transactions directing the release of the funds to Fred and Bill.

Bitcoin multisig escrow for P2P trading

Bitcoin multisig escrow also plays a role in peer-to-peer protocols used for buying and selling bitcoin online, such as HodlHodl and Bisq.

In a contract initiated between two parties, a multisig escrow wallet is created by the intermediary protocol. Keys for the transaction are generated through the intermediary protocol to build the escrow address and for releasing bitcoin from the address. The buyer and seller are responsible for generating and securing their own keys (or passwords that act as keys).

How peer-to-peer trading tools use multisig escrow varies. The two services we’ve mentioned here, for example:

  • HodlHodl uses 2-of-3 multisig where the seller sends bitcoin to the multisig escrow address controlled by the seller, the buyer, and HodlHodl. The buyer sends fiat funds to the seller, and a support manager can help resolve disputes if they arise.
  • Bisq uses a 2-of-2 multisig where both parties have to agree to release funds. Rather than Bisq itself holding a key in multisig, transactions on Bisq have a timelock that can release funds to an arbitrator if an unresolvable dispute arises.

In either case, a successful transaction that doesn’t need dispute resolution completes when the seller authorizes the release of the bitcoin from escrow, which transmits coins to the buyer. The third party cannot release funds without the consent of either the buyer or seller because the third party holds one or no keys to the multisig escrow wallet.

In a canceled transaction, the seller and the intermediary sign a transaction that sends bitcoin back to the seller’s wallet.

How to set up a multisig escrow

While there are many services you can use which do the heavy lifting for P2P buying and selling of bitcoin, not every transaction is a fiat-for-bitcoin trade. Thankfully, anyone can use bitcoin wallet software to set up a multisig wallet to use for escrow with another party and an intermediary.

We’ll cover these steps in greater detail in a future article, but the general process is usually the same:

  • Parties participating in a transaction agree to the terms of a contract.
  • Parties agree on and establish a suitable neutral third-party keyholder to act as the intermediary.
  • Parties, along with the intermediary, initialize a bitcoin wallet and properly back up their seed phrases.
  • The intermediary uses the public keys from three different wallets to build a multisig wallet using wallet software, such as Sparrow Wallet, Electrum, or Caravan. This can be done either in person with connected or air-gapped hardware wallets or remotely using exported Xpubs; in either case, the intermediary cannot spend because only public keys are used to construct the wallet.
  • Parties should perform a test transaction to ensure the multisig wallet was constructed correctly and ensure test funds can be successfully disbursed before funding the wallet with large amounts of bitcoin.

After the wallet is set up, the buyer, seller, and intermediary coordinate to fund the wallet and release funds as appropriate for the circumstances of the transaction as described in the example scenarios above.

We used AI tools to help develop or improve this work. How do we use AI tools?

Sign up to get notified for future blog articles.