Bitcoin's first upgrade in four years, Taproot, is slated to release in November 2021. When Taproot goes live, Bitcoin users will have increased transactional efficiency and privacy. And, what's more, this upgrade unlocks the potential of smart contracts.
Interestingly enough, Bitcoin Taproot was met with an entirely different reception than Bitcoin's 2017 upgrade—the latter is often referred to as the "last civil war" as there are staunch supporters and heavy dissidents. Taproot, on the other hand, has almost universal support among miners and Bitcoin users.
So, what is it that makes Taproot so well-accepted in the Bitcoin community? Let's find out!
What is Taproot (BIP 341)?
There are three parts to the Taproot proposal: BIP 340 (Schorr Signatures), BIP 341 (Taproot), and BIP 342 (Tapscript).
- BIP 340 introduces Schnorr signatures, which offer several advantages over the currently used Elliptic Curve Digital Signature Algorithm (ECDSA).
- BIP 341 proposes a new way of sending Bitcoin: Pay-to-Taproot (P2TR). It combines the functionality of Pay-to-Script-Hash and Pay-to-Public-Key scripts with the goal of giving users greater privacy benefits and improved flexibility.
- BIP 342 defines Tapscript; this is an update to Bitcoin's scripting language, and it enables Bitcoin nodes to validate P2TR inputs.
In this guide, we will largely be focusing on BIP 341. However, we will also touch on BIP 340's Schnorr signatures.
What is MAST?
Bitcoin MAST is the launching point for the upgrade's proposed improvements. MAST uses a Merkle tree (see image below) to store user-selected conditions that need to be fulfilled in order for BTC to be spent. With MAST, the spender can select which condition they'll fulfill without revealing the other conditions' details to the blockchain. By keeping unused conditions off of the blockchain, users will have increased privacy, be charged lower fees, and have the ability to create larger contracts. What's more, their Bitcoins will increase in fungibility.
Now, let's briefly go over conditions: Let’s say that Jill wants to send Frank 5 BTC, but she wants to set some conditions before Frank can redeem the coins. The conditions could include: (1) Frank can only spend the 5 BTC if he waits a week, or (2) if he wants to spend them before the week is over, he can only access 2 BTC, and the remaining 3 will be sent back to Jill.
How does Taproot improve on MAST?
Those conditions that we listed above – currently, they would be visible on the blockchain, resulting in decreased privacy. However, the Taproot upgrade aims to use MAST to give extra privacy for complex conditions, and this is done by hashing the potential routes. Instead of every condition being shown within the transaction information, a merklized hash will be produced. This implies two key things:
- A Bitcoin receiver can commit to all conditions without revealing each individual one.
- After the transaction execution, MAST will only reveal the successful route. The details of alternative paths will remain obscured.
Scriptless Scripts: How Bitcoin Can Support Smart Contracts without Smart Contracts
Smart contracts can be quite resource-intensive, and Bitcoin's blockchain has limited capacity. So, the two might seem like oil and water: an unnatural match. Yet, Andrew Poelstra, a mathematician at Blockstream, may have found an answer to this conundrum.
On November 5, 2017, Poelstra presented "Using Chains for What They're Good For" at the Scaling Bitcoin conference at Stanford University. In the presentation, Poelstra called attention to the potential of "scriptless scripts," which could completely remove certain smart contracts from Bitcoin's blockchain while still retaining Bitcoin's security benefits.
Flash-forward to 2022, and we can see Poelstra's research become a reality as Taproot will enable scriptless scripts. This kind of script is capable of executing smart contracts off-chain via the usage of Schnorr signatures, which we will touch on next. Scriptless scripts have 3 key benefits: functionality, privacy, and efficiency.
- Functionality: Scriptless scripts increase the complexity and range of smart contracts. Within the current Bitcoin Script, smart contracts' limitations come from the number of OP_CODES that the network has enabled. But, with a scriptless script, smart contracts' specification and execution are moved off the network and into a discussion that only includes the contract's participants.
- Privacy: Moving the smart contracts off-chain increases privacy as the details are no longer shared with the whole network. Such details would include the addresses of participants, the number of participating members, and the amounts of BTC transferred.
- Efficiency: Scriptless scripts lessen the amount of data that needs verification and on-chain storage. Therefore, there are lower transaction fees and fewer overheads for full nodes.
Taproot and Schnorr Benefits
The Schnorr signature scheme will be deployed as a soft fork protocol upgrade. The scheme is considered by many cryptographers to be the best in the field because:
- It is relatively quick to verify.
- It isn’t malleable.
- It has a high level of accuracy due to its mathematical properties.
Schnorr employs linear math, which allows signature aggregation. Essentially, multiple signatures within the same transaction can be combined, appearing as a single signature. This makes a multisig transaction indistinguishable from a regular one—once again, bringing enhanced transactional privacy to users.
How the BTC Taproot Upgrade Will Improve Technology Across Bitcoin’s Software Stack
There are several ways in which the BTC Taproot upgrade will improve Bitcoin's technology:
- Schnorr signatures are faster and more lightweight than ECDSA signatures; that, and their linearity, optimize Schnorr-based smart contracts for functions that ECDSA-based ones could not fulfill.
- Taproot's tooling and coding improvements will be incredibly handy to developers, which is partly why this upgrade has been so positively received. In addition, these improvements will give Bitcoin users noticeable improvements in performance, usability, and privacy.
- Blockstream is developing MuSig2, new software that makes multisig transactions cheaper, more efficient, and more private. Furthermore, the limit on signers for a multsig wallet is going to be raised from 15 to a higher number (although that number hasn't yet been made public).
- Privacy protocol CoinSwap will disguise mixed coin transactions.
- Point time lock contracts will be possible, thanks to Schnorr signatures. Lightning Network will be able to facilitate more complex smart contracts with extra privacy and boosted efficiency.
- Schnorr signatures will also make batched validation possible, in which 1,000 Taproot signatures are validated in the time it takes 1 ECDSA signature to be validated.
Taproot Activation – Hard Fork or Soft Fork?
Hard forks typically imply an unstable period for a cryptocurrency—they are quite volatile. Thankfully, though, Taproot is going to be a soft fork. This means that its changes are compatible with the software's previous versions (with a hard fork, newer rule sets are not compatible with older rule sets).
How will Taproot benefit Bitcoin?
Taproot is going to bring Bitcoin users significant benefits, such as:
- Increased privacy
- Lower fees
- More flexibility
- Lightning boost
With everything mentioned above, Taproot is the most impactful upgrade to Bitcoin since 2017's block size increase. Making amendments to Bitcoin is difficult, and changes are typically met with lots of pushback. That's why it's such a huge deal that Taproot is supported by virtually the entire community; this shows what a big deal the upgrade is and how necessary the changes are. We've still got a couple more months until Taproot is released. Until then, stay tuned to our blog for updates! Here at Paydepot, we keep our finger on the pulse of the cryptocurrency world, and we'd love to pass our findings on to you.