Ethereum Smart Contracts Explained

A smart contract is a program stored at an address on the Ethereum blockchain. It runs automatically when a transaction calls it. Nobody can stop it, reverse it, or argue with it once it executes, including the people who wrote it. That property makes smart contracts useful. It also makes their mistakes permanent.

Key takeaways

  • Ethereum smart contracts execute deterministically. Every node runs the same code and reaches the same result.
  • Ethereum mainnet gas averaged around 0.5 gwei through April 2026, per ethereum.org. A basic transfer costs under one cent.
  • Immunefi recorded 207 crypto attacks in H1 2026, a record high, alongside roughly $972 million in losses, the lowest in years.
  • Most crypto casinos accepting ETH run no smart contracts at all. The deposit is on-chain. The game is not.

What a smart contract actually is

A smart contract is code stored at an Ethereum address that holds a balance, stores data, and runs its functions when called.

Why neither word in the name is accurate

Nick Szabo coined the term in 1994, more than a decade before any blockchain existed.

It is not a contract in the legal sense. No court enforces it. No signature binds anyone to it. It enforces itself by running.

It is not smart. It has no judgment and no discretion. It cannot interpret intent, refuse an unfair result, or recognise that something has gone wrong.

Both properties are deliberate. A smart contract removes the need to trust a counterparty, because neither side can change the outcome once the transaction lands. The same rigidity means a flaw in the code executes as faithfully as a feature.

What Ethereum added in 2015

Ethereum launched in July 2015 as the first platform where smart contracts became practically deployable.

Solidity became the standard language for writing them. Once deployed, contract code cannot be altered unless the developer built an upgrade mechanism in beforehand.

A contract without that mechanism is permanent. Any bug inside it is permanent too.

How a smart contract executes

How A Smart Contract Executes

Thousands of Ethereum nodes run the same contract code independently and compare results.

The Ethereum Virtual Machine

The Ethereum Virtual Machine (EVM) is the runtime environment that executes contract code across the network.

Every node runs the same instructions on the same inputs. Every node reaches the same output. That redundancy is what makes the result tamper-resistant, because altering it would require altering the majority of the network at once.

The EVM is also why other blockchains advertise EVM compatibility. Contracts written for Ethereum run on those chains with little or no modification.

Gas and what it costs in 2026

Every EVM operation consumes gas, a unit of computational work priced in gwei. One gwei is one billionth of an ETH.

MeasureValueDateSource
Standard gas price0.077 gweiAugust 7, 2026Etherscan gas tracker
Standard gas price0.089 gweiAugust 12, 2026Etherscan gas tracker
Daily average gas price~0.5 gweiApril 2026ethereum.org
Basic ETH transferUnder $0.01May 2026ethereum.org
Rollup share of transactions~95%May 2026ethereum.org

Two changes moved costs to these levels. EIP-1559, activated in August 2021, replaced the old bidding auction with an algorithmic base fee that gets burned. EIP-4844, shipped with the Dencun upgrade in March 2024, created blob space, a separate data area where Layer 2 networks post their transaction data cheaply.

Activity followed the cheaper path. Rollups now carry roughly 95% of Ethereum transactions, which leaves mainnet running well below its block capacity most days.

Gas has a second purpose beyond payment. It caps how long a contract can run, which prevents an infinite loop from stalling the network.

Where smart contracts fail

Code flaws cause most incidents. Stolen keys and compromised infrastructure cause most of the money lost.

The DAO hack and why it still matters

In June 2016, an attacker drained roughly 3.6 million ETH from The DAO, worth $50 million to $60 million at the time.

The flaw was reentrancy. The contract sent funds before updating its own balance record, so the attacker could call the withdrawal function repeatedly against a balance that never decreased.

Ethereum hard-forked to reverse the theft. Not everyone agreed, and the chain split into Ethereum and Ethereum Classic.

That decision answered a question the technology could not. Code is final until enough of the community decides otherwise.

What the 2026 incident data shows

Attack volume hit a record in the first half of 2026 while losses fell to their lowest level in years.

MetricValuePeriodSource
Recorded incidents207 (record high)H1 2026Immunefi
Total losses~$972 millionH1 2026Immunefi
Incidents that were contract exploits125 of 207H1 2026Immunefi, TRM Labs
Share of value lost to operational security failure74%H1 2026Blockaid
DeFi exploit losses against 2022 peakDown 74% from $2.62 billion2022 to 2025Immunefi
Median loss per exploit$6M down to $1.5M2022 to 2025Immunefi
Share of total value locked lost to code bugs0.66%2025Immunefi

The split between those two rows matters. Contract bugs produced most of the incidents. Compromised devices, stolen private keys, exposed admin credentials, and off-chain infrastructure produced most of the stolen value.

Immunefi calculated that code-level bugs cost 0.66% of total value locked in 2025, once operational security outliers are stripped out. That was the strongest year on record for contract security.

What an audit does and does not cover

Audits reduce risk without removing it. Several protocols exploited in 2026 had been audited.

The OWASP Smart Contract Security Project ranks access control first in its 2026 Top 10, ahead of business logic errors. Proxy and upgradeability flaws enter the list for the first time. Insecure randomness and denial of service both dropped off.

That reordering reflects a shift in where failures happen. The 2026 list draws on 122 deduplicated incidents from 2025, covering roughly $905.4 million in losses.

Access control and upgrade governance are not coding mistakes in the usual sense. They are decisions about who holds the keys and who can change the contract later. An audit that verifies the code can still miss those.

What changed with Fusaka and Glamsterdam

Fusaka activated on Ethereum mainnet on December 3, 2025.

Its headline feature, PeerDAS, lets validators verify blob data by sampling small chunks instead of downloading everything. EIP-7935 coordinated client teams to raise the default block gas limit above 45 million toward roughly 60 million. EIP-7825 capped any single transaction at 16,777,216 gas, so no one transaction can consume a whole block.

Glamsterdam is the next major upgrade. It reached its final devnet stage in June 2026 and targets the second half of 2026 with no confirmed mainnet date.

Two changes headline it. Enshrined proposer-builder separation, EIP-7732, moves block building into the protocol itself. Block-Level Access Lists, EIP-7928, let nodes execute non-conflicting transactions in parallel.

Ethereum Foundation engineers have called Glamsterdam the largest protocol change since the Merge. Neither upgrade alters how an individual smart contract behaves. Both alter how fast and how cheaply the network runs them.

Does any of this affect a player?

Three of these facts matter to someone depositing ETH at a crypto casino. The rest do not.

Most crypto casinos do not use smart contracts

Nearly all major crypto casinos are custodial offshore operators.

A player sends ETH to a deposit address. The operator credits an internal balance. The games then run on the operator’s own servers, in a database the player cannot see.

The blockchain records the deposit and the withdrawal. It records nothing about what happened between them.

That distinction gets blurred in operator marketing. A site can accept ETH, describe itself as a blockchain casino, and have no smart contract involvement in gameplay at all.

Provably fair is cryptography, not a contract

Provably fair systems use hashed seeds to let a player verify that a result was not altered after the bet was placed.

That check is cryptography. It does not require a smart contract, and at almost every major operator it runs off-chain. Clovr’s guide to provably fair casinos covers what the verification proves and what it leaves untested.

Deposits are final

An ETH transaction to an operator’s address cannot be reversed, disputed, or charged back.

That holds whether or not a smart contract is involved. It also holds whether or not the operator is honest. Finality is the feature and the risk in the same sentence.

Nothing here is investment advice. Clovr does not recommend holding cryptocurrency as an investment, and any casino balance should be treated as money a player can afford to lose.

The bottom line

Ethereum Bottomline

A smart contract is a program that runs on thousands of machines at once and produces an identical answer on all of them. That is genuinely valuable wherever a trusted middleman is expensive or unavailable. It is also unforgiving, because the code cannot recognise its own errors and cannot be talked out of them. Anyone using an Ethereum application is trusting a development team’s code review and key management, not the Ethereum protocol itself.

Frequently Asked Questions

  • What is an Ethereum smart contract?

    A program stored at an address on the Ethereum blockchain that runs automatically when a transaction calls it. It holds a balance and executes identically on every node in the network.

  • Are smart contracts legally binding?

    No. A smart contract enforces itself through execution rather than through law. Some jurisdictions accept blockchain records as evidence, which is a separate matter from treating the code as a contract.

  • How much does an Ethereum transaction cost in 2026?

    Very little on mainnet. Etherscan showed standard gas at 0.089 gwei on August 12, 2026, and ethereum.org put a basic ETH transfer under one cent at April 2026 gas levels.

  • Can a smart contract be changed after deployment?

    Only if the developer built an upgrade mechanism into it beforehand. A contract deployed without one is permanent, bugs included.

  • Are smart contracts safe?

    They carry real risk, though the trend has improved. Immunefi recorded a record 207 attacks in H1 2026 but roughly $972 million in losses, and calculated that code-level bugs cost 0.66% of total value locked in 2025.

  • Do crypto casinos use smart contracts?

    Most do not. Nearly all major crypto casinos are custodial operators that accept on-chain deposits and run their games on private servers.

Related reading:

Think You’ve Got a Gambling Problem?
Call or text the National Council on Problem Gambling helpline: 1-800-522-4700 (24/7, confidential).

Last updated: August 2026 | Clovr.com

Stay Updated with the Latest Clovr News

© Copyright 2026 Clovr.com