How do smart contracts work?

A smart contract is a program stored on a blockchain that executes an agreement automatically when set conditions are met. Users call it with a transaction; every node runs the same code and records the result. On Ethereum, deployed code cannot be changed and its transactions cannot be reversed. The German term is Smart Contract.

Smart contracts in brief

TermSmart contract. German: Smart Contract, also intelligenter Vertrag.
OriginNick Szabo coined the term and described the concept in 1994 (ethereum.org).
EU lawArticle 2(39) of Regulation (EU) 2023/2854 (Data Act) defines the smart contract; Article 36 sets requirements for smart contracts that execute data sharing agreements.
Date of applicationThe Data Act applies from September 12, 2025 (Article 50).
A numberAn Ethereum smart contract can be at most 24 KB in size (ethereum.org).

How do smart contracts work compared with traditional contracts?

Smart contracts work by putting the performance of a contract into code, so no party has to trust the other to pay. With traditional contracts, a person or institution has to carry out the outcome: a bank releases escrow money, a court settles a dispute. The ethereum.org introduction calls "the need for trusted individuals to follow through with the contract's outcomes" one of the biggest problems with a traditional contract.

Its metaphor is a vending machine, as described by Nick Szabo: with the right inputs, a certain output is guaranteed. A smart contract for an escrow account can hold funds and release them only after a set date. Before that date the contract does not execute. The difference between smart contracts and traditional contracts is who enforces the terms: people and courts, or code.

How do smart contracts work on Ethereum?

On Ethereum a smart contract is an account with its own address, code and balance. The documentation defines it as "a collection of code (its functions) and data (its state) that resides at a specific address on the Ethereum blockchain". No user controls it. It executes the deployed code and nothing else.

  1. A developer writes the contract in a language such as Solidity or Vyper and compiles it.
  2. The developer deploys it in a transaction and pays gas, the fee for computation.
  3. A user sends a transaction that calls one of its functions.
  4. Every node runs the function and updates the state of the contract in the same way.

Every node computes the same result, and the blockchain stores it. Anyone can write and deploy a smart contract.

What are smart contracts used for?

Smart contracts are used for financial services, tokens and wallets. ESMA calls them "the backbone of decentralised finance". It analyzed contracts on the Ethereum blockchain and found five categories: financial, operational, tokens, wallet and infrastructure (ESMA, October 11, 2023).

Examples of smart contracts in DeFi are stablecoins, governance tokens and decentralized exchanges. A decentralized exchange is an example of the financial category, where users trade tokens with each other without an intermediary. The article on decentralized finance explains these applications.

Are smart contracts immutable, and what is smart contract risk?

Smart contracts on Ethereum are immutable by default: they "cannot be deleted by default, and interactions with them are irreversible". Smart contract risk is the risk that the code contains an error or that someone misuses it, because a faulty contract executes exactly as written.

Smart contracts also have a limit by design: they "can't retrieve data from offchain sources". A price or an interest rate reaches them through a blockchain oracle, which adds its own risk.

The Data Act answers part of this risk for data sharing. Article 36 requires the contract to resist errors and unauthorized access, offer a way to terminate or interrupt it, archive transaction data and code, and stay consistent with the terms of the agreement. The vendor must perform a conformity assessment and issue an EU declaration of conformity.

Smart contracts in Germany, Austria and Switzerland

In Germany and Austria the Data Act applies directly since September 12, 2025. It defines a smart contract as "a computer program used for the automated execution of an agreement or part thereof" (Article 2(39)). Its Article 36 covers only smart contracts that execute data sharing agreements. Whether a smart contract is legally binding as a contract depends on national contract law. Banks and crypto-asset service providers that use smart contracts stay under the rules for their service, supervised by BaFin in Germany and the FMA in Austria.

In Frankfurt, the Deutsche Bundesbank runs the Trigger Solution, which links DLT platforms with the TARGET payment system so that DLT transactions settle in central bank money. From September 23 to 27, 2024, DZ BANK used it for the automated post-trade processing of a Smart Derivative Contract (Deutsche Bundesbank, November 29, 2024).

Switzerland is outside the EU, so the Data Act does not apply there. Article 973d of the Swiss Code of Obligations defines a ledger-based security as a right that is registered in a securities ledger and "may be exercised and transferred to others only via this securities ledger". FINMA supervises. This page gives no legal advice.

About Finance Loop: smart contracts

Finance Loop is the meeting place for people at banks, market infrastructures and law firms who turn contract terms into code that settles trades. In Frankfurt, the Deutsche Bundesbank runs the Trigger Solution, which DZ BANK used from September 23 to 27, 2024, for the automated post-trade processing of a Smart Derivative Contract.

Since March 2026 Finance Loop has a strategic cooperation with 21X, which BaFin licensed under the EU DLT Pilot Regime. 21X matches and settles trades in tokenized securities through smart contracts, with e-money tokens on the cash side.

Let's stay in touch

4,000+ members in finance and tech. Become a Network Member for free.

Get updates for free!

Exclusive event invitations, member perks and news from the network. Unsubscribe at any time.

By submitting you agree to the terms.