A blockchain is a distributed computing architecture where every node runs in a peer-to-peer topology, where each node executes and records the same transactions. These transactions are grouped into blocks. Each block contains a one-way hash value. Each new block is verified independently by peer nodes and added to the chain when a consensus is reached. These blocks are linked to their predecessor blocks by the unique hash values, forming a chain. In this way, the blockchain’s distributed dataset (a.k.a. distributed ledger) is kept in consensus across all nodes in the network. Individual user interactions (transactions) with the ledger are append-only, immutable, and secured by strong cryptography. Nodes in the network, in particular the public network, that maintain and verify the transactions (a.k.a. mining) are incentivized by mathematically enforced economic incentives coded into the protocol. All mining nodes will eventually have the same dataset throughout.
The Bitcoin Blockchain is a game changer, because it is public and permissionless. Anyone in the world can download the open source code, and can start verifying transaction, being rewarded with bitcoin, through a concept called mining. All stakeholders in the bitcoin network, who do not know and trust each other, are coordinated through an economical incentive framework pre-defined in the protocol and auto enforced by machine consensus of the P2P Network. The smart contract in the blockchain protocol therefore provides an coordination framework for all network participants, without the use of traditional legal contracts. In private and permissioned blockchain, all network participants validating transactions are known. Bilateral or multilateral legal agreements provide a framework for trust, not the code.
Blockchain-based smart contracts are proposed contracts that could be partially or fully executed or enforced without human interaction. One of the main objectives of a smart contract is automated escrow. An IMF staff discussion reported that smart contracts based on blockchain technology might reduce moral hazards and optimize the use of contracts in general. But "no viable smart contract systems have yet emerged." Due to the lack of widespread use their legal status is unclear.