---
title: "What is a Smart Contract?"
description: "A smart contract is a program on a blockchain that runs when someone sends it a transaction. See how it works and how to read one on Etherscan."
url: https://info.etherscan.com/what-is-a-smart-contract/
tags: ["General"]
published: 2026-11-25
updated: 2026-11-25
---

# What is a Smart Contract?

A smart contract is a program stored on a blockchain that runs automatically when someone sends it a transaction. It holds its own code and data at a public address, and it follows the same rules for everyone who uses it, without a company or middleman approving each step.

![WETH contract page on Etherscan](https://info.etherscan.com/what-is-a-smart-contract/images/2026/11/image-2.png)

Example: [Wrapped Ether contract on Etherscan](https://etherscan.io/address/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2#code)

For example, the Wrapped Ether (WETH) contract on Ethereum takes in ETH and gives back the same amount of WETH, and takes WETH back in exchange for ETH. Nobody at a desk processes these swaps. The contract's code does it, every time, for anyone who calls it.

## How Does a Smart Contract Work?

A developer writes the contract in a programming language such as Solidity or Vyper and compiles it into bytecode that the Ethereum Virtual Machine (EVM) can run. The developer then deploys it with a special transaction, and the contract gets its own address, much like a wallet address.

> Learn more in [What is an Ethereum Address?](https://info.etherscan.com/what-is-an-ethereum-address/)

From then on, anyone can use the contract by calling its functions:

-   Reading a contract, for example checking a token balance, is free and doesn't need a wallet.
-   Writing to a contract, for example sending a token or swapping one asset for another, is a transaction. You sign it in your wallet and pay a gas fee, and the result is recorded on the blockchain for anyone to see.

Every node on the network runs the same code with the same inputs, so every node gets the same result. That's why nobody has to trust a single operator to report the outcome honestly.

## What are Smart Contracts Used For?

Most of what people do on Ethereum goes through a smart contract:

-   Tokens. Every ERC-20 token, such as [USDC](https://etherscan.io/token/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48), is a smart contract that tracks who holds how much.
-   NFTs. [ERC-721](https://etherscan.io/token/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85) and [ERC-1155](https://etherscan.io/token/0x495f947276749ce646f68ac8c248420045cb7b5e) contracts record who owns each item.
-   Trading. Decentralized [exchanges](https://etherscan.io/address/0x000000000004444c5dc75cB358380D2e3dE08A90) swap tokens from a shared pool without an order desk.
-   Lending and borrowing. Lending [protocols](https://etherscan.io/address/0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2) hold deposits and release loans against collateral.
-   Shared wallets. [Multisig](https://etherscan.io/address/0x9fC3dc011b461664c835F2527fffb1169b3C213e) contracts need several people to approve before funds move.
-   Voting. [DAOs](https://etherscan.io/address/0x323A76393544d5ecca80cd6ef2A560C6a395b7E3) count votes and carry out the result.
-   Bridges. [Bridges](https://etherscan.io/txCrossChain) lock assets on one chain so they can be used on another.

## How Do I Look at a Smart Contract on Etherscan?

Paste the contract address into the Etherscan search bar. A contract page shows the same overview as a wallet address, plus a Contract tab.

#### Check That the Source Code is Verified

![WETH Contract tab showing Source Code Verified](https://info.etherscan.com/what-is-a-smart-contract/images/2026/11/image-4.png)

A green checkmark and "Source Code Verified" on the Contract tab mean the developer published the code and Etherscan confirmed it compiles to the bytecode deployed at that address. You can read the exact code that runs. If a contract isn't verified, you only see bytecode, which is very hard to read. Learn more in [Navigating the Contract Code Tab](https://info.etherscan.com/navigating-the-contract-code-tab/).

#### Read Contract

The Read Contract tab lists the contract's read functions. Enter an address in `balanceOf` on the [WETH contract](https://etherscan.io/address/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2#readContract) and you get that address's WETH balance straight from the contract. No wallet or account needed.

#### Write Contract

The Write Contract tab lets you call functions that change something, such as `deposit` or `withdraw` on WETH. You connect your wallet, and your wallet asks you to approve and sign the transaction. See [Connecting Your Wallet on Etherscan](https://info.etherscan.com/connecting-your-wallet-on-etherscan/).

#### Transactions and Events

The Transactions tab lists every call made to the contract. The Events tab shows the logs the contract records when something happens, such as a token transfer. See [What are Event Logs?](https://info.etherscan.com/what-is-event-logs/)

## Can a Smart Contract Be Changed?

The code at a contract's address can't be edited after it's deployed. But many contracts are built so they can be upgraded. These use a proxy. Users interact with one fixed address, and that address forwards each call to a separate implementation contract, which the owner can swap for a new one.

> Read more in [Proxy Contracts](https://info.etherscan.com/what-is-proxy-contract/)

USDC works this way. On [its Etherscan page](https://etherscan.io/address/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48#code), the Contract tab shows "Read as Proxy" and "Write as Proxy", the current implementation address, and a list of past implementations.

![Contract tab showing it's a proxy and the implementation address](https://info.etherscan.com/what-is-a-smart-contract/images/2026/11/image-5.png)

Some contracts also give an owner or admin special powers, such as pausing transfers or creating new tokens. These functions appear in the verified source code and on the Write Contract tab.

## Can Smart Contracts Be Trusted?

A contract does exactly what its code says, which isn't always what its name or website says. Before you interact with one, check:

-   Is the source code verified? Unverified code can't be read, so you can't see what it does.
-   Is it the official address? Anyone can deploy a contract with a familiar name. Compare the address with the one the project publishes on its official website or channels.
-   Can it be upgraded, and by whom? A proxy contract can change its behavior later.
-   Does an owner have special powers? Look for functions such as pause, mint, or blacklist.
-   What permissions have you already given it? Token approvals let a contract move your tokens. Review and revoke the ones you no longer need with the [Token Approval Checker](https://etherscan.io/tokenapprovalchecker).

If you use an AI agent such as Claude or Codex, you can also ask it to review the contract with the [Etherscan Contract Review skill](https://docs.etherscan.io/build-with-ai/skills/etherscan-contract-review). Give it the contract address and chain, and it explains what the contract does, what its owner or admin can change, and where it moves assets, with a reference to the source code behind each point. It's a starting point for your own checks, not a security audit.

![Codex reviewing the USDT contract with the Etherscan Contract Review skill](https://info.etherscan.com/what-is-a-smart-contract/images/2026/11/image-7.png)

Example: Codex returning a developer overview of USDT contract

Verified code shows what a contract does. It doesn't mean the contract is safe or audited, so be cautious with any contract you don't recognize.

## Can I Create My Own Smart Contract?

Yes. Developers write contracts in Solidity or Vyper, test them on a testnet such as Sepolia, and then deploy them to Ethereum Mainnet. After deploying, verify the source code on Etherscan so others can read it. See [Verifying Contracts](https://info.etherscan.com/how-to-verify-contracts/).

If you're new to developing on Ethereum and unsure where to start, or if you want to learn how to deploy and interact with smart contracts, check out ethereum.org's [step-by-step guide](https://ethereum.org/developers/tutorials/deploying-your-first-smart-contract/). Once your contract is on a live network, you can verify it and interact with it from the Read Contract and Write Contract tabs on Etherscan.

## Do Other Blockchains Have Smart Contracts?

Yes. Every EVM chain, such as BNB Smart Chain, Base, Arbitrum, and Polygon, runs smart contracts the same way Ethereum does, and you can read them the same way on [BscScan](https://bscscan.com/), [BaseScan](https://basescan.org/), [Arbiscan](https://arbiscan.io/), and [PolygonScan](https://polygonscan.com/). On Solana, smart contracts are called programs, and you can look them up on [Solscan](https://solscan.io/). Learn more in [What is a Blockchain Explorer?](https://info.etherscan.com/what-is-a-block-explorer/)
