What Are Taproot Swaps?

Taproot Swaps Explained

Share this article

Bitcoin has become a victim of its success as more people regularly use the network to settle transactions. Bitcoin has a hard limit on the number of transactions it can settle per block, and as demand for the asset increases, the resulting network congestion drives up fees. 

Increased fees optimise blocks for the transactions that generate the most value for miners since miners/mining pools can afford to be picky about what they include in a block. This forces fee-sensitive transactions to exercise patience or migrate to a layer two solution. 

Once you leave the base chain, you have a few options available to you: side chains like Rootstock or the Liquid Network or a peer-to-peer layer like the Lightning Network. Each of these networks tethered to Bitcoin has its own trade-offs regarding technology, complexity, speed, security and trust assumptions. 

As a user who is priced out of the base chain, you can select one or all of these networks to store funds based on your needs and always move them back to the base layer when it becomes economical for you. 

It doesn’t make sense to be conducting $10 transactions on the base layer; you’d only receive less Bitcoin, and when you want to move it later, you’ll have a bloated set of UTXOs that will cost you a pretty satoshi to move. 

If you want to save on your Bitcoin fees, it’s best to conduct your smaller transactions on a layer of your choice and consolidate to the base chain with fewer interactions. 

Moving between the layers

While layer two networks offer cheaper and faster settlement for users, the problem often arises in moving in and out of them. Not every user wants to run a node for each network and have to do-peg in and peg out transactions or channel opens or closes; some want to move capital between networks seamlessly, which is where atomic swaps and submarine swaps come in handy. 

As the problems of growing pains weigh on Bitcoin, the ever-evolving ecosystem will provide new solutions, like the launch of Taproot. The soft fork upgrade allowed for batched multiple signatures and transactions together, making verifying transactions on the network easier and faster. It also helped form the basis for improved ways to swap your sats across layers, affectionately known as Taproot Swaps. 

But what exactly are they, and why should you care? 

What are Taproot Swaps?

Taproot Swaps is a feature launched by the swapping service Boltz Exchange that allows users to have a fallback address should their swap fail. Refunds only apply from a Chain (Timechain or Liquid) → Lightning swaps, whereas Lightning → Chain swaps do not require refunds because the Lightning Network automatically bounce back to users’ funds do not find a route to the end destination.

When using Boltz with a failed swap, you must manually trigger the refund since Boltz does not control the locked coins. 

To claim your refund, two conditions need to be met:

  1. Possession of the private key to claim the refund
  2. The timeout block height of the swap reached

However, that has changed with Taproot Swaps. 

Taproot is available on both the Bitcoin base chain and the Liquid Network. It uses Schnorr signatures to enable cheaper and more private swaps and the implementation of Immediate Cooperative Refunds.

How do Taproot swaps work?

A Taproot Swap uses Musig2 to aggregate a Schnorr public key by combining a public key from the user with one of Boltz. This aggregated public key then gets tweaked with the hash of scripts. 

Boltz then uses two scripts: one to claim bitcoins for successful swaps and one to refund for failed swaps. 

This structure allows for three ways of spending:

  1. The claim script
  2. The refund script
  3. An aggregated signature created by the two private keys of the public keys with which the aggregated public key was created

Imagine a secure, trustless marketplace where you can swap your Bitcoin for Bitcoin on other layers without relying on a single third-party exchange to return your funds should the swap fail. 

That’s the magic of Taproot Swaps. 

They leverage Taproot’s enhanced privacy and flexibility to create peer-to-peer contracts that enable direct, on-chain swaps. Think of it as a decentralised barter system.

Why transactions might fail and require a refund request

When using Boltz exchange to swap between layers, the primary cause of friction is moving funds from on-chain or side-chain to the Lightning Network. The reasons why Chain → Lightning swaps can fail are multifold, but the two major failure reasons are:

  • User transactions are too small: This often happens by accident, as wallets deduct network fees from the send amount without making this very clear.
  • Boltz couldn’t pay the user’s lightning invoice. This can happen for several reasons, for instance:
    • The user needed more inbound liquidity, and LSP failed to open channels or splice in on-the-fly.
    • Users swapped to a small personal node that needed more inbound capacity or better connected enough for us to find a route.
    • The user swapped to a very popular node, like a lightning deposit on a CEX, and we didn’t find a route within Boltz’s generous (currently 3000ppm) fee limits.
How Taproot Swaps Work

Why Use Taproot Swaps?

  • Privacy: Thanks to Taproot, all successful swaps look the same on the chain as unused script paths are hidden, and all appear to be a single signature spend.
  • Security: No centralised entity is required to issue refunds, which means no single point of failure. Your funds are always safely locked in your own wallet.
  • Lower Fees: Say goodbye to hefty fees, as it’s more straightforward to consolidate your funds on layer two and swap them into the base chain when it makes financial sense. 
  • Flexibility: Swap Bitcoin across the three supported networks without all the technical overhang of adding or managing liquidity into a particular layer.
  • Recovery in case of a catastrophic collapse: These refunds are not tied to Boltz, and even if the exchange were to up and disappear tomorrow or refuse to cooperate in a refund, the previously described time-lock applies, which means users can safely get their Bitcoin back using the refund script path after the timeout block height was reached.

The root of the liquidity problem

Taproot Swaps offers us a glimpse into the future of decentralised finance. They unlock new possibilities for peer-to-peer exchange, empowering users to take control of their finances and explore the vast potential of Bitcoin. 

As products like Taproot Swaps mature, they could expand into providing wallets, merchants, and exchanges with the ability to accept funds easily from any layer. No longer will users feel like they’re being punished or forced off into a silo, but their Bitcoin will become interoperable with applications using any layer. 

Taproot Swaps also offer possible revenue generation opportunities should the demand for swaps increase; liquidity providers can deploy capital to on-chain automatic market makers to swap between chains, while Lightning routing nodes will want to pair up with channels that focus on supporting swaps. 

Taproot Swaps are not a perfect solution, and challenges remain, but the future of secure, private, and cost-effective Bitcoin swaps looks bright. 


Do your own research.

If you want to learn more about Taproot swaps, use this article as a jumping-off point and don’t trust what we say as the final say. Take the time to research, check out their official resources below or review other articles and videos tackling the topic.

Disclaimer: This article should not be taken as, and is not intended to provide any investment advice. It is for educational and entertainment purposes only. As of the time posting, the writers may or may not have holdings in some of the coins or tokens they cover. Please conduct your own thorough research before investing in any cryptocurrency, as all investments contain risk. All opinions expressed in these articles are my own and are in no way a reflection of the opinions of The Bitcoin Manual

Leave a Reply

Related articles

You may also be interested in

Cookie policy
We use our own and third party cookies to allow us to understand how the site is used and to support our marketing campaigns.