Smart contracts are a new technology that is part of public blockchains, and they are a concept that may be difficult for some users to understand.
A typical contract outlines the terms of a relationship among people, however, a smart contract enforces a relationship among cryptographic codes.
The origins of smart contracts are from 1993, from computer scientist and cryptographer Nick Szabo. At that time, Szabo described the concept similar to how users could input data or a value, and receive an item from a vending machine. As applied to ethereum, users can send 10 ether to a friend on a certain date using a smart contract, by creating a contract and pushing the data to that contract so that it can execute a command.
The Ethereum platform is built specifically for creating smart contracts, and those contracts are meant to be the building blocks for decentralized applications and companies.
How smart contracts work
Bitcoin was the first channel to implement smart contracts as a way to transfer value from one person to another, with its network of nodes only validating transactions under certain conditions.
Ethereum, in contrast to Bitcoin which is limited to currencies, replaces bitcoin’s somewhat restrictive language — a language of about one hundred scripts — and replaces it with a language that allows developers to write their own programs for smart contracts.
These smart contracts are considered ‘autonomous agents,’ and ‘turing-complete,’ meaning that they support a broad set of computational instructions.
Features of smart contracts
- ‘Multi-signature’ accounts, so funds are spent only when a required percentage of people agree
- Manage agreements among users
- Act as a library for other contracts
- Store information about an application, such as domain registration information or membership records
Strength in numbers
Smart contracts need other smart contracts to be fully-functional, because running each contract requires ether transaction fees, which depend on the amount of computational power required. Ethereum runs smart contract code when a user or another contract sends it a message with sufficient transaction fees. The Ethereum virtual machine then initiates smart contracts in ‘bytecode,’ or a series of ones and zeroes which are then read and interpreted by the network.