Smart contracts for Bitcoin: how it works

The world’s first smart contract on Bitcoin. This became possible thanks to cooperation of the Russian platform to create smart contracts MyWish team RSK. Before smart contracts on Bitcoin functioned, what the owners of this cryptocurrency could not manage their funds.

How the platform works MyWish how the developers managed to circumvent the code of Bitcoin, and what benefits the new platform gives owners of cryptocurrency to the correspondent founder and CEO MyWish, PhD in computer science Vladimir Tikhomirov.

Vladimir, why is there a need to create a new platform?

To create a new platform there were a few prerequisites. First, the owners of the bitcoins were in need of the conclusion of smart contracts. They needed methods for managing its financial instruments.

Secondly, people were not easy to create a smart contract. Around these documents, a lot of noise, however, few people know how to create them, where to place and how they work. With the advent of new platforms create a smart contract is available to any individual. Users of the platform do not need to learn the basics of programming to understand the features of decentralization and more — to order an external audit of the smart contract.

How the platform works from the user’s point of view?

A person can create a smart contract in a few clicks. For this the user needs to select a document template and make it your own values. For example, a person can choose the start date of the smart contract. After the platform automatically compiles a smart contract and is testing it for syntax and logic errors. Then the paper is sent to one of the block chain, which is selected by the user. After that our client gets the address of the smart contract. People can run the document through our platform or through the standard wallets. Thus we create for the user a program that can only manage it.

Give some examples template smart contracts that can benefit your client?

Contract-wallet will allows you to manage the funds as if they were at the usual address. But if management is terminated for any reason, the funds are transferred to the heirs.

Private event — contract lost key, which also manages the funds as a contract-wallet, but if the user loses the control key, then after a specified time the funds are transferred to the backup wallet to another contract.

And of course, the contract for the collection of investment — ICO Crowdsale contract with a Token contract.

What are the advantages of the new platform gives users?

First, the user does not need to have special knowledge to create on our platform to the smart contract. Man need to have is a bitcoin address of cryptocurrency means.

Second, the user can be confident in the invulnerability of the document that is generated on our platform. Before offering the customer ready smart contracts, we check it using automated tests already with the parameters entered by the user.

Thirdly, our service is at a high level. We always provide technical support to its customers, interface our platform is simple and intuitive, we will promptly answer any user questions.

Fourth, creating a smart contract on our platform, the user has the right to be wrong. The fact is that before the document is sent to one of the blockchains, it is automatically checked for syntactical and logical errors.

Finally, we give the user the opportunity to save when you create a smart contract. Now you can order custom development of this document from specialized companies. The average cost of a unique smart contract with the testing, deployment and external audit is 8-10 thousand dollars. In our platform the average cost of a finished document of $ 500, the user saves the time to search for developers and teams to audit.

Tell us about the technical side of the work platform?

The platform consists of two components — a web service MyWish to easily create smart contracts from templates and the new cryptocurrency network of RSK, combining the blockchain of Bitcoin and virtual machine Ethereum.

The platform is designed as a classic web application: a web interface, backend, and database. Each contract is compiled and tested in an isolated environment, and then it is stored in the database. The main difference of the platform of the web application is the integration kriptonite, which allows the user to place the collected contract to run it and manage it.

Technology stack, we can say the classic: python (django), postgresql, java, and AngularJS on the frontend. RSK-client is implemented in Java. The mechanism of consensus — Proof of Work (PoW).

How the developers managed to circumvent the code of Bitcoin?

MyWish team in partnership with RSK used symbiosis network Bitcoin and Ethereum. RSK created a copy platform Ethereum and cryptocurrency BTC — SBTC. One SBTC is equal to one BTC. To SBTC, the user needs to transfer the bitcoins to a special address. The Federation is the link between the two networks. The Federation has miners, which are both bottom of BTC and SBTC. Due to this, there is the possibility of simultaneous locking of BTC and SBTC issue (and Vice versa). Obtained after this procedure SBTC it can use when you create a smart contract.

Here is an example. The user wants to create criptoniana. First he chooses on the platform corresponding to the pattern of the smart contract and creates a document. Then, the user transfers BTC to a wallet and gets back SBTC. He adds to them the expense of a smart contract in the amount he wants to bequeath to heirs.

What is the functionality of the smart contracts created on a new platform, different from the functionality of the documents on the Ethereum?

Nothing. On the new platform, you can create the same smart contracts and Ethereum. However, sometimes the functionality of the documents created on the new platform, is limited. This is due to the fact that not all users have the latest version of the virtual machine Ethereum.

It always makes sense to enter into smart contracts on the new platform?

No, not always. For example, our platform is not suitable for tomenselo. The user has to translate in BTC SBTC, so the creation of smart contracts, he takes a lot of time. Unfortunately, the mechanism of currency conversion is not as well organized as we would have liked. However, there are contracts which people are willing to spend their time. This cryptogamae, life insurance, or marriage contracts.

What will be the transaction cost?

In the next three months, the RSK will offset the cost of creating smart contracts and transactions. When we popularize the platform, the transaction will cost the same as on the Ethereum.

How the platform will evolve further?

Of course, we will continue to develop different kinds of smart contracts. We want to offer our clients the maximum amount of ready-made documents that they can use without having special knowledge.

We also plan to become a kind of Marketplace for other developers. If a person came up with a great smart contract, why not post your document on our platform and not make a profit every time our client uses this template.

Our platform will work not only with Bitcoin but with other blockchains. Each of them has its pros and cons. So someone convenient to implement the smart contract on the Waves, and people in Cardano. That is, we intend to become a single platform to create smart contracts on all existing blockchains.

Добавить комментарий