Smart contract

A smart contract is a program stored on a distributed ledger that carries out an action, such as moving a digital asset, once conditions written into its code are met. It is software that executes an agreed rule automatically; it is not in itself a legal contract.

Also called: smart contracts · self-executing contract

What it is

A smart contract is a computer program held on a distributed ledger that triggers an action when pre-set conditions are met. The Bank for International Settlements (BIS) describes smart contracts as self-executing applications that can trigger an action if pre-specified conditions are met. The BIS defines distributed ledger technology (DLT) as a way of saving information through a ledger that is a repeated digital copy of data available at multiple locations.

The program has three parts.

Some contracts need facts from outside the ledger. The BIS describes an oracle as a service that provides outside information for use by smart contracts in a DLT system.

The name is misleading in one respect. Code that executes a rule is not the same as a legal contract, and whether a given program has legal effect is a question of law in each jurisdiction.

Why it matters

Many steps in a financial transaction are conditional: pay on delivery, release collateral on repayment, pay a coupon on a date. Smart contracts write these conditions into the ledger so that the transfer and the condition are checked together. This is the basis of proposals to tokenise securities and to settle them on a ledger.

The BIS notes that automated contract tools are not immune to malicious or faulty code. An error in the code runs exactly as written, so testing and review of the program carry the weight that manual checks carry in a conventional process.

Worked example

Illustrative numbers. A buyer owes 1,000 units of a cash token for a bond token held by a seller.

  1. Both parties place their tokens in the contract.
  2. The contract checks two conditions: the cash token amount equals 1,000, and the bond token is the agreed one.
  3. If both hold, it swaps them in one step. Neither party can receive an asset without delivering the other.
  4. If one leg is missing at the agreed deadline, it returns the other leg to its owner.

The same logic applies to a derivative that pays 100 units if an observed rate is above an agreed level. The rate reaches the contract through an oracle, so the quality of that data feed decides whether the payment is correct.

Who uses it

Common confusions

6Roles that need it

7Skills behind it

Sources behind this page (2) · Updated 4 Nov 2026

Concept