Skip to content

Instantly share code, notes, and snippets.

@catOnStack
Created January 1, 2025 01:30
Show Gist options
  • Save catOnStack/3e9aea351346cd316e6e0dcaa195da2d to your computer and use it in GitHub Desktop.
Save catOnStack/3e9aea351346cd316e6e0dcaa195da2d to your computer and use it in GitHub Desktop.
OP_CAT: The Ultimate Opcode for Bitcoin Innovation
OP_CAT
Unmatched Adoption
Despite being activated just six months ago, OP_CAT has already outpaced other proposals like BIP 118 (SIGHASH_ANYPREVOUT, APO) and BIP 119 (OP_CHECKTEMPLATEVERIFY, CTV), which have been on signet for nearly two years. With 10 times more transactions on signet, OP_CAT’s usage dwarfs APO’s and CTV’s, showcasing its exponential adoption (source).
Proven Track Record
OP_CAT’s reliability is well-established, having been deployed on the Liquid Network and signet. Tens of millions of transactions have been processed without a single exploit, underscoring its security and practicality.
Dispelling Myths
Inefficiency: While OP_CAT is generic, its optimization becomes straightforward as specific use cases are identified.
Concern on MEV: Root cause of MEV in Bitcoin is Replace-By-Fee (RBF), it's already there, enabling OP_CAT doesn't introduce MEV.
Centralization: OP_CAT fosters decentralized Layer 2 solutions, minimizing dependence on trusted intermediaries.
OP_CSFS/CHECKSIGFROMSTACK: It enables signature verification against arbitrary data, can be emulated using OP_CAT and OP_CHECKSIG. However, its full potential remains untapped without OP_CAT.
OP_CTV/CHECKTEMPLATEVERIFY: While OP_CTV enforces predefined spending templates, its scope is limited, particularly in supporting recursive covenants.
OP_VAULT: Designed exclusively for vaults purpose, OP_VAULT lacks versatility. OP_CAT not only replicates its functionality but also extends far beyond it.
TXHASH: Although a superset of OP_CTV, TXHASH’s capabilities can be expanded further with OP_CAT.
ANYPREVOUT (SIGHASH_APO): Tailored for Lightning Network optimization, it serves a niche purpose compared to OP_CAT’s broad applicability.
Conclusion
OP_CAT’s unparalleled versatility, proven reliability, and rapid adoption make it the superior choice for advancing Bitcoin’s functionality. Its ability to support a wide range of use cases while maintaining security and decentralization solidifies its position as a cornerstone of Bitcoin Script innovation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment