summary: A smart contract is a computer protocol intended to facilitate, verify, or enforce the negotiation or performance of a contract
content: A smart contract is a computer protocol intended to facilitate, verify, or enforce the negotiation or performance of a contract. Smart contracts were first proposed by Nick Szabo in 1996. Proponents of smart contracts claim that many kinds of contractual clauses may be made partially or fully self-executing, self-enforcing, or both. The aim of smart contracts is to provide security that is superior to traditional contract law and to reduce other transaction costs associated with contracting. Smart contracts have been used primarily in association with cryptocurrencies. The real-world smart contract that gained mainstream coverage was The DAO, a decentralized autonomous organization for venture capital funding, running on Ethereum, which was launched with US$250 million in crowdfunding in May 2016 and was hacked and drained of 3,689,577 ETH three weeks later. History The phrase "smart contracts" was coined by Nick Szabo in 1996, and reworked over several years. Szabo's first publication, "Smart Contracts: Building Blocks for Digital Free Markets" was published in Extropy 16, and then later reworked as "Formalizing and Securing Relationships on Public Networks." These documents described how it would be possible to establish contract law and related business practices through the design of electronic commerce protocols, between strangers on the Internet. In 1996 Szabo described smart contracts as follows: New institutions, and new ways to formalize the relationships that make up these institutions, are now made possible by the digital revolution. I call these new contracts "smart", because they are far more functional than their inanimate paper-based ancestors. No use of artificial intelligence is implied. A smart contract is a set of promises, specified in digital form, including protocols within which the parties perform on these promises. Szabo, inspired by researchers like David Chaum, also had a broader expectation that specification through clear logic, and verification or enforcement through cryptographic protocols and other digital security mechanisms might constitute a sharp improvement over traditional contract law, even for some traditional kinds of contractual clauses (such as automobile security interests that provide for repossession) that could be brought under the dominion of computer protocols. With the present implementations, based on blockchains, "smart contract" is mostly used more specifically in the sense of general purpose computation that takes place on a blockchain or distributed ledger. In this interpretation, used for example by the Ethereum Foundation or IBM, a smart contract is not necessarily related to the classical concept of a contract but can be any kind of computer program. Implementations Byzantine fault tolerant algorithms allowed digital security through decentralization to form smart contracts. Additionally, the programming languages with various degrees of Turing-completeness as a built-in feature of some blockchains make the creation of custom sophisticated logic possible. Notable examples of the implementation of smart contracts are: Decentralized cryptocurrency protocols are smart contracts with decentralized security, encryption, and limited trusted parties that fit Szabo's definition of a digital agreement with observability, verifiability, privity, and enforceability. Bitcoin also provides a Turing-incomplete Script language that allows the creation of custom smart contracts on top of Bitcoin like multisignature accounts, payment channels, escrows, time locks, atomic cross-chain trading,oracles, or multi-party lottery with no operator. Ethereum implements a nearly Turing-complete language on its blockchain, a prominent smart contract framework. Rootstock (RSK) is a smart contract platform that is connected to the Bitcoin blockchain through sidechain technology. RSK is compatible with smart contracts created for Ethereum. Namecoin is a replicated domain name registry. Ripple (Codius), development halted in 2015 Automated Transactions is another Turing complete smart contract language, used in cryptocurrencies like Burstcoin and Qora. An example of its usage is atomic cross-chain trading. EOS.IO is a high-performance smart contract platform Security issues A smart contract is "a computerized transaction protocol that executes the terms of a contract." A blockchain-based smart contract is visible to all users of said blockchain. However, this leads to a situation where bugs, including security holes, are visible to all yet may not be quickly fixed. Such an attack, difficult to fix quickly, was successfully executed on The DAO in June 2016, draining US$50 million in Ether while developers attempted to come to a solution that would gain consensus. The DAO program had a time delay in place before the hacker could remove the funds; a hard fork of the Ethereum software was done to claw back the funds from the attacker before the time limit expired. Issues in Ethereum smart contracts, in particular, include ambiguities and easy-but-insecure constructs in its contract language Solidity, compiler bugs, Ethereum Virtual Machine bugs, attacks on the blockchain network, the immutability of bugs, and that there is no central source documenting known vulnerabilities, attacks and problematic constructs. Replicated titles and contract execution Szabo proposes that smart contract infrastructure can be implemented by replicated asset registries and contract execution using cryptographic hash chains and Byzantine fault-tolerant replication. Askemos implemented this approach in 2002 using Scheme (later adding SQLite ) as a contract script language. One proposal for using bitcoin for replicated asset registration and contract execution is called "colored coins". Replicated titles for potentially arbitrary forms of property, along with replicated contract execution, are implemented in different projects. Hypothesized advantages of a smart contract over its equivalent conventional financial instrument include minimizing counterparty risk, reducing settlement times, and increasing transparency. As of 2015, UBS was experimenting with "smart bonds" that use the bitcoin blockchain in which payment streams could hypothetically be fully automated, creating a self-paying instrument.