---
title: "What is Smart contract? Meaning and example | TradeLiga"
description: "A program on a blockchain that runs by itself when its conditions are met. Its code is usually public, so anyone can read it, including attackers looking…"
url: https://tradeliga.com/en/glossary/smart-contract
language: en
dateModified: 2026-11-27
---

[Stocks, funds & commodities](https://tradeliga.com/en/glossary?c=stocks)

# What is Smart contract?

A program on a [blockchain](https://tradeliga.com/en/glossary/blockchain) that runs by itself when its conditions are met. Its code is usually public, so anyone can read it, including attackers looking for a fault.

[Learn it in 60 seconds](https://tradeliga.com/en/learn/w:smart-contract)
[From your path **Lesson 4.6.4 · Decentralised Finance (DeFi)**](https://tradeliga.com/en/learn/defi)

## Think of it like

A vending machine. Put in the right coins, press a button, and it hands you a drink. No shop assistant is needed.

## Real example

A lending smart contract allows a loan of at most 80% of a deposit. Lock US$1,500 of ether, and it lends at most 1,500 × 0.80 = US$1,200, with no one to ask.

## Key takeaway

- DeFi puts code in place of a company you'd trust.
- Code can't steal your coins, but one fault lets others take them, with no undo.

Lesson 4.6.4 · [Decentralised Finance (DeFi): An Introduction](https://tradeliga.com/en/learn/defi)

## Frequently asked questions

**What does smart contract mean?**

A program on a blockchain that runs by itself when its conditions are met. Its code is usually public, so anyone can read it, including attackers looking for a fault.

**What is an example of smart contract?**

A lending smart contract allows a loan of at most 80% of a deposit. Lock US$1,500 of ether, and it lends at most 1,500 × 0.80 = US$1,200, with no one to ask.

## Related words

- [**Decentralised finance (DeFi)** Finance run by blockchain code](https://tradeliga.com/en/glossary/decentralised-finance-defi)
- [**Liquidity pool** Coins in a smart contract for trading](https://tradeliga.com/en/glossary/liquidity-pool)
- [**Algorithmic stablecoin** A stablecoin held by code, not reserves](https://tradeliga.com/en/glossary/algorithmic-stablecoin)
- [**Peg** The price a stablecoin is meant to hold](https://tradeliga.com/en/glossary/peg)
- [**Stablecoin** A crypto coin built to keep a steady value](https://tradeliga.com/en/glossary/stablecoin)
- [**Proof of stake** Validators lock a deposit to add blocks](https://tradeliga.com/en/glossary/proof-of-stake)
- [**Proof of work** Computers race a puzzle to add a block](https://tradeliga.com/en/glossary/proof-of-work)
- [**Hash** A short code that locks in past blocks](https://tradeliga.com/en/glossary/hash)

[All 477 words in the glossary](https://tradeliga.com/en/glossary)

---

Source: <https://tradeliga.com/en/glossary/smart-contract>

TradeLiga is a free trading-education game: pretend money only, no financial advice.
