As one of the frequently discussed features of cryptocurrencies, smart-contracts are perhaps the most disruptive component of blockchain technology. First proposed in 1994 by the cryptographer Nick Szabo, smart-contracts were initially described to be functional upgrades of their paper-based predecessors and containing the protocols and terms necessary for one or more parties to execute a self-fulfilling contract.
Today, smart-contracts are essentially digital contracts that operate via blockchains and contain instructions which are executed when set conditions are met, allowing you to automate and decentralize almost any exchange of assets.
What are smart-contracts?
Like many areas of blockchain technology, smart-contracts are often misunderstood. They are used to transfer digital currencies or related assets between parties under the conditions specified in the contract code. Smart-contracts form an agreement between two or more parties, and enforce compliance via the blockchain in a decentralized manner, not requiring any third parties or legal adjudication.
Smart-contracts enable the transfer of assets between two or more parties by acting as a third party, a trust-less escrow. For example, a smart-contract that accepts payments from multiple individuals can be created, and once its balance reaches a critical threshold, the smart contract randomly selects one of these individuals to receive the full balance, essentially creating a trust-less, verifiable lottery system.
Once a smart-contract has been signed and uploaded to the blockchain, it is essentially immutable, and cannot be manipulated by those involved in the agreement. This permanence means that any issues in the underlying code cannot be altered at a later date, highlighting the importance of expertly crafted code to prevent potentially disastrous mishaps. Nowadays any code operating on a blockchain virtual machine is generally called a smart-contract, regardless whether it has contract functionality or not.
First up: Ethereum
Ethereum is the major cryptocurrency associated with smart-contract functionality, released in July 2015, Ethereum enabled the development of smart-contracts using its own custom contract-oriented programming language named Solidity.
Since then, numerous other cryptos have begun offering similar functionality, including Cardano, Waves, and Qtum. However, none of these have managed to garner the community that Ethereum has, with Ethereum remaining by far the most popular blockchain for smart-contracts. However, since Solidity is relatively recent, there are few developers proficient in its syntax, and even fewer able to call themselves experts. Furthermore, because it is so new, there are very limited resources available for the language. Whilst the Solidity documentation is extensive, it is heavily geared towards people with a programming background, but is of little to no worth to those without extensive programming knowledge in similar languages.
Because of these limitations, most smart-contracts created in Solidity are rudimentary and have often been criticized for being unnecessarily resource-intensive and expensive to run. These complaints have to lead to the development of several alternative blockchains that seek to improve on Ethereum’s smart-contract functionality.
Recently, RSK launched its Bitcoin-base smart-contract project, however, unlike Ethereum, this feature is attributed to an interoperable sidechain that connects with the Bitcoin blockchain, rather than being part of the Bitcoin core protocols. Bitcoin smart-contracts are expected to be much more limited in functionality, due to this limited access to the network.
NEO: The solution?
NEO provides compilers for these languages, allowing developers to compile their code to instructions that are understood and executed by the NEO Virtual Machine (NVM). NEOcontracts are highly scalable, deterministic and reproducible and can call one another to produce complicated networks of smart-contracts. These smart contracts are executed on the NEO Virtual Machine and may be accessed by decentralized applications as part of their functioning.
NEO was originally released in 2014 under the name AntShares (ANS), before being rebranded to NEO in 2017. The NEO team aims to spearhead the new smart economy through its easy to access smart contract technology. NEO smart-contracts are designed to solve the scalability problems seem with other smart-contract capable cryptocurrencies. It does this by the incorporation of concurrency and dynamic allocation in its protocol.
Concurrency simply means that multiple smart-contracts can be executed simultaneously, in a sequence-independent manner without affecting the outcome. This occurs as all the smart-contracts in a static call relationship are determined prior to their activation, of these, those that operate on different data can be run concurrently, whilst those modifying the same record are activated in sequence. Furthermore, the NEO Virtual Machine can dynamically allocate processors and memory to specific contracts, enabling multiple contacts to be dynamically partitioned to maximize the number that can run in parallel.
Currently, utilizing just concurrency and dynamic partitioning, the NEO blockchain can handle around 10,000 transactions-per-second (tps), as opposed to Ethereum which currently manages around 15 tps. The NEO team is currently working on implementing sharding into the core protocol, which is expected to increase the maximum tps by more than ten-fold, allowing the blockchain to keep-up with the increased demands. Sharding works by splitting the blockchain network into smaller units termed ‘shards’, these shards each run a fragment of the network in parallel, producing a system that becomes increasingly capable as more nodes are included.
These huge improvements in efficiency and parallelization paint NEO as the first major competitor to Ethereum. In the past, the Ethereum blockchain has been overloaded by the instantly popular crypto-kittens game, an addictive game where virtual kittens are bred, born and traded on the Ethereum blockchain. At its peak, the crypto-kittens game caused severe network congestion and currently makes up around 20% of all Ethereum traffic. This disruption made it blatantly apparent that scaling remains a major issue in the world of cryptocurrency, an issue that will need to be resolved if mass adoption is ever to take place.
Images via Pexels. Logo artwork via Neo.