Smart contract
A smart contract is a program stored on a blockchain that runs exactly as written when its conditions are met, without a middleman. It can hold funds and move them automatically according to its code, enabling applications such as tokens, exchanges, and lending. Because the code is public and its execution is enforced by the network, outcomes are predictable but also unforgiving.
A common misconception is that smart contracts are legal contracts or that they are bug-proof; flaws in the code can be exploited and are hard to reverse. See what a smart contract is.