Bitcoin Core contributor Jeremy Rubin has revealed his work on a new smart-contract language for Bitcoin, which he hopes will increase the âfinancial self-sovereigntyâ of users.
Rubin demoed the new language, Sapio, on Saturday at a RecklessVR meetup presentation in virtual reality, with many audience members joining the talk in VR headsets. He plans to release the programming language as a part of his new research organization, Judica.
Stateful smart contracts allow users to lock up money so funds canât be spent until certain conditions are met or a series of interactive steps have been taken. These contracts are most commonly associated with the Ethereum blockchain, which is very flexible, making stateful smart contracts easy to write.
Read more: How Do Ethereum Smart Contracts Work?
Itâs lesser-known though that Bitcoin also supports several different types of more complex smart contracts, such as requiring more than just one person to sign off on a transaction before it can be spent. But compared to Ethereum, Bitcoin smart contracts are much more complicated and unwieldy to create, or they are stateless â that is, the conditions are met either all at once or not at all. Thus far, this has meant that there have been fewer options for developing smart contracts on Bitcoin.
Rubin hopes to further expand the smart contract use cases for Bitcoin to give users even more control over what they can do with their money.Â
Sapio could work for Bitcoin smart contracts today. But most of the types of smart contracts Rubin envisions arenât available on Bitcoin yet.
He built Sapio specifically around CHECKTEMPLATEVERIFY (CTV), a change that, if adopted, could bring more smart contract features to the Bitcoin network, namely allowing users to secure their bitcoin in new ways.
In his talk, Rubin described CTV as a âa simple covenanting system for bitcoin.â The idea of covenants, which has been around for a long time, is to add security measures, such as baking in extra rules to a batch of bitcoin, preventing the owner of the bitcoin from sending to all but a few addresses.
âIn practice, it means it allows you to do some more complex smart contracting [determining] how bitcoin can be spent when a coin is created,â Rubin said.
One use case for covenants is bitcoin âvaults.â Usually once a private key is taken, a malicious actor can scurry away with the associated coins. But locking up your funds in such a vault adds restrictions on the movement of bitcoin in the case of a mistake or another security issue.Â
âI think vaults are one of the most important use cases that CTV is going to bring to the table. They bring an immense amount of financial sovereignty tools to a wide audience,â Rubin said, adding that this technology opens up the opportunity for users to do this by themselves without a third-party service provider.
Read more: The âGreat Lockdownâ Is Boosting Demand for Bitcoin Custody Solutions
Vaults are currently possible in bitcoin, but could be much easier to create with CTV, Rubin argued.
While Rubin is most excited about vaults, CTV opens up a variety of other use cases, such as congestion control. CTV could help bitcoin users wait out high fees for a time where the blockchain has less transaction traffic, and, as such, lower fees.
Now that Rubin has created Sapio, a smart-contract language specifically for CTV, these use cases will become easier for developers to program and thus, easier for everyday users to implement.
Rubinâs newly born research organization Judica will focus on this bundle of technologies. It plans to release tools it hopes will âmassively expand the Bitcoin economy,â Rubin told CoinDesk in an email.Â
The word âJudicaâ is Latin for âjudgmentâ: Rubin sees Bitcoin as a judiciary, and he wants to push it to grow in this role.Â
âIf you look at the relationship between the market and the government, usually free-market absolutists will say that the government merely is an interfering agent and will go away. But if you take a closer look, the functionality of the courts is actually critical to the development of the economy. Without reliable courts or some judicial system (private arbitration counts, too), transacting with relative strangers is far too risky which severely limits economic activity.â Bitcoin comes in and makes this all easier. âThe ability to enforce contacts through a legal system (rather than through personal force) enables an economy to flourish,â he said.
But he argues Bitcoin is too limited in what it can do today.
âThe Bitcoin blockchain serves the role as a judiciary, but right now the types of contracts it can resolve is fairly limited and itâs difficult to develop more advanced contracts,â Rubin added.
As a part of Judica, Rubin plans to release Sapio âalong with designs for a myriad of smart contractsâ implemented in the smart-contract language. As Judica is still in its early stages, Rubin said heâs looking for grants, funds and fellow team members to join in.Â
But itâs unclear when (and if) CTV will be deployed, Rubin explained in his talk. Itâs a bigger Bitcoin change, so it might take time before the opcode is usable.
âI donât know exactly when itâs going to happen. Iâd like to see it sooner rather than later,â Rubin said.
Because Bitcoin is decentralized, there is no central authority to make decisions. As such, developers donât always agree about the way forward.Â
âIf you ask each developer when [CTV will be deployed], youâll get a very different answer,â Rubin said in his lecture. âThere are a reasonable amount of people who say itâs three years from now â at least.âÂ
Rubin has been championing CTV, which, if successfully activated, would add these abilities to Bitcoin. Most changes to Bitcoin â large or small â are implementation details or local policies. However, because CTV changes a global consensus rule, it would be delivered via a âsoft fork,â even though the actual code changes required for CTV are small. As such, it would require enough network participants to support it in order to activate smoothly. So, Rubin isnât sure when the change will become available.
Read more: Hard Fork vs Soft Fork
Many bitcoin developers are more cautious, only giving their blessings to changes that have been vetted to a certain degree.Â
But, in Rubinâs opinion, a timeline of three years is far too lengthy. He called this timeline âsadâ and said, âItâs hard for me to make the case that this is important stuff to work on if itâs not really usable until at least three years from now.â
âSome people are, like, âShip it and see if we can get it in in six months.â I fall more in that camp,â he said, suggesting that changes should be made quickly while Bitcoin is still in its early stages and is more malleable. âI argue that Bitcoin is so early and experimental that we need to be pushing really quickly. Other people feel that Bitcoin is more ossified and needs to move really slowly.â
Rubin thinks that this sort of change is important to Bitcoinâs future.Â
As he said in his presentation, âWe need a lot of new [features], so that when we say âBitcoin fixes this,â it actually means what we think it does.â