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 computer scientist Nick Szabo in 1996.

Szabo wrote: “A smart contract is a computerized transaction protocol that executes the terms of a contract. The general objectives are to satisfy common contractual conditions (such as payment terms, liens, confidentiality, and even enforcement), minimize exceptions both malicious and accidental, and minimize the need for trusted intermediaries. Related economic goals include lowering fraud loss, arbitrations and enforcement costs, and other transaction costs.”

Most business-oriented blockchains include the ability to use smart contracts, sometimes called chain code. A smart contract is an executable software module that is developed by the blockchain owners, installed into the blockchain itself and enforced when pre-defined rules are met. When a user sends a transaction to the blockchain, it can invoke a smart contract module which performs functions defined by the creator of that module.

Smart contracts usually can read and write to a local data store which is separate from the blockchain itself and can be updated when transactions occur. The business logic contained in a smart contract creates or operates on business data that is contained in this persistent data store.

When run on the blockchain a smart contract becomes like a self-operating computer program that automatically executes when specific conditions are met. Because smart contracts run on the blockchain, they run exactly as programmed without any possibility of censorship, downtime, fraud, or third-party interference.

While all blockchains can process code, most are severely limited. Smart contracts are different. Rather than giving a set of limited operations, smart contracts allows developers to create whatever operations they want. This means developers can build new and innovative transaction management applications.

An original 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.

Advantages of a smart contract over its equivalent conventional financial instrument include minimizing counterparty risk, reducing settlement times, and increased transparency.