Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-graphql domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/stas-backend/public_html/bitcoinsv_io/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the updraftplus domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/stas-backend/public_html/bitcoinsv_io/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/stas-backend/public_html/bitcoinsv_io/wp-includes/functions.php on line 6114
Illustrating Bitcoin's suitability for smart contracts and tokens

Illustrating Bitcoin’s suitability for smart contracts and tokens

Mihael Sinkec talks about smart contracts and tokens

At the first stage session during the WeAreDevelopers (WAD) World Congress in Berlin showed, Darren Kellenschwiler, Co-Founder & CTO of Elas and Developers Community Manager at Bitcoin Association, lay a theoretical foundation for understanding Bitcoin’s Turing-completeness – and thus, it’s suitability for building smart contracts and issuing tokens.

Mihael Šinkec (Software developer at sCrypt) followed Kellenschwiler with an illustration of how you can use Bitcoin to build smart contracts and issue tokens. 

Illustrating Bitcoin as a Turing complete system

After having introduced himself and his company sCrypt, a company that deploys smart contracts on BSV blockchain, Šinkec reverts the discussion back to the whitepaper. Contrary to what the majority in the blockchain space believes, Satoshi Nakamoto described the smart contract capability of Bitcoin:

‘The design supports a tremendous variety of possible transaction types that I designed years ago. Escrow transactions, bonded contracts, third party arbitration, multi-party signature, etc. If Bitcoin catches on in a big way, these are things we’ll want to explore in the future, but they all had to be designed at the beginning to make sure they would be possible later.’ – Satoshi Nakamoto

Why Bitcoin has been (mis)conceived as not Turing complete

Šinkec points out that these misconceptions arose due to the course that (what later became known as) Bitcoin Core took. As a Bitcoin implementation, Bitcoin Core got rid of all the original OPcodes to realise a user-based and supposedly decentralised version of Bitcoin. A by-product of this choice was that it does not scale and only supports a limited amount of transaction types. Šinkec stresses that this was not the original vision for Bitcoin as Satoshi Nakamoto intended:

‘It turns out that Satoshi was actually a long term thinker, and even before the Genesis block was mined, he actually introduced Bitcoin script. That’s really an expressive language in which you can code locking conditions for any transaction.’

Examples to prove Bitcoin’s Turing completeness

The sCrypt developer then provided practical examples to prove that Bitcoin is Turing complete. Applications that demonstrate Bitcoin’s Turing completeness include Conway’s ‘Game of Life’ and a so-called Rule 110 cellular automaton. Both of these applications are proven to run on BSV blockchain and thus demonstrate its Turing completeness.

Šinkec then went on to describe sCrypt as a programming language and how it basically works. He did this because the company sCrypt translates core features of other blockchain protocols for the sole purpose of demonstrating sCrypts capabilities. The following softforks are either already implemented on BTC (Schnorr signatures and taproot) or are proposed (Graftroot).

  • Schnorr Signatures
  • Taproot
  • Graftroot

The Software engineer describes that sCrypt was able to run all of them natively on BSV blockchain:

‘Here’s the contract for Schnorr signatures. So we actually implemented elliptic curve arithmetic inside the script itself. So there’s no need for any oracles or anything else, it runs on the base layer i.e. layer one.’ 

The case of Taproot is even more extreme. Because it was hard to implement on Bitcoin Core, it took Blockstream and other involved parties a lot of resources to develop it. Over the span of four years more than 150 developers were involved. Šinkec describes that with sCrypt, one single BSV blockchain developer, namely sCrypt’s Founder and CEO, Xiaohui Liu was able to implement Taproot on BSV blockchain in 20 minutes on the original Bitcoin protocol.

The developer then briefly outlined how via sCrypt Graftroot, ring signatures (Monero) and zK-SNARK – zero knowledge proof (Zcash) can all be implemented on BSV blockchain as well. Similarly, it would also be no issue to run the entire Ethereum blockchain on BSV blockchain as well, as the sCrypt engineer explains: 

‘Essentially, that means we could have like the whole Ethereum blockchain running on Bitcoin. On Ethereum they have global state. What that means is they have a single thread of execution. So we could just basically embed like their whole account model into a single line, a chain of UTXOs and that could run the entire Ethereum blockchain.’

Turning Ethereum smart contracts into BSV blockchain script

As a lot of developers are used to building on Ethereum’s Solidity programming language, the question was now whether there is a quick way to get these smart contracts to sCrypt and BSV blockchain.

sCrypt have been working on a solution in partnership with Vaionex, a BSV blockchain Transpiler launched in May 2022. Šinkec demonstrated how this Solidity Transpiler translates any Solidity smart contracts and translates with a high accuracy (though he recommends that developers review the code to correct 5 – 10% of the translated code). 

The transpiler also comes with templates for token contracts (ERC-20, ERC-721), voting contracts and much more.

Join future developers events

This presentation took place at the WeAreDevelopers (WAD) World Congress in Berlin. To make sure you don’t miss out on similar events in future, follow us on Twitter.

, ,