تخطَّ إلى المحتوى الرئيسي

Smart Contract

Beginner

العقد الذكي

Also known as: Self-Executing Contract

Cryptocurrencies
Last updated

Definition reviewed before publishing

Our content team writes and reviews every definition before it is published, and revisits it when the way a term is used in the markets changes. The date shows the latest change to this term.

Last updated on 9 November 2026

A smart contract is a program stored and executed on a blockchain network that automatically applies pre-programmed conditions once they are met, without an intermediary. If the condition is to send funds when a certain event occurs, the contract makes the transfer as soon as the event happens. Ethereum is the best-known platform for smart contracts.

Quick summary

• A program that executes conditions automatically on a blockchain. • Needs no intermediary once deployed. • Coding flaws can put funds at risk.

How it works

Developers write smart contracts in a programming language such as Solidity and deploy them to the network, where each one gets its own address and its code becomes public for anyone to read. After deployment, many contracts cannot be changed, so they run exactly as written. This builds trust, but it also means any coding flaw can be exploited to steal funds, as seen in well-known hacks of decentralised finance protocols. Many applications rely on smart contracts: decentralised exchanges for swapping tokens, lending protocols, token and stablecoin issuance, and non-fungible tokens. Users pay gas fees to run a contract on the network. Because a contract cannot see the outside world, it needs oracle services to bring in data such as prices. Investors therefore check security audit reports before using a contract.

Example

A lending smart contract lets a user deposit 1,500 dollars of ether as collateral and borrow 1,000 dollars of a stablecoin. The programmed condition: if the collateral falls to 1,200 dollars, the contract automatically sells it to repay the loan. If ether falls 20%, the collateral is worth 1,200 dollars, and the position is liquidated without human involvement.

Where you will see it

On blockchain explorers such as Etherscan that display contract code, in decentralised finance applications, in security audit reports, and in news about hacks.

Why it matters

It explains the foundation of decentralised finance and digital tokens and highlights the technical risks of code flaws and the inability to reverse execution.

How it is calculated

There is no formula for the contract itself, but execution cost = gas used × gas price. Collateral ratio in lending contracts = collateral value ÷ loan value × 100.

How it differs from similar terms

• Traditional legal contract: needs parties and courts to enforce it, while a smart contract executes itself automatically. • Token: created through a smart contract but not the contract itself. • Decentralised application (dApp): an interface people use, powered by smart contracts behind it.

Common mistakes

Assuming a smart contract is completely safe because it runs on a blockchain, or that it is a legally binding contract in every case. Code flaws are possible, and the legal status varies by country.

Related terms