Skip to main content
coinmind
Crypto term

What Is Smart Contract? Meaning & Example

A plain-English definition of Smart Contract: what it means, how it works, and a simple example.

Quick answer

A smart contract is a self-executing program stored on a blockchain that automatically enforces the terms of an agreement when predefined conditions are met.

A smart contract is a piece of code deployed on a blockchain that executes automatically when specific conditions are satisfied. The concept was proposed by Nick Szabo in 1994, but it became practical only after Ethereum launched in 2015 with built-in support for on-chain programs.

How smart contracts work

Think of a smart contract as a digital vending machine. You send a defined input, the code checks the conditions, and if everything matches, it delivers the output. No human needs to approve the transaction, and no one can alter the outcome once the code is deployed.

For example, a DeFi lending smart contract might work as follows: 1. A user deposits stablecoin collateral. 2. The contract verifies the collateral exceeds the required ratio. 3. It automatically lends the requested amount. 4. If the collateral value drops below the threshold, the contract automatically liquidates the position.

All of this happens on-chain, transparently, without a bank or a loan officer.

Where smart contracts are used

  • [DeFi](/glossary/defi): lending, borrowing, trading and insurance.
  • [NFTs](/glossary/nft): minting, transferring and enforcing royalties on resale.
  • [Stablecoins](/glossary/stablecoin): algorithmic stablecoins rely on smart contracts to maintain their peg.
  • DAOs: governance and treasury management.
  • Supply chain: tracking goods from manufacturer to consumer.
  • Token launches: creating and distributing new crypto tokens.

Smart contract platforms

Ethereum is the largest, but Solana, Cardano, Polygon, Avalanche and BNB Chain also support smart contracts. Each platform uses its own programming language and execution environment. Ethereum uses Solidity; Solana uses Rust.

Risks and limitations

  • Bugs are expensive: once deployed, a smart contract's code typically cannot be changed. A bug can lead to permanent loss of funds. The DAO hack of 2016 exploited a code vulnerability and drained millions of dollars.
  • Oracle dependency: smart contracts cannot access external data directly. They rely on oracles, data feeds that bring off-chain information on-chain, which introduces a point of trust.
  • [Gas fees](/glossary/gas-fees): every interaction with a smart contract costs gas, and complex contracts cost more.
  • Audit necessity: reputable projects hire independent auditors to review their contracts before deployment.

Smart contracts and India

There is no specific Indian regulation for smart contracts. The Indian Contract Act, 1872, requires valid contracts to have free consent, lawful consideration and a lawful object. Whether smart contracts satisfy these requirements in a legal dispute remains untested in Indian courts.

Smart Contract FAQs

The questions people most often ask about Smart Contract, answered for Indian readers.

Are smart contracts legally enforceable in India?

Indian law has not specifically addressed smart contracts. The Indian Contract Act of 1872 governs contracts, and whether a self-executing code on a blockchain satisfies its requirements for free consent and lawful object is an open question. No Indian court has ruled on this yet.

Can a smart contract be changed after deployment?

Standard smart contracts are immutable once deployed. However, upgradeable proxy patterns exist where the logic contract can be swapped by the deployer. This flexibility comes with a trust trade-off because the deployer retains the ability to alter the contract's behaviour.

What programming language are smart contracts written in?

On Ethereum, smart contracts are typically written in Solidity. Solana uses Rust, and other blockchains have their own languages. Learning Solidity is the most common starting point for aspiring smart contract developers given Ethereum's dominant ecosystem.

How do smart contracts relate to DeFi?

Smart contracts are the foundation of DeFi. Every lending protocol, decentralised exchange and yield farming platform runs on smart contracts that automate financial operations without intermediaries. Without smart contracts, DeFi as a concept would not exist.

What is a smart contract audit?

A smart contract audit is a professional review of the code by independent security experts before deployment. The audit checks for vulnerabilities, logic errors and potential exploits. Reputable DeFi projects publish audit reports, though an audit does not guarantee the contract is bug-free.

Related terms

Browse the full glossary

78finance & AI terms explained in plain English.

All terms
A note on accuracy: this definition is for general education, not personalised financial or tax advice. Figures are illustrative and rules can change. Confirm anything that affects a real decision.