How Do Ethereum Smart Contracts Work?
von Satoshi Nakamoto
Like many ideas in the blockchain industry, a general confusion shrouds so called 'smart contracts'.
A new technology made possible by public blockchains, smart contracts are difficult to understand because the term partly confuses the core interaction described.
While a standard contract outlines the terms of a relationship (usually one enforceable by law), a smart contract enforces a relationship with cryptographic code.
Put differently, smart contracts are programs that execute exactly as they are set up to by their creators.
First conceived in 1993, the idea was originally described by computer scientist and cryptographer Nick Szabo as a kind of digital vending machine. In his famous example, he described how users could input data or value, and receive a finite item from a machine, in this case a real-world snack or a soft drink.
In a simple example, ethereum users can send 10 ether to a friend on a certain date using a smart contract (See our guide "What is Ether?").
In this case, the user would create a contract, and push the data to that contract so that it could execute the desired command.
Ethereum is a platform that's built specifically for creating smart contracts.
But these new tools aren't intended to be used in isolation. It is believed that they can also form the building blocks for 'decentralized applications' (See: "What is a Dapp?") and even whole decentralized autonomous companies (See: "What is a DAO?')
How smart contracts work
It's worth noting that bitcoin was the first to support basic smart contracts in the sense that the network can transfer value from one person to another. The network of nodes will only validate transactions if certain conditions are met.
But, bitcoin is limited to the currency use case.
By contrast, ethereum replaces bitcoin's more restrictive language (a scripting language of a hundred or so scripts) and replaces it with a language that allows developers to write their own programs.
Ethereum allows developers to program their own smart contracts, or 'autonomous agents', as the ethereum white paper calls them. The language is 'Turing-complete', meaning it supports a broader set of computational instructions.
Smart contracts can:
Function as 'multi-signature' accounts, so that funds are spent only when a required percentage of people agree
Manage agreements between users, say, if one buys insurance from the other
Provide utility to other contracts (similar to how a software library works)
Store information about an application, such as domain registration information or membership records.
Strength in numbers
Extrapolating that last point, smart contracts are likely to need assistance from other smart contracts.
When someone places a simple bet on the temperature on a hot summer day, it might trigger a sequence of contracts under the hood.
One contract would use outside data to determine the weather, and another contract could settle the bet based on the information it received from the first contract when the conditions are met.
Running each contract requires ether transaction fees, which depend on the amount of computational power required.
As explained in our guide "How Ethereum Works", ethereum runs smart contract code when a user or another contract sends it a message with enough transaction fees.
The Ethereum Virtual Machine then executes smart contracts in 'bytecode', or a series of ones and zeroes that can be read and interpreted by the network.
Authored by Alyssa Hertig; images by Maria Kuznetsov; Coindesk
NEXT: HOW WILL ETHEREUM SCALE?
INDEX: A BEGINNERS GUIDE TO BITCOIN AND BLOCKCHAIN TECHNOLOGY
What is Bitcoin?
It’s a decentralized digital currency
Why Use Bitcoin?
It’s fast, cheap to use, and secure
How Can I Buy Bitcoin?
From an exchange or an individual
How to Buy Bitcoin in the UK
Buying bitcoin in the UK
How to Store Your Bitcoin
Use a digital or paper wallet
What Can You Buy with Bitcoin?
Spend your bitcoins
How to Sell Bitcoin
A guide on how to sell your bitcoins
How to Accept Bitcoin Payments for Your Store
Learn about bitcoin POS systems
How do Bitcoin Transactions Work?
Bitcoin addresses and private keys
Is Bitcoin Legal?
The current regulation around bitcoin
Who is Satoshi Nakamoto?
The founder of bitcoin
How Bitcoin Mining Works
By confirming transactions
How to Set Up a Bitcoin Miner
Generate bitcoins yourself
What are Bitcoin Mining Pools?
What are pools how and how to join them?
How Does Cloud Mining Bitcoin Work?
Alternative bitcoin mining solutions
How to Calculate Mining Profitability
Can you make a ROI?
How to Make a Paper Bitcoin Wallet
Creating an unhackable bitcoin wallet
Can Bitcoin Scale?
A look at the debate and the tech
What is SegWit?
A new way of storing transaction data
What is the Lightning Network?
Off-chain transaction channels
What is Bitcoin Cash?
Same blockchain, different characteristics.
Hard Fork vs Soft Fork
Why and how do blockchains split?
What is the Difference Between Litecoin and Bitcoin?
It’s the silver to bitcoin’s gold
How to Buy Litecoin
How to buy the bitcoin alternative litecoin
How to Mine Litecoin and other Altcoins
How to generate your own altcoins
Understanding Bitcoin Price Charts
A primer on bitcoin price charts
Bitcoin E-Commerce Services for Merchants
How to accept bitcoin at your business
What is Blockchain Technology?
A system of distributed data and logic
How Does Blockchain Technology Work?
Cryptographic keys, distributed networks and network servicing protocols
What Can a Blockchain Do?
Identity, recordkeeping, smart contracts and more
What is a Distributed Ledger?
A dynamic, independently maintained database
What is the Difference Between Public and Permissioned Blockchains?
Can anyone read or write to the ledger?
What is the Difference Between a Blockchain and a Database?
It begins with architectural and administrative decisions
What Are the Applications and Use Cases of Blockchains?
Tokenization, auditing, governance, settlement and more
How Could Blockchain Technology Change Finance?
Cross-border payments, new asset classes, regulatory compliance and more
What are Blockchain’s Issues and Limitations?
Complexity, size, costs, speed, security, politics and more
Why Use a Blockchain?
To manage and secure digital relationships as part of a system of record
What is Ethereum?
A blockchain application platform and ‘world computer’
What is Ether?
The ‘fuel’ of the ethereum network
How to Use Ethereum
Wallets, trading and ‘dapps’
Who Created Ethereum?
Vitalik Buterin
How Ethereum Mining Works
‘Proof of Work’ and ‘Proof of Stake’
How to Mine Ethereum
GPUs, mining software and pools
How Ethereum Works
‘Turing-complete’ programming, ‘state’ and the ‘EVM’
What is a Decentralized Application?
A distributed ‘smart contract’ system
What is a DAO?
A ‘decentralized autonomous organization’
How Do Ethereum Smart Contracts Work?
Code, transaction fees and ‘gas’
How Will Ethereum Scale?‘Sharding’ and ‘off-chain’ transactions
What is an ICO?Initial Coin Offerings refer to the distribution of digital tokens
Read the full article
A new technology made possible by public blockchains, smart contracts are difficult to understand because the term partly confuses the core interaction described.
While a standard contract outlines the terms of a relationship (usually one enforceable by law), a smart contract enforces a relationship with cryptographic code.
Put differently, smart contracts are programs that execute exactly as they are set up to by their creators.
First conceived in 1993, the idea was originally described by computer scientist and cryptographer Nick Szabo as a kind of digital vending machine. In his famous example, he described how users could input data or value, and receive a finite item from a machine, in this case a real-world snack or a soft drink.
In a simple example, ethereum users can send 10 ether to a friend on a certain date using a smart contract (See our guide "What is Ether?").
In this case, the user would create a contract, and push the data to that contract so that it could execute the desired command.
Ethereum is a platform that's built specifically for creating smart contracts.
But these new tools aren't intended to be used in isolation. It is believed that they can also form the building blocks for 'decentralized applications' (See: "What is a Dapp?") and even whole decentralized autonomous companies (See: "What is a DAO?')
How smart contracts work
It's worth noting that bitcoin was the first to support basic smart contracts in the sense that the network can transfer value from one person to another. The network of nodes will only validate transactions if certain conditions are met.
But, bitcoin is limited to the currency use case.
By contrast, ethereum replaces bitcoin's more restrictive language (a scripting language of a hundred or so scripts) and replaces it with a language that allows developers to write their own programs.
Ethereum allows developers to program their own smart contracts, or 'autonomous agents', as the ethereum white paper calls them. The language is 'Turing-complete', meaning it supports a broader set of computational instructions.
Smart contracts can:
Function as 'multi-signature' accounts, so that funds are spent only when a required percentage of people agree
Manage agreements between users, say, if one buys insurance from the other
Provide utility to other contracts (similar to how a software library works)
Store information about an application, such as domain registration information or membership records.
Strength in numbers
Extrapolating that last point, smart contracts are likely to need assistance from other smart contracts.
When someone places a simple bet on the temperature on a hot summer day, it might trigger a sequence of contracts under the hood.
One contract would use outside data to determine the weather, and another contract could settle the bet based on the information it received from the first contract when the conditions are met.
Running each contract requires ether transaction fees, which depend on the amount of computational power required.
As explained in our guide "How Ethereum Works", ethereum runs smart contract code when a user or another contract sends it a message with enough transaction fees.
The Ethereum Virtual Machine then executes smart contracts in 'bytecode', or a series of ones and zeroes that can be read and interpreted by the network.
Authored by Alyssa Hertig; images by Maria Kuznetsov; Coindesk
NEXT: HOW WILL ETHEREUM SCALE?
INDEX: A BEGINNERS GUIDE TO BITCOIN AND BLOCKCHAIN TECHNOLOGY
What is Bitcoin?
It’s a decentralized digital currency
Why Use Bitcoin?
It’s fast, cheap to use, and secure
How Can I Buy Bitcoin?
From an exchange or an individual
How to Buy Bitcoin in the UK
Buying bitcoin in the UK
How to Store Your Bitcoin
Use a digital or paper wallet
What Can You Buy with Bitcoin?
Spend your bitcoins
How to Sell Bitcoin
A guide on how to sell your bitcoins
How to Accept Bitcoin Payments for Your Store
Learn about bitcoin POS systems
How do Bitcoin Transactions Work?
Bitcoin addresses and private keys
Is Bitcoin Legal?
The current regulation around bitcoin
Who is Satoshi Nakamoto?
The founder of bitcoin
How Bitcoin Mining Works
By confirming transactions
How to Set Up a Bitcoin Miner
Generate bitcoins yourself
What are Bitcoin Mining Pools?
What are pools how and how to join them?
How Does Cloud Mining Bitcoin Work?
Alternative bitcoin mining solutions
How to Calculate Mining Profitability
Can you make a ROI?
How to Make a Paper Bitcoin Wallet
Creating an unhackable bitcoin wallet
Can Bitcoin Scale?
A look at the debate and the tech
What is SegWit?
A new way of storing transaction data
What is the Lightning Network?
Off-chain transaction channels
What is Bitcoin Cash?
Same blockchain, different characteristics.
Hard Fork vs Soft Fork
Why and how do blockchains split?
What is the Difference Between Litecoin and Bitcoin?
It’s the silver to bitcoin’s gold
How to Buy Litecoin
How to buy the bitcoin alternative litecoin
How to Mine Litecoin and other Altcoins
How to generate your own altcoins
Understanding Bitcoin Price Charts
A primer on bitcoin price charts
Bitcoin E-Commerce Services for Merchants
How to accept bitcoin at your business
What is Blockchain Technology?
A system of distributed data and logic
How Does Blockchain Technology Work?
Cryptographic keys, distributed networks and network servicing protocols
What Can a Blockchain Do?
Identity, recordkeeping, smart contracts and more
What is a Distributed Ledger?
A dynamic, independently maintained database
What is the Difference Between Public and Permissioned Blockchains?
Can anyone read or write to the ledger?
What is the Difference Between a Blockchain and a Database?
It begins with architectural and administrative decisions
What Are the Applications and Use Cases of Blockchains?
Tokenization, auditing, governance, settlement and more
How Could Blockchain Technology Change Finance?
Cross-border payments, new asset classes, regulatory compliance and more
What are Blockchain’s Issues and Limitations?
Complexity, size, costs, speed, security, politics and more
Why Use a Blockchain?
To manage and secure digital relationships as part of a system of record
What is Ethereum?
A blockchain application platform and ‘world computer’
What is Ether?
The ‘fuel’ of the ethereum network
How to Use Ethereum
Wallets, trading and ‘dapps’
Who Created Ethereum?
Vitalik Buterin
How Ethereum Mining Works
‘Proof of Work’ and ‘Proof of Stake’
How to Mine Ethereum
GPUs, mining software and pools
How Ethereum Works
‘Turing-complete’ programming, ‘state’ and the ‘EVM’
What is a Decentralized Application?
A distributed ‘smart contract’ system
What is a DAO?
A ‘decentralized autonomous organization’
How Do Ethereum Smart Contracts Work?
Code, transaction fees and ‘gas’
How Will Ethereum Scale?‘Sharding’ and ‘off-chain’ transactions
What is an ICO?Initial Coin Offerings refer to the distribution of digital tokens
Read the full article
Satoshi Nakamoto
Keine Verbindung
Verbindung wird wiederhergestellt
Etwas ist schiefgelaufen
Wir sind gleich wieder da