Taproot explained

Taproot explained

Taproot has now locked in and should activate in November. Taproot is the name of different technical innovations bundled together. When they activate, they will make Bitcoin transactions cheaper and more private, along with a host of other benefits. Here’s more about what this Bitcoin protocol update means, in simple terms.

The root of Taproot

This upgrade is the culmination of years of work:

  • In January 2018, Bitcoin developer Gregory Maxwell proposed the concept of Taproot
  • In September 2019, another Bitcoin developer, Pieter Wuille, crafted the proposal to implement it in Bitcoin Core.
  • In November 2019, the proposal went through an extensive review and test phase, with 150 developers participating in a 7 weeks long review process.

Since then, developers, miners and users have debated what the best activation method would be, and it is now “locked-in”, meaning it should activate in November 2021. Why all the work and all the fuss?

Making bitcoin closer to cash

Bitcoin’s whitepaper title is “Bitcoin: A peer-to-peer electronic cash system”. Bitcoin is definitely peer-to-peer and electronic but doesn’t fully work as cash yet. Taproot helps getting closer to that goal by improving Bitcoin on two important fronts: Fungibility and privacy.

For a currency to be fungible, all of its individual units need to be indistinguishable from any other unit. The U.S. Dollar is fungible because any individual one dollar bill is worth the exact same as any other one dollar bill. It doesn’t matter whether one bill was used to pay for illegal drugs and another to fund a wedding: Their history doesn’t change their value, they’re worth the exact same. Currently, because transactions are publicly broadcasted on the blockchain, and because different types of transactions have different digital fingerprints, it’s pretty easy to obtain identifying information about specific bitcoin transactions. Being able to identify the past use of certain coins can “taint” them and make them less valuable than “clean” coins. This is a significant threat to Bitcoin’s fungibility. With Taproot, all transactions appear to be of the same kind on the blockchain. It makes it much harder to know if a certain transaction was a one-to-one payment (from Alice to Bob) or a complex transaction, involving multiple signatures, time based conditions, or the Lightning network. 

Taproot increases the privacy of Bitcoin in a similar way. By analyzing a multisig transaction, one can also identify the specific multisig set-up that was used, the ways the success conditions of a certain smart contract have been met, the type of wallet that was used, etc. This allows to track the transaction history of some users and deprives them from the ability to trade privately. Hiding this data brings both privacy and fungibility gains to Bitcoin, which make it more akin to cash.

Bitcoin as the building block of decentralized finance

Taproot also brings gains in transaction efficiency and smart contract flexibility which will help strengthen Bitcoin as the foundation of the new decentralized financial system. 

The gains in efficiency gain are clear: Bitcoin currently uses Elliptic Curve Digital Signature Algorithm (ECDSA) signatures, which usually weigh around 72 bytes, while Schnorr signatures weigh 64 bytes. So the switch from one standard to the other comes with a 11-12% gain in efficiency. 

But there’s more. As mentioned above, Schnorr signatures allow for signature aggregation. Currently, if Alice, Bob and John need to sign a transaction, three signatures have to be broadcasted to the blockchain: that of Alice, Bob and John. The more signatures are needed, the bigger the size of the transaction and the higher the transaction fees get. So, with ECDSA signatures, the more complex the smart contract, the more expensive it gets to run it. By allowing for complex smart contracts to be executed by a single signature, Taproot greatly reduces the cost of running smart contracts. 

This will allow developers to build more complex financial instruments on top of Bitcoin, which should usher in an era of Bitcoin DeFi services. It also allows sophisticated market players to operate at a lower cost. Both gains in efficiency and flexibility will cement Bitcoin’s role as the foundation of the decentralized finance ecosystem.

How Taproot works

What’s the recipe for all these improvements? First, the update is known as Taproot but actually consists of three code proposals called Bitcoin Improvement Proposals (BIP):

  • BIP #340, which adds “Schnorr signatures”,
  • BIP #341, which adds “Taproot”,
  • BIP #342, which adds “Tapscript”.

Taproot builds on top of Schnorr signatures so we will focus on them here. The main function of Schnorr signatures is to make “multi-signature” (multisig) transactions, which require multiple signatures to be processed, and traditional, single signature transactions look the same on the blockchain. The function of Taproot is to extend this approach to other, more complex sorts of transactions and make them also look like traditional ones.

How does that work? Schnorr signatures offer key and signature aggregation, which allows combining different public keys into a new, single one. Say Alice and Bob’s signatures are required for a multisig payment to John: thanks to Schnorr, it’s possible to combine Signature A and Signature B into Signature C. When Alice and Bob provide their signatures and public keys, only “Signature C to John” will appear on the blockchain. The transaction will therefore look like a traditional single signature transaction from C to John.

Investing in Bitcoin development

Taproot, beyond the research and development of the code, has required extensive review testing. Reviewing and testing are absolutely key to maintaining the security of the Bitcoin network, and are a central part of the work of Bitcoin Core developers. This work is open source however, which means the developers are volunteers funded by the community. At Okcoin we believe supporting Bitcoin development is an investment towards a better, more inclusive financial future. This is why we have already allocated one million dollars to fund open source developers through our Open Source Developer Grant Program. Two of our recent grantees are especially focused on testing and reviewing:

  • Marco Falke, who has worked on improving Bitcoin’s testing framework over the years,
  • Joao Barbosa, who dedicates a large portion of his time to reviewing new code proposals.

Learn more about our Open Source Developer Grant Program