Definition

Smart Contract is a program stored on a blockchain that automatically executes when predetermined conditions are met. The term was coined by cryptographer Nick Szabo in 1994.

How It Works

Simple example — a vending machine:

  1. You insert money (condition)
  2. Select an item (action)
  3. Machine dispenses the item (result)

A smart contract works similarly, but on blockchain:

  • Condition: if payment is received
  • Action: execute code
  • Result: transfer tokens

Smart Contract Example

IF 1 ETH is sent to contract address
AND current date >= unlock date
THEN transfer 1 ETH to recipient address

Advantages

Traditional Contract Smart Contract
Requires intermediaries Automatic
Can be modified Immutable
Slow execution Instant
Subjective interpretation Precise code

Smart Contract Applications

  1. DeFi — lending, trading, staking
  2. NFTs — creating and selling digital art
  3. Tokens — issuing cryptocurrencies (ERC-20)
  4. DAOs — decentralized governance
  5. Insurance — automatic payouts

Risks

  • Code bugs — errors can lead to fund loss
  • Immutability — hard to fix after deployment
  • Complexity — requires security audits

Tip

Smart contracts enable staking, DeFi, and other services running on Ethereum.