Smart Contract: Definition and Swiss Regulatory Treatment
Definition
A smart contract is a program stored on a blockchain that automatically executes when predetermined conditions are met. The term was coined by computer scientist Nick Szabo in 1994, but became practically significant when Ethereum introduced a Turing-complete programming environment on a blockchain in 2015.
Key characteristics:
Self-executing: Once deployed, a smart contract executes automatically when its conditions are triggered — no intermediary, legal system, or trusted third party is needed to enforce it.
Immutable: In most implementations, once a smart contract is deployed, its code cannot be changed (though some contracts include upgrade mechanisms that allow designated parties to update the code).
Transparent: Smart contract code and its state are publicly readable on the blockchain. Anyone can audit what a contract does and verify its current state.
Deterministic: The same input always produces the same output. Smart contracts behave predictably — they cannot exercise discretion.
How Smart Contracts Work
A smart contract is written in a smart contract programming language (Solidity for Ethereum; Ink! for Polkadot parachains; Plutus/Haskell for Cardano; Move for Aptos/Sui), compiled into bytecode, and deployed to a blockchain address.
When a user interacts with the smart contract — by sending a transaction to its address — the contract’s code executes on every node in the network simultaneously. All nodes must agree on the execution result (the blockchain’s consensus mechanism ensures this). The output of the execution — typically a state change, a token transfer, or a new event emission — is recorded on-chain permanently.
Example: Decentralised Exchange
A decentralised exchange (DEX) like Uniswap is a set of smart contracts. When a user wants to swap Token A for Token B:
- User sends a transaction to the Uniswap smart contract with Token A
- The contract calculates the exchange rate (based on its liquidity pool formula)
- The contract transfers Token B to the user and Token A to the liquidity pool
- The transaction is recorded on Ethereum
No intermediary has custody of the user’s tokens at any point — the swap is atomic and self-executing. This is what makes DeFi “decentralised.”
Smart Contracts in Crypto Valley
Smart contracts are the foundational technology for:
Ethereum: The Ethereum Foundation (Zug) built Ethereum as the smart contract platform. The EVM (Ethereum Virtual Machine) is the runtime for all Ethereum smart contracts.
Polkadot parachains: Polkadot parachains built with Substrate can support smart contract execution through specific pallets (modules). Ink! is Parity Technologies’ (Zug) Rust-based smart contract language for Substrate chains.
DeFi protocols: Liquity (Zug), Safe/Gnosis Safe (Zug), and dozens of other Swiss-based DeFi projects are implemented as smart contracts on Ethereum. The broader DeFi ecosystem in Switzerland includes a growing number of Zug-based protocols. Smart contracts also underpin stablecoins — a category of crypto assets with their own Swiss regulatory treatment.
DLT securities: The Swiss DLT Act’s DLT securities can be implemented as smart contracts on public or permissioned blockchains, enabling automated coupon payments, transfer restrictions, and corporate actions.
Swiss Legal Treatment
Swiss law does not have a specific “smart contract” legal category. The legal treatment of smart contracts under Swiss law depends on their function:
Contract enforceability: A smart contract implementing an agreement between parties may be enforceable as a contract under Swiss law if it meets Swiss contract formation requirements (offer, acceptance, capacity, legality). FINMA and Swiss legal scholars have generally concluded that smart contracts can be legally binding contracts.
DLT securities: Smart contracts implementing DLT securities must comply with the Swiss DLT Act’s requirements — the distributed register must meet specific technical standards for access, integrity, and participant identification.
AML: Smart contracts that act as intermediaries for financial transactions may trigger AML obligations for the parties who deployed or operate them (under FINMA’s effective decision-maker analysis).
Consumer protection: Smart contracts providing financial services to retail customers may trigger Swiss consumer protection and financial services regulation (FinSA).
The Parity Wallet Incident: Smart Contract Risk
The most consequential smart contract failure associated with Crypto Valley is the 2017 Parity Technologies wallet incident. A vulnerability in Parity’s multi-signature wallet library allowed a user to accidentally “suicide” (destroy) the library contract, permanently freezing approximately 513,774 ETH held in 500+ wallets.
The incident illustrated the risks of smart contract immutability: once a bug is deployed in an immutable contract, it cannot be patched. The only remedies are contract migration (moving assets to a new contract) or, in extreme cases, a blockchain hard fork — which the Ethereum community declined to pursue for the Parity incident.
Subsequent smart contract security practices — formal verification, multi-audit requirements, time-locked upgrades, bug bounty programs — were significantly influenced by the lessons of the Parity incident.