Earlier this year, Weikeng Chen, along with his partners at venture firm L2 Iterative, shifted their attention to the rapidly evolving Bitcoin ecosystem. Chen, a native of China, observed a growing interest in Bitcoin development from major players in the mining space who began supporting various projects in the Ordinals and layer 2 space.
“I never really realized Bitcoin had a development community,” Chen remarks, half-jokingly.
Fast forward to last week, an open-source initiative led by Chen and sponsored by the infrastructure company Starkware achieved a groundbreaking milestone: the first implementation of a zero-knowledge verifier using Bitcoin script.
In an industry where significant breakthroughs are rare, this achievement has generated substantial excitement. Advocates believe zero-knowledge proofs are crucial for unlocking Bitcoin’s programmability and scaling its use globally.
Starting from Scratch: The Journey of Weikeng Chen
Chen, a PhD graduate from UC Berkeley specializing in cryptography, began seeking opportunities to apply his technical skills in the industry to better position his firm with potential investors and companies. Despite his extensive engineering experience, he quickly realized the scarcity of resources and the steep learning curve involved in Bitcoin development.
“A lot of the material out there is outdated and does not reflect the current state of development,” Chen explains. His interest in zero-knowledge technology eventually led him to explore Bitcoin’s capability to perform the computations required for verifying zero-knowledge proofs.
During his research, he stumbled upon Robin Linus’ work on BitVM, a novel computing paradigm. Intrigued by the potential of using fraud proofs to implement zero-knowledge systems compatible with Bitcoin, Chen delved into the white paper. He noticed some issues with the concepts involved and reached out to Linus for clarification. This interaction sparked a productive collaboration between Chen, Linus, and other researchers as they iterated on the original idea and optimized it.
“It was obvious to me that this method could be used to verify zero-knowledge proofs, so my work quickly shifted towards implementing a SNARK verifier,” Chen recalls.
A verifier is a cryptographic tool that verifies zero-knowledge proofs on the Bitcoin network.
The OP_CAT Opportunity: Collaboration with Starkware
Around the same time, a team at Starkware, a giant in the zero-knowledge industry, was paying close attention to the emerging activity in the Bitcoin community. Starkware founder Eli Ben-Sasson had advocated for zero-knowledge technology in the context of cryptocurrencies since an early Bitcoin conference.
“Back in 2013, when I suggested using validity proofs to scale Bitcoin, I was hoping Satoshi might still be around and would make it happen faster. Thanks to cryptography visionaries like Weikeng Chen and Bitcoin OP_CAT researchers like Andrew Poelstra and Ethan Heilman, my 11-year-old dream feels now within reach,” Ben-Sasson comments.
Last month, Starkware announced the deployment of numerous initiatives focused on bridging the technology gap between Bitcoin and zero-knowledge proofs. They offered a $1,000,000 grant for research and exploration into the potential of the OP_CAT soft fork proposal.
Initially, the prospects of zero-knowledge technology on Bitcoin were considered unlikely due to the difficulty of achieving consensus over smaller changes to the Bitcoin codebase. However, upon learning about Chen’s progress with BitVM, Starkware’s outlook changed dramatically. Chen had already identified Starkware’s Circle STARKs technology as a “Bitcoin-friendly proof system.”
Following discussions, both parties agreed to collaborate on an open-source implementation of a STARK verifier using the OP_CAT primitive. “I knew it could be done. We just needed to put all the pieces together,” Chen suggests.
Achieving the Milestone: Verification on the Bitcoin Network
Two months later, the project reached its goal with the help of other developers like Pingzhou Yuan, another early BitVM contributor. Last Friday, Chen announced the successful completion of the project in the team’s Telegram group: “I think I finished the job!”
Following successful local tests, Chen broadcasted a series of transactions to Bitcoin’s Signet testnet network to execute the entire script. The STARK proof, based on Starkware’s open-source Stwo implementation, was split into concurrent transactions chained together using an OP_CAT-based covenant.
At 6:29 AM on July 12, 2024, the final transaction was confirmed on the Signet network, marking what proponents believe could be the beginning of a new era of development on Bitcoin.
“This was a tremendous effort and took a significant amount of time,” says Chen. “We started with nothing. There’s no information about ZK proofs on Bitcoin. There’s no information regarding the mathematical operations to follow. We had to build the full stack, which eventually led to implementing the STARK verifier.”
Inspiring a New Development Path
While this achievement is significant, Chen insists the job is not yet complete. When asked if he was optimistic about his work laying the foundation for new scaling protocols like rollups on Bitcoin, Chen was quick to temper expectations.
“The idea roughly works but the proof-of-concept is not production-ready. Validity proofs also take a lot of block space which might turn out to be expensive in the future.”
Contributors at Starkware acknowledge the challenges ahead but remain confident that this project represents “a monumental leap forward” towards Bitcoin scaling solutions leveraging their ZK roll-up technology.
The collaboration is likely to strengthen arguments in favor of a potential OP_CAT soft fork. Chen developed a reliable framework for covenants using OP_CAT, which he believes can highlight the versatility of this script improvement proposal. He hopes other developers will play with his code and reach the same conclusion about its benefits.
“I don’t think there is a lot of risk once we have developed best practices. There are not that many places where this is going to go wrong. We now have a clear demonstration that OP_CAT can be safely adapted to various covenant projects.”
The Road Ahead: Community and Development
Chen admits he is not yet familiar with all the dynamics of Bitcoin open-source development but intends to share his progress with the development mailing list. He hopes others will contribute, review, and provide feedback on his work.
Reflecting on his journey, Chen emphasizes the importance of creating a fertile environment for new developers entering the ecosystem. He believes many talented developers are passing on the opportunity to build on Bitcoin due to the lack of a cohesive vision.
“There is not a clear sense of direction right now which leaves contributors perplexed about their ability to impact the future. Hopefully, the emergence of new tools and primitives can improve this situation so Bitcoiners are allowed to dream again.”
Chen’s work, and the collaboration with Starkware, marks a pivotal moment in Bitcoin’s evolution. As the community continues to explore the potential of zero-knowledge proofs and other advanced technologies, the foundation laid by this achievement could pave the way for significant advancements in Bitcoin’s programmability and scalability, opening new horizons for the cryptocurrency’s future.