OP_CAT: The Opcode That Could Make Bitcoin Purr
Uncover the captivating journey of OP_CAT, the Bitcoin opcode that was disabled at the start but could be revived and play a role in transforming the world's first blockchain.
For the years Bitcoin has been around, it has been both celebrated and criticized for what many have termed its limited programmability compared to newer blockchains such as Ethereum. This pain point has stirred discussions among the 'divided' community, and one solution has been the reintroduction of some opcodes that were initially removed from its scripting language.
Join us in this article as we take you through the journey of OP_CAT, one of these opcodes, from its origin by Satoshi to its ‘resurrection’ back to Bitcoin and see what it holds for Bitcoin's future.
But first, let us take a quick tour of Bitcoin's scripting language!
Understanding Bitcoin Scripting Language
Bitcoin uses a scripting language known as Script to ‘script’ transaction conditions which are similar to smart contracts but not quite there yet. It can be thought of as a set of instructions that specify how Bitcoin transactions are to be processed.
At its core are operation codes, commonly referred to as opcodes.
Opcodes can be considered the building blocks for Bitcoin’s scripting language, as they allow for its basic transaction management. They execute predefined operations, enabling a wide range of customizable and conditional transactions.
According to data from Unchained, Bitcoin had a total of 256 opcodes but in 2010 Satoshi disabled 15 of them while others remained inactive with only less than half of them currently active. The primary reason for the deactivation was that these opcodes had exploitable vulnerabilities like denial-of-service (DoS) attacks or other exploits that could compromise the network's security.
Although the removal of these opcodes helped prevent a security breach, it also brought some limitations. It made Bitcoin's scripting language ‘non-turing-complete,’ meaning it is limited to basic logic that comes into play only when moving coins and the non supportive environment for complex smart contracts.
It is exactly this that Bitfinity wants to address and flip around - making a Turing complete network with the Bitfinity EVM on Bitcoin. Read more about how this can be done here. ↓
But while still not there yet, these limitations are known to exist in Bitcoin, and over the years, several proposals have been discussed to introduce (or in some cases reintroduce) this functionality. One of them is OP_CAT...
What is OP_CAT? 🐱
Operation Concatenate (OP_CAT) is an opcode that was introduced to Bitcoin in its early days by Satoshi himself. The 'CAT' in it (which has no relation to the 'cat' animal) is short for concatenate, which means the combination of two strings of data. Therefore, OP_CAT facilitated combining different pieces of information within the Bitcoin Script.
But in 2010, OP_CAT was among the opcodes disabled from Bitcoin because, at the time, a user could have theoretically used the opcode to push a large amount of data onto Bitcoin’s blockchain, which could cause memory usage and script size to grow exponentially in a scenario mostly termed as a DoS attack.
Now, however, with the passage of time and the development of technology, this issue is no longer an obstacle. Under the architecture of the 2021 Taproot upgrade, a strict rule that limits the size of the maximum stack element to within 520 bytes has been established.
This change has addressed the DoS attack vulnerability and together with the renewed interest in expanding Bitcoin beyond a simple peer-to-peer electronic cash or store of value, interest in OP_CAT has been revived...
The 'Resurrection' of OP_CAT
In October 2023, Bitcoin Core developer Ethan Heilman and Botanix Labs Chief Software Engineer Armin Sabouri jointly released a draft Bitcoin Improvement Proposal (BIP) termed 'OP_CAT'. The proposal aims to activate OP_CAT through a soft fork by expanding upon an existing code called 'OP_SUCCESS126' and reintroducing it as an opcode for tapscript (a feature of the Taproot upgrade).
This took the campaign to 'resurrect' OP_CAT to a new level. In January 2024, Taproot Wizards, a group led by Eric Wall and Udi Wertheimer, announced their Quantum Cats project - a collection of 3,333 cat images to bring more awareness to OP_CAT and create a community of enthusiasts who could vouch for its revival.
From here, they took a new turn and began advocating for its recognition as BIP-420 and true to their efforts, OP_CAT was officially designated as BIP-347 on April 24, 2024, not that long after the Bitcoin halving...
But as Ethan noted, getting a BIP number does not signal any sort of consensus or approval of OP_CAT, but only makes discussing and writing software around the proposal easier. But why is the resurrection and approval of OP_CAT of so much importance anyway? Let's find out...
The Application Potential of OP_CAT in Bitcoin
The approval of OP_CAT back to Bitcoin is significant because it represents a shift towards more complex and scalable solutions within the network.
The first solution it holds for Bitcoin is 'covenants,' which are rules that determine how a specific transaction functions. This enables more complex Bitcoin scripting and could bring basic smart contract functionality to the network.
“Bitcoin allows users to set rules on who and how their bitcoins can be spent. All CAT does is that it joins two values together. So if you have ‘abc’ and ‘def,’ CAT will join these two values together to make ‘abcdef,’” Heilman said, adding that such a basic maneuver isn’t possible today on Bitcoin- CoinDesk
To visualize this in practice, the tweet below shows the structure of an OP_CAT transaction where 0.999 BTC can only be spent to a specific address.
Secondly, OP_CAT supports fungible tokens (CAT20 standard) and non-fungible tokens (CAT721 standard). For instance, Fractal Bitcoin, a Bitcoin scaling solution, has successfully deployed the OPCAT token which is a CAT20 token using the OP_CAT protocol which it has deployed in its mainnet. With this successfully tested use case, the approval of OP_CAT in Bitcoin mainnet would also see similar tokens on it.
Thirdly, OP_CAT can be used to build and verify Merkle trees and other hash data structures within Bitcoin Script. As we know, the core operation enabling Merkle tree creation and verification is composed of concatenating two values and then hashing them and, as we have learned, OP_CAT enables concatenation. This way, verifying transactions and securing Bitcoin blocks could be more efficient.
OP_CAT also supports Simplified Payment Verification (SPV); this would allow lightweight clients (such as mobile phones) to independently verify the authenticity of tokens on Bitcoin without relying on central servers.
This list is not exhaustive, but beyond these technical improvements, OP_CAT also extends its potential application in one more sector - Bitcoin Layer 2s (L2).
What Role Does OP_CAT Play in Bitcoin L2?
First, OP_CAT would be a key player in bringing rollups to Bitcoin. As we have seen above, it brings covenants, which enable the construction of more complex scripts which are key blocks in building ZK-rollups. .
In addition, through data concatenation and covenants, OP_CAT could facilitate a trustless bridge between Bitcoin and L2s. This interoperability is crucial for a secure smart contract ecosystem to flourish on the Bitcoin and other applications that rely on the interaction between multiple blockchain ecosystems.
It is true all these are potential capabilities in Bitcoin if OP_CAT becomes what many think it would become, but since we know Bitcoin, we all know getting approval for an upgrade like this is not an easy road, and this leaves us with a question...
What is the Timeline for OP_CAT’s Implementation?
As is the case with every Bitcoin proposal, the approval of OP_CAT depends highly on consensus among the community. Ethan himself noted that the moment it got assigned a BIP, it now meant that the argument over the proposal could finally begin.
And true to this, two parties have become vocal. On one side are those who criticize it, and on the other are those who support its implementation - the proponents.
The Critics
A group of Bitcoiners, 'ossificationists,' who advocate for preserving Bitcoin in its current state and view any protocol upgrades with skepticism, have come out particularly concerned that changes, like the introduction of covenants, could undermine the network's decentralization.
In addition, the same potential security vulnerabilities that were problematic in 2010 are now part of their arguments where they warn that rushing the approval of OP_CAT on Bitcoin could come at an immense security cost.
While some individuals have clearly come out to criticize OP_CAT, others have just passed a voice of caution.
For instance, Robin Linus in an article titled 'Prevent the CATastrophe,' highlights some common fallacies often repeated by proponents of the OP_CAT proposal with an aim to steer the discussion toward a more fact-based rational analysis.
While the arguments of most critics hinge on the belief that it is best to stick closely to Bitcoin's original vision, an irony lurks since OP_CAT was initially part of Bitcoin, so is this a counterargument? Let's hear what the other party has to say...
The Proponents
Among the biggest proponents of OP_CAT are the co-founders of Taproot Wizards, Eric Wall and Udi Wertheimer, who have waged several campaigns to see it activated as we saw earlier.
In addition, many other prominent figures in crypto are also in support of this opcode activation. For instance, Paul Sztorc, the Founder and CEO of LayerTwo Labs, has openly shown support for OP_CAT where he even tweeted about the need for its activation along his BIP 300 and other opcodes.
On this side, core Lightning developer Rusty Russell is also a notable figure. Through his ‘Great Script Restoration’ project, he proposes the restoration of OP_CAT and most of the opcodes previously disabled by Satoshi.
Apart from individuals, companies have also come out to show support for this opcode. StarkWare, for instance, launched a $1 million fund to support researchers and developers with innovative ideas on how to safely and effectively implement OP_CAT on Bitcoin.
Closing Thoughts
At this point, OP_CAT is still up for debate but without much apparent movement. But as we know, Bitcoin is a leaderless and decentralized network, and debates like these are what make the name stick.
Ethan himself acknowledged this and when OP_CAT was assigned a BIP, he got himself out of the way.
“Speaking only for myself, at this point I plan to remove myself from the process and let the community debate if OP_CAT is something they want or not want," - Ethan Heilman
This means that the power to see this opcode on Bitcoin is now in the hands of the community and unless a consensus is met, the question on the timeline of implementation still remains a mystery!
Connect with Bitfinity Network
Bitfinity Wallet | Bitfinity Network | Twitter | Telegram | Discord | Github
*Important Disclaimer: The information provided on this website is for general informational purposes only and should not be considered financial or investment advice. While we strive for accuracy, Bitfinity makes no representations or warranties regarding the completeness, accuracy, or reliability of the content and is not responsible for any errors or omissions, or for any outcomes resulting from the use of this information. The content may include opinions and forward-looking statements that involve risks and uncertainties, and any reliance on this information is at your own risk.
External links are provided for convenience, and we recommend verifying information before taking any action. Bitfinity is not liable for any direct or indirect losses or damages arising from the use of this information.
Comments ()