Miniscript Will Make Full-Fledged Smart Contracts in Bitcoin Possible

Johnny Walker
Chief Editor
6 November 2019 Updated on  Обновлено   1 February 2023

Satoshi Nakamoto introduced the Bitcoin protocol in 2008. It was written in C++ and extended with scripts that allow automatic execution of some actions, e.g. verification of signatures and multi signatures. The instructions are written in a unique scripting language Script, created specifically for Bitcoin. According to Turing, it is incomplete, which makes it safer than other popular languages and also easy to understand and use.

Nevertheless, Script is not free from shortcomings. The main of them are some contradictions that do not allow users of the Bitcoin network to fully use smart contracts. Along with the well-known scalability issue, it became the reason for official updates in order to improve the code and for the emerging of the first hard forks and altcoins.

Miniscript the new Bitcoin language

Something about smart contracts

A smart contract is a self-executing algorithm that guarantees a secure exchange of assets without third-party intervention. It contains conditions that complete the transaction when they are fulfilled. It is possible to say that blockchain is impossible without smart contracts.

Crypto enthusiasts believe that smart contracts have been first introduced on the ‘second generation’ blockchain in Ethereum. However, a blockchain of the number one cryptocurrency also supports them, because every transaction in the Bitcoin network is a simple smart contract.

Script language

Script is the name of the Bitcoin scripting language. It is based on Forth and allows for secure transactions on the network. Its main characteristics:

  1. Works on the basis of stacks. This ensures the code compactness, capability for optimisation, and speed.
  2. Processed from left to right.
  3. Not able to do cyclic calculations, does not support loops.
  4. It is a language of increased security without the issue of stopping since it is incomplete according to Turing.
  5. Concise and simple. It contains 256 instructions, 100 of them are work instructions. There is a large reserve (75 codes).

Among the instructions: conditional (if/then constructions), arithmetic, logical, crypto instructions. In most cases, only one script — signature verification — is used. It replaces the third party during settlements on the Bitcoin network, guaranteeing the fulfilment of the previously agreed conditions by each party and avoiding double-spending.

New Miniscript language

Despite all advantages, Script is not suitable for full-fledged smart contracts, as it cannot guarantee their correct execution and security. Therefore, since 2008, the development team has worked to create its improved version. At the head of the team:

  • Pieter Wuille — co-founder of Blockstream, a member of the Bitcoin Core development team;
  • Andrew Poelstra — mathematician and programmer from Blockstream;
  • Sanket Sanjalkar — an experienced developer, crypto enthusiast.

On 20 August 2019, a new language was introduced — Miniscript. How is it different from its predecessor? The differences are in its functionality, advanced features, and readability.

Miniscript still needs refinement, but professional blockchain developers (including those not involved in the project) actively comment on the project, placing high hopes on it. According to expert programmers, it can:

  1. Maintain and improve the operation of the Lightning Network protocol.
  2. Establish the compatibility of cryptocurrency wallets.
  3. Help to create complex smart contracts (for example, triggered at a certain time).
  4. Favourably affect the solution to the Bitcoin scalability issue.

The idea is that the fast-acting and easy-to-use Miniscript will be fully compatible with the Bitcoin consensus, and its implementation will not require any changes.

Thus, the update will make the cryptocurrency more adapted to the market situation. It will be able to solve some typical issues and expand the functionality by bringing the blockchain of the main digital asset closer to Blockchain 2.0.


Feel Free to Contact Us