Scientist Nick Szabo first used the term smart contract way back in 1994, before any cryptocurrencies had been developed. He defined it as a computerised protocol that executes the terms of a contract. Many cryptocurrencies have developed their own smart contracts, but this has often hit mixed reviews.
The blockchain technology that Bitcoin has been built on, allows the smart contracts to be built, through a secure and accountable record vehicle and an environment where they are able to be practically deployed. This means that they have to be deterministic and terminable.
Smart contracts run on multiple nodes, so in order for there to be consistency, the contract must be deterministic. The scripting engine that has been built into Bitcoin to develop the smart contracts is the predecessor of all of the blockchain based smart contact engines, thanks to it being the first cryptocurrency. However, transactions that are completed using Bitcoin smart contracts, tend to be very simple and limited.
This is not the same for Ethereum smart contracts, which have allowed their developers to expand on Bitcoin smart contracts, and design a program, whose theory and virtual machine can execute the contract code. Ethereum smart contracts provide no indeterministic system function, and the data is confined to on chain information only. There were only a limited range of transactions that were included in the smart contracts, but this was for security reasons.
Ethereum portrays orders as stacks, allowing contracts to call the code of other contracts when they are running dynamic calls; however, this has the potential to make the call route indeterministic, which will in turn cause a significant performance loss, making things very complicated for Ethereum.
Finally, we will take a look at NEO smart contracts. They feature high certainty, high performance and expandability. The data sources are deterministic through the blockchain ledger and contract storage space, which means that every NEO contract has their own storage area that can only be accessed by the contract itself. The consensus mechanism ensures the consistency of these storage areas, in situations where access to non blockchain data is needed.
When you look at contract calls, NEO smart contracts can call each other, but the relationship must be static to allow the behaviour of the call to be fully determined. Scalability is great though, and this is because of two reasons. The smart contract can only modify the state record of the contract that it belongs to; and in the same transaction block a contract can only run once. Finally, NEO can access non-blockchain data through an interoperable service layer of the virtual machine, allowing upgrades to smart contracts to be achieved by simply increasing the API of the interoperable service layers. NEO has managed to create really modern and unique smart contracts, which has led many experts to believe that NEO will quickly become a top cryptocurrency this year.