The Bitcoin network is seen by some as a simple way to send and receive funds without the need for counterparties. Bitcoin has been settling transactions for over a decade, and its robustness and reliability are what it is known for, while more complex transactions are not often associated with Bitcoin.
However, as Bitcoin has grown in popularity, it has become clear that the network will need to be able to do more than simple broadcasting transactions. Today’s altcoin market bases its existence on the fact that it provides more complex transaction construction, with Turing complete smart contracts and on-chain scripting being their unique selling point.
Bitcoin is programmable money, but due to certain trade-offs in how the network runs and remains decentralised, it requires the enforcement of limitations that can make Bitcoin harder to program versus other altcoin chains. This means that it is not always possible to create complex financial transactions or applications on the Bitcoin network.
As Bitcoin scales to more users, the demand for more complex transactions grows; while a certain share of the market has opted to use altcoins, layer two solutions such as Liquid, Lightning, RGB, and many more are exploring solutions that are not limited by the base chain.
While second-layer solutions look to offer new products and services to meet emerging market demand, the Bitcoin base chain has to improve as well. There are a number of proposals to improve the programmable nature of Bitcoin, such as Taproot and Schnorr signatures, which were added in a November 2021 soft fork, while Graftroot is another that looks to build on those previous upgrades.
What is Graftroot?
Taproot brought with it an improvement in the privacy and efficiency of Bitcoin transactions by allowing multiple scripts to spend a single output and hiding the details of the script that is actually used until the transaction is confirmed. While Schnorr signatures are a more efficient and secure way to sign Bitcoin transactions, they can be used to reduce the size of transactions and improve the privacy of Bitcoin users.
Graftroot is a proposal that builds on Taproot by allowing for an unlimited number of alternative scripts to be used to spend a single output. This is done by allowing the participants in a transaction to delegate their ability to sign the transaction to a surrogate script.
These proposals have the potential to make Bitcoin more programmable and versatile. This could lead to the development of new financial applications and services on the Bitcoin network. For example, Graftroot could be used to create more complex smart contracts, such as escrow contracts and conditional payments. Schnorr signatures could be used to create more secure and private transactions. And Graftroot could be used to create more flexible and efficient ways to spend Bitcoin.
How does Graftroot work?
Graftroot builds on the Taproot concept of using Schnorr signatures to represent scripts. In Taproot, a script can be represented by a single Schnorr signature, which makes it more efficient to store and spend.
Graftroot takes this a step further by allowing multiple scripts to be represented by a single Schnorr signature. This means that a single transaction could be used to spend funds in multiple ways, depending on the outcome of a smart contract.
In a Graftroot transaction:
- The participants in a transaction establish a threshold key, which is a public key that can be used to sign the transaction if a certain number of participants agree to sign it.
- The participants can then delegate their ability to sign the transaction to a surrogate script. This is done by signing the surrogate script with their private key.
- When it comes time to spend the transaction, the redeemer can choose to use either the threshold key or the surrogate script. If they choose to use the threshold key, they must collect signatures from the required number of participants. If they choose to use the surrogate script, they must satisfy the conditions of the script (e.g., provide their own signature and a timelock).
Benefits of Graftroot
The main benefits of Graftroot are:
- Increased efficiency: Graftroot makes it more efficient to store and spend scripts, which could lead to lower transaction fees.
- Increased flexibility: Graftroot allows for more complex and flexible smart contracts, which could open up new possibilities for Bitcoin applications.
- Improved privacy: Graftroot can be used to obfuscate the details of a smart contract, which could improve privacy for users.
Drawbacks of Graftroot
The main drawbacks of Graftroot are:
- Increased complexity: Graftroot is a more complex protocol than Taproot, which could make it more difficult to implement and use.
- Security risks: Graftroot introduces new security risks, which need to be carefully considered before it is implemented.
Implementation of Graftroot
Graftroot has yet to be implemented on the Bitcoin network. It is still a proposal that is being debated by the Bitcoin community. If it is implemented, it is likely to be done as a soft fork, which means that it would not require all nodes on the network to upgrade.
Unlocking new use cases for Bitcoin
Graftroot has some exciting implications for custodians and exchanges, too. Today, custodians hold Bitcoin on behalf of the user, and you trust them to have the funds on hand, with or without proof of reserves.
Users also rely on an exchange’s word that they can release them to you when you need it.
Yet, the history of Bitcoin exchanges has shown that funds are not always freely available. One could easily look to service providers like MtGox, QuadrigaCX, FTX and many more as examples.
In a Graftroot world, custodians could store funds in an address that would be possible to program special conditions so that the money within that address can move under conditions that are programmed, thus avoiding their losses.
Users would not need to go through the pain of having someone come in to recover funds, take ownership of keys, and deal with lengthy bankruptcy processes; instead, they can provide the action that executes a script which allows them to spend the funds into a new address.
Improved P2P trades
A Graftroot transaction could also lay the foundation for interesting on-chain P2P trades where users can lock up funds in an escrow and release them if certain trade agreements are met.
Passing on your Bitcoin
All Bitcoin exists on-chain, but not all of it is accessible; every year, users lose the keys to their wallet and essentially remove that supply from ever being sold or moved to another wallet. While some users might lose their keys due to negligence, others pass on without planning to pass on their keys.
Some users might not be comfortable handing over their keys or might find managing a multi-sig a little too complicated. Instead, a Bitcoin user could opt for a Graftroot transaction that will release the funds based on certain conditions that can be set out for friends and family members to follow and release funds to each individual’s white-listed addresses.
Improving self custody
Graftroot can make it easier for users to delegate their signing power to others. This could be useful for users who want to give someone else the ability to spend their Bitcoin in certain circumstances, such as if they are incapacitated or if they face the risk of an in-person attack.Â
Graftroot allows users to create multiple alternative scripts that can be used to spend a single output, making it more difficult for an attacker to guess the correct script to use.
Improved movement between layers
Improving the programmable nature of Bitcoin is an essential step in the evolution of the network, not only for those using the mainchain but also for finding better ways of moving capital between the various layer twos in a trustless manner.
Do your own research.
If you want to learn more about Bitcoin scripting, 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.