Bitcoin Core team member Jeremy Rubin is working on a new smart contract language for Bitcoin that will increase user control over his BTC.
Jeremy Rubin showed off the new Sapio language on Saturday at the RecklessVR virtual reality presentation meeting , which many audience members joined in VR headsets. He plans to release a programming language as part of his new research organization, Judica.
Stateful smart contracts that fix state enable users to save money – they cannot be spent until certain conditions are met, including multi-stage ones. Smart contracts are most often associated with the Ethereum blockchain, which has the flexible programming language Solidity, which facilitates the writing of state-fixing smart contracts.
Not everyone knows that Bitcoin also supports several different types of smart contracts. For example, including the requirement that more than one person sign a transaction before it can be spent (multi-signature transactions). They are widely used in SegWit and Lightning Network technologies. But compared to Ethereum, Bitcoin smart contracts are less functional and more cumbersome to create, or do not fix the state – that is, the conditions are met either immediately or not at all. So far, this has meant that there are fewer options for developing smart contracts for Bitcoin.
Rubin hopes to expand the use of smart contracts for Bitcoin to give users more control over what they can do with their money.
Already today, Sapio can work for Bitcoin smart contracts. But most types of such contracts, according to Rubin, are not yet available online. He created Sapio specifically for BIP CHECKTEMPLATEVERIFY (CTV). This change, if adopted, could bring more smart contract features to the Bitcoin network, and users will be able to protect their BTC in new ways.
In his speech, Rubin called CTV “a simple system of agreements for Bitcoin.” The idea of the agreements, which has existed for a long time, is to add security measures, for example, provide additional rules for moving BTC, preventing the cryptocurrency from being sent to all but a few allowed addresses.
“In practice, this means that the system allows you to execute more complex smart contracts and determine how you can spend BTC,” Rubin said.
One use case for agreements is the BTC repository. Usually, after capturing the private key, an attacker can gain access to all crypto assets associated with it. But blocking bitcoins in such a storage adds restrictions on the movement of BTC in the event of an error or other security problem.
“I think storage is one of the most important features that CTV will present. They provide a huge number of financial sovereignty tools for a wide audience, ”Rubin said, adding that this technology offers users the opportunity to protect BTC on their own without a third-party service provider.
Now the prototype of the BTC intranet storage is already available and was proposed earlier, but creating them using CTV will be much easier, Rubin believes.
CTV also offers many other features, such as monitoring network congestion. CTV is able to help BTC users wait out high commissions and send coins at a time when it will be cheaper. Now that Rubin has created a smart contract language specifically for CTV, these usage scenarios will become easier for developers to program and, therefore, more accessible for ordinary users.
Blockchain as an arbiter
The recently established Rubin research organization Judica will focus on this set of technologies. He plans to release tools that, he hopes, “will significantly expand the economy of Bitcoin.” The word “judica” in Latin means “judgment”: Rubin considers the Bitcoin blockchain as a “judge”, and wants to push the network to develop in this capacity.
“If you look at the relationship between the market and the government, then, as a rule, supporters of the free market will say that the government is only an agent that bothers everyone and should be eliminated. But if you delve deeper into the problem, the functionality of the courts is actually crucial for economic development. Without reliable courts or any judicial system (private arbitration also matters), transactions with strangers are too risky, which seriously limits economic activity. The ability to provide contacts through the legal system (and not just on their own) allows the economy to flourish, ”he said.
At the same time, Rubin claims that Bitcoin is still very limited in its capabilities in this area.
“The Bitcoin blockchain serves as a judge, but only limited types of contracts are available in it, and it is difficult to develop more complex contracts,” he added.
As part of Judica, Rubin plans to release Sapio “along with projects for many smart contracts” implemented in his language. Since Judica is still in its infancy, Rubin said he is looking for funding from other developers who are ready to join his initiative.
Deploy CTV and Sapio
It is not yet clear when (and if) the CTV will be deployed, Rubin explained in his speech. This is a major change in Bitcoin, so it may take some time before the transaction code becomes usable.
“If you ask different developers when the CTV will be deployed, you will get different answers,” Rubin said in his lecture. “A sufficient number of people believe that this will happen no earlier than three years later.”
Rubin advocates the adoption of CTV, which, if successfully activated, would add new features to Bitcoin. Most of the changes in Bitcoin – large or small – are implementation details or local policies. However, since CTV changes the global consensus rule, it will be deployed via soft fork, even if the actual code changes required for CTV are small. Thus, to ensure smooth operation, a sufficient number of network participants will be required. Therefore, Rubin is not sure that the changes will take effect quickly.
According to Rubin, three years is too long. He called this temporary assessment “sad” and said: “It’s hard for me to say that this is an important development that needs to be worked on if it is not really used for at least three more years.”