Smart contracts are forms of computer programs that can be executed by a network of trustless nodes, without having to rely on any third party’s arbitration process. Due to their resistance to tampering, smart contracts are attractive solutions throughout many scenarios, especially those that rely on transferring a given amount of money to respect a group of pre-agreed rules. Throughout the past few years, several platforms for creating and executing smart contracts have been designed, and many of these have been actually deployed and used. Throughout this article, I will discuss the cryptocurrency blockchains that permit the usage of smart contracts.
Even though the main goal for innovating bitcoin was to create a decentralized currency, the immutability and transparency of its blockchain protocol have inspired the creation of protocols that deploy, a rather limited form of, smart contracts. Bitcoin offers a non-Turing programming language, which permits redeeming of a transaction, under specific predefined conditions. The programming language is of rather limited capabilities, as it only features a group of basic logical, arithmetic and crypto operations (e.g. hashing and validation of digital signatures).
Ethereum is the second biggest cryptocurrency by market capitalization. Just like bitcoin, ethereum’s blockchain is immutable, with a consensus procedure that resembles that of bitcoin. Ethereum’s blockchain features its own cryptocurrency, ether (ETH). Smart contracts are coded using a stack based bytecode programming language, which is a Turing-complete programming language, apart from bitcoin’s. There are several high level programming languages, the most popular of which is Solidity, which can be compiled into the bytecode language. Users create smart contracts and customize their functions via sending cryptocurrency transactions to the blockchain, whose effects are then verified by the nodes across the network. Both users and smart contracts can store coins and send and/or receive ETH to other users or smart contracts.
Counterparty is a platform without a special blockchain. Instead, it embeds its data in transactions across bitcoin’s blockchain. Even though nodes across bitcoin network ignore data embedded in such way, Counterparty’s network nodes identify and interpret them. Smart contracts can be coded using the same language used when coding smart contracts for ethereum’s network. Nevertheless, oppositely to ethereum, the results of computation processes are not validated by a consensus protocol. Counterparty has its own cryptocurrency, that can be transacted between users, and spent when smart contracts are executed.
Stellar has a public blockchain with its own cryptocoin, which is governed by a consensus algorithm that relies on federated Byzantine agreements. Oppositely to ethereum, there is no specific language for scripting smart contracts, yet it is possible to collectively gather some transactions and then store them atomically in the blockchain. This can be utilized to deploy some basic forms of smart contracts.
Monax supports the execution of Ethereum’s smart contracts, without having a special cryptocurrency. Monax allows users to build private blockchains and to define specific authorization policies for accessing these blockchains.
Image source: Shutterstock