What's a smart contract?

Ethereum is designed to be a 'Turing complete' state machine (a so-called general-purpose computer) that's also decentralized. Seen thus, we can think of smart contracts on Ethereum as the software that runs on the shared computer which, by the way, is known as the Ethereum Virtual Machine (EVM).

Developers write smart contracts in a programming language called Solidity, then deploy them to the shared computer. When you deploy a smart contract to the "computer" (the Ethereum network), what you're actually doing is registering a special address on the network. Anyone can interact with a deployed smart contract by sending ETH to the contract address. This triggers the code in the contract to be executed according to its logic. The code is executed automatically along the 'if this, then that' model just like any other programming language.

For example, a simple smart contract could be written such that when you send 1 ETH to it, your 1 ETH is divided up into 12 equal pieces, each of which is sent to a specified address at one-month intervals. This would effectively create something similar to a trust fund.

For use cases that exist entirely in the digital world, smart contracts allow people to bypass intermediaries altogether. For instance, in our above "trust fund" example, we've effectively eliminated the need for lawyers and managed escrow accounts. Instead, we simply send ETH to the contract and rest assured that it will be sent to the trust fund recipient exactly as the contract states and without any need for further input.

Read more: What are ERC-20 tokens?

Was this helpful?

Related guides

Start from here →
What is Ethereum?

Understand Ethereum's key characteristics.

Read this article →
What is ETH used for?

Understand the function and utility of ETH.

Read this article →
Who created Ethereum?

Understand the origin and early history of the Ethereum protocol.

Read this article →
How was ETH initially distributed?

Learn about the 2014 crowdsale, the initial distribution of ether (ETH), and why it's important.

Read this article →
What are ERC-20 tokens?

Learn the basics of the Ethereum token standard, what ERC-20 tokens are used for, and how they work.

Read this article →
What's a DApp?

Understand the basics of decentralized applications on Ethereum; their features and their current limitations.

Read this article →
What is DeFi?

Learn what makes decentralized finance (DeFi) apps work and how they compare to traditional financial products.

Read this article →
What is Ethereum's monetary policy?

Learn about the issuance rate of ETH and how it's governed.

Read this article →
What is ETH gas and how do fees work in Ethereum?

Transactions in Ethereum are measured by computational effort, and that effort is delineated in 'gas.' One unit of gas is equivalent to 0.000000001 ETH.

Read this article →
What is EIP 1559?

Understand how EIP 1559 overhauls the fee market in Ethereum and what it means for ETH's circulating supply.

Read this article →
How does governance work in Ethereum?

Why governance is needed, Ethereum governance in practice, the concept of credible neutrality, and more.

Read this article →
What is Ethereum 2.0?

Learn about Ethereum's attempt to solve the blockchain trilemma with a move to Proof of Stake, sharding, and more.

Read this article →
How to buy ETH

Learn how to buy ETH and hold it securely in a digital wallet you control.

Read this article →
How to create an Ethereum wallet

Creating an Ethereum wallet is as easy as installing software on your mobile device or laptop/desktop.

Read this article →
Start from here →
Start investing safely with the Bitcoin.com Wallet
Over wallets created so far

Everything you need to buy, sell, trade, and invest your Bitcoin and cryptocurrency securely

Bitcoin.com in your inbox

A weekly rundown of the news that matter, plus educational resources and updates on products & services that support economic freedom