Skip to main content

Smart Contract

Advanced

A smart contract is a computer program stored on a blockchain that automatically carries out the terms of an agreement when specified conditions are met.

Smart contracts work on an if-then basis. For example, if a payment is received, then a digital asset is transferred. Because they run on a blockchain, they are visible to participants and very difficult to alter once deployed, and they execute without needing a trusted intermediary.

The idea was described by computer scientist Nick Szabo in the 1990s and became practical with the launch of the Ethereum blockchain in 2015, which was designed to run such programs.

For example, an insurance smart contract could automatically pay farmers if official weather data show rainfall below a set level, without anyone having to file a claim.

Smart contracts underpin decentralized finance, non-fungible tokens and many other blockchain applications. Despite their name, they are not necessarily legal contracts. They are only as reliable as their code; errors or vulnerabilities can be exploited, and once deployed, faulty contracts can be hard to fix. They also depend on accurate external data, provided by services called oracles.

For worked examples and full lessons, visit notesbysara.org.

Back to dictionary