Skip to content
highrisk.news
RUJoin

Смарт-контракт

Smart Contract

A smart contract is a program stored on a blockchain that automatically executes its built-in conditions once they are met.

A smart contract is code deployed to a blockchain. It stores its logic and state and, when it receives a transaction, executes predefined rules without an intermediary. The idea was described by Nick Szabo back in the 1990s, but it became widespread on the Ethereum platform.

## How it works

A user sends a transaction to the contract address. Every node in the network runs the same function and checks the result. Computation is paid for with a fee (gas fee). If the condition is met, the contract transfers funds, changes data, or calls another contract. If not, the transaction is reverted.

## Where it is used

Smart contracts underpin ERC-20 tokens, NFTs, decentralized exchanges (DEXs), liquidity pools, staking, and DeFi lending protocols. In crypto gaming and gambling projects, they are used to accept bets, make payouts, and verify the fairness of outcomes.

## What it affects

The key property is immutability: once deployed, the code usually cannot be changed. A logic error becomes permanent, which is why auditing and testing are critical. Contracts cannot see the outside world on their own: prices, event results, and other data require oracles, which themselves become a point of trust.

## Common mistakes and risks

Typical problems include reentrancy vulnerabilities, as in the well-known 2016 hack of The DAO, arithmetic and access-control errors, and hidden administrator functions that allow funds to be withdrawn (rug pull). Public code does not guarantee safety: you need to read it yourself or rely on a reputable audit. Do not confuse verifying source code in a block explorer with an audit.

FAQ

Is a smart contract a legal agreement?

No, it is program code. The legal force of an agreement depends on legislation and on whether the contract's terms are tied to external obligations. The code executes logic; it does not interpret the parties' intentions.

Can a transaction with a smart contract be cancelled?

Usually not: once confirmed on the blockchain, a transaction is irreversible. Some contracts include built-in pause or cancellation functions, but this depends on how they are implemented.

How can you tell whether a smart contract is safe?

Check for an independent audit, the source code, administrator rights, and the presence of timelocks. A missing audit or a closed function that allows funds to be withdrawn is a reason for caution.

Related terms

Industry news and PSP alerts in Telegram