Taproot and Private Bitcoin Smart Contracts

Written by BTSE

April 2, 2020

Taproot and Private Bitcoin Smart Contracts
Taproot is one of the most significant Bitcoin Improvement Proposals (BIP) written in recent years. In a nutshell, it aims to enable privacy and flexibility for Bitcoin smart contracts. As a side effect, it keeps Bitcoin’s small blocks scalable and the block space accessible.

The main purpose of Taproot is to make on-chain smart contracts indistinguishable from regular transactions. This ambitious goal would also help reduce transaction outputs. Consequently, this is great news for Bitcoin’s small blocks: decentralization can be preserved while extra features get added. There is no need to increase the block size. Instead, the existing ~1 MB blocks will be adjusted to fit small-sized contracts and transactions that are indistinguishable from one another.

As described by Bitcoin Core developer Gregory Maxwell in January 2018, Taproot is mostly concerned with efficiency and privacy. It serves the purpose of hiding the smart contract code that doesn’t get executed. This way, the complex contractual clauses involved in a Bitcoin script remain secret unless they happen. In the process, lots of precious block space gets saved.

For instance, let’s say that Alice creates a conditional smart contract for her son Bob. The clauses are designed to transfer 10 BTC to Bob’s wallet at a specific time in the future. Let’s say that settlement time is Bob’s 18th birthday. But if he becomes literate in using Bitcoin and signs a multisig transaction before that, he gets the BTC.

We have two conditions, but only the clause that applies will be written in Bitcoin’s public blockchain. So if Bob doesn’t learn how to use his key in the multisig setup before he turns 18, the world will never know about this clause. All that is visible is that the time-locked bitcoins get transferred on the day of his 18th birthday. The immutable blockchain only stores the instance that actually happens. It would be terrible for both privacy and scalability if it had to store everything.

This is only a simple example of a Bitcoin smart contract that Taproot enables. There are plenty of other use cases and ways of conditioning money transfers. They can use timelocks (bitcoins can be spent at a given time in the future with the right signature) or multisig (a certain number of parties must sign the transaction).

Taproot guarantees that the outside world will not know about the unfulfilled and hypothetical contractual clauses. Thanks to the uniformization of transaction outputs, blockchain analysts won’t be able to distinguish the contract from a regular transaction. 

This is great for privacy, but also ideal for scalability. The fact that Bitcoin blocks don’t store all the data is a blessing for the network. On one hand, node operators won’t have to upgrade their storage to keep up with the growing amount of Bitcoin smart contracts. Also, the fact that blocks don’t get filled with extra data keeps transaction fees low.

Taproot is part of a series of planned Bitcoin improvements. They include P2SH, MAST (Merklelized Abstract Syntax Tree), Schnorr, and Taproot.  In the grand scheme of things, the plan is to replace ECDSA (Eliptic Curve Digital Signature Algorithm) with Schnorr signatures.

The reason why Satoshi Nakamoto has used ECDSA involves the lack of Schnorr standardization for libraries. Now that the technology is in the public domain, developers can use it for improvements. Schnorr signatures have been on the Bitcoin Core development roadmap since at least 2017, and it’s likely that they will get deployed in 2020.

Taproot and every other improvement will be released as a soft fork as part of a new version of Bitcoin Core. Just like in the case of SegWit, node operators can choose whether or not they want to adopt the upgrades. If the testing leads to provably beneficial results, adoption will likely follow.

Nonetheless, the replacement of ECDSA with Schnorr is a big deal for Bitcoin. Privacy, transaction efficiency, and scalability as side effects are significant.

Taproot looks extremely promising, and it’s only a matter of time until we can experiment with advanced smart contracts on Bitcoin’s base layer. The privacy of unfulfilled conditions will definitely find creative use cases. There are lots of sectors and industries that can use the elegance of Taproot, and we can only hope we see its potential in 2020.

 


Our aim is to create a platform that offers users the most enjoyable trading experience. If you have any feedback, please reach out to us at feedback@btse.com or on Twitter @BTSE_Official.

Note: BTSE Blog contents are intended solely to provide varying insights and perspectives. Unless otherwise noted, they do not represent the views of BTSE and should in no way be treated as investment advice. Markets are volatile, and trading brings rewards and risks. Trade with caution.

 

Related Articles

Stay Informed with BTSE

Join Our Newsletter

Never miss a beat with the latest updates and industry insights from BTSE.

Follow Us

Join our rapidly growing community and exclusive events!