Turing-complete smart contracts on Bitcoin? ??
A new proposal from Robin Linus of ZeroSync promises Turing-complete smart contracts on Bitcoin, all with no changes to Bitcoin's code.

Turing-complete smart contracts on Bitcoin? ??

A new proposal from Robin Linus of ZeroSync promises just that, all with no changes to Bitcoin's code.

Need a more simplified explainer? Here's what you need to know ??


Bitcoin's native scripting language is quite limited.

It's one of the reasons we are so focused on scaling Bitcoin through various layers ??

These various layers act as building blocks that ultimately bring more utility to Bitcoin.

One big unlock? Smart contracts ??


This year, we have seen an explosion of conversations about rollups on Bitcoin.

The most common types? Sovereign, Zero-Knowledge & Optimistic.

These scaling solutions run on an L2, but still settle back to the main chain in a way that is cryptographically secure.

BitVM uses a technology that is similar to optimistic rollups.


Optimistic rollups generally assume that a transaction is valid, but allocate a certain time period to be disputed ??

If disputed, the rollup will be returned back to a previous state.

So with BitVM, the actual smart contract calculations happen on a separate layer ??

If there is a dispute in the result, those disputes are "saved" on Bitcoin's main layer. Otherwise, all BitVM activity happens off-chain.


BitVM largely relies on 4 Bitcoin components:

?? Hashlocks

? Timelocks

?? Merkelized Trees

?? Multisig


?? Hashlock

A hashlock is a cryptographically hidden key generated by the person who initiated a transaction.

This key ensures that a transaction can only be finalized once it has been approved by the initiator.


? Timelock

Transactions under a timelock cannot execute until after a certain date & time or block height have been reached.


?? Merkelized Trees

Merkle branches use cryptography to record the result of an executed script to a blockchain, instead of all the possible ways a script can be executed.

This drastically reduces the space that transactions take up, especially more complex ones!


?? Multisig

Multisig generally allows multiple parties to share control of a single wallet. Under BitVM's design, you have a 2-part multisig that consists of a Prover and a Verifier.


So how does BitVM work?

Both the Prover and Verifier would first compile the smart contract into a map of if-then statements, containing every possible outcome of the smart contract.

This complex map would be Merkelized to save space on-chain ??


Both parties must also jointly pre-sign a sequence of challenge-and-response transactions ??

These pre-signed transactions can be used later in case of a dispute!

Once those prerequisites have been completed, they can deposit BTC into the Taproot address ??


This activates the smart contract and allows both parties to start exchanging data off-chain or on a separate layer.

Verifiers can use Timelocks to force Provers to make a decision within a given time.

If the Prover makes an incorrect claim, the Verifier can dispute it and take their deposit ??


This guarantees any attackers would lose their deposit and incentivizes good behavior ??

Now that we have a basic understanding of how BitVM contracts are structured, we can dive a little into what you can do with them.


There's currently three "commitments" outlined:

?? Bit Value Commitment

?? Logic Gate Commitment

?? Binary Circuit Commitment


?? Bit Value Commitment

This allows an approver to set the value of a bit to either "0" or "1" across different Scripts and UTXOs, allowing a script to run across multiple transactions.

These binary 0's and 1's are the basis for all computing ??


?? Logic Gate Commitment

This allows NAND gates and enables functions like AND, NOT, & OR statements.

NAND gates take the state of two Inputs (such as two Bit Values) and generate one Output based on the state of those Inputs.


?? Binary Circuit Commitment

Once various logic gates have been defined, you use Binary Circuits to construct more complex digital systems.

Think of it like multiple NAND building blocks forming a completed Smart Contract structure ??


That's as technical as we're going to get for now ??

There's a ton of additional resources on BitVM if you want to dive in deeper or get more technical.

Here are some more resources to check out:


One big observation we've made:

BitVM has catalyzed a huge shift in sentiment when it comes to building on Bitcoin.

People that were previously apathetic or even against bringing smart contract functionality to Bitcoin are now getting on board.

It's inspiring to see! ??


Thanks for reading! ??

We're Trust Machines , and we're building the largest ecosystem of apps on Bitcoin. And all the while, covering the latest developments in the space!

Give us a follow to learn more and share this article to help us spread the word ??

要查看或添加评论,请登录

Trust Machines的更多文章

社区洞察

其他会员也浏览了