Welcome to {Innovate}, {Crypto}, {Defi}, {Blockchain}, {Ecosystem}, {NextGen}, {Emerging}, {Future}, {Platforms}, {SmartContracts}, {Trends}, {Solutions}, {Tech}, {Scalable}, {ICOs}, {Infrastructure}, {CuttingEdge}, {CrossChain}, {TokenLaunch}, {Innovation}, {Opportunities}, {Networks}, {DeFiTrends}, {Security}, {Breakthrough}, {Tokenized}, {Sustainable}, {Partnerships}, {Leaders}, {Assets}, {Projects}
What Are Smart Contracts on the Blockchain and How Do They Work?
2024.10.21 16:20Skip to content Investing Stocks Cryptocurrency Bonds ETFs Options and Derivatives Commodities Trading Automated Investing Brokers Fundamental Analysis Markets View All Simulator Login / Portfolio Trade Research My Games Leaderboard Banking Savings Accounts Certificates of Deposit (CDs) Money Market Accounts Checking Accounts View All Personal Finance Budgeting and Saving Personal Loans Insurance Mortgages Credit and Debt Student Loans Taxes Credit Cards Financial Literacy Retirement View All Economy Government and Policy Monetary Policy Fiscal Policy Economics View All News Markets Companies Earnings CD Rates Mortgage Rates Economy Government Crypto ETFs Personal Finance View All Reviews Best Online Brokers Best Savings Rates Best CD Rates Best Life Insurance Best Personal Loans Best Mortgage Rates Best Money Market Accounts Best Auto Loan Rates Best Credit Repair Companies Best Credit Cards View All Live Please fill out this field. Please fill out this field. Investing Investing Stocks Cryptocurrency Bonds ETFs Options and Derivatives Commodities Trading Automated Investing Brokers Fundamental Analysis Markets View All Simulator Simulator Login / Portfolio Trade Research My Games Leaderboard Banking Banking Savings Accounts Certificates of Deposit (CDs) Money Market Accounts Checking Accounts View All Personal Finance Personal Finance Budgeting and Saving Personal Loans Insurance Mortgages Credit and Debt Student Loans Taxes Credit Cards Financial Literacy Retirement View All Economy Economy Government and Policy Monetary Policy Fiscal Policy Economics View All News News Markets Companies Earnings CD Rates Mortgage Rates Economy Government Crypto ETFs Personal Finance View All Reviews Reviews Best Online Brokers Best Savings Rates Best CD Rates Best Life Insurance Best Personal Loans Best Mortgage Rates Best Money Market Accounts Best Auto Loan Rates Best Credit Repair Companies Best Credit Cards View All Financial Terms Newsletter About Us Follow Us Table of Contents Expand Table of Contents What Is a Smart Contract? History of Smart Contracts Uses Pros and Cons FAQs The Bottom Line Cryptocurrency Blockchain
What Are Smart Contracts on the Blockchain and How Do They Work?
By The Investopedia Team Full BioInvestopedia contributors come from a range of backgrounds, and over 25 years there have been thousands of expert writers and editors who have contributed.
Learn about our editorial policies Updated June 12, 2024 Reviewed by Erika Rasure Reviewed by Erika Rasure Full BioErika Rasure is globally-recognized as a leading consumer economics subject matter expert, researcher, and educator. She is a financial therapist and transformational coach, with a special interest in helping women learn how to invest.
Learn about our Financial Review Board Fact checked by Suzanne Kvilhaug Fact checked by Suzanne Kvilhaug Full Bio Suzanne is a content marketer, writer, and fact-checker. She holds a Bachelor of Science in Finance degree from Bridgewater State University and helps develop content strategies for financial brands. Learn about our editorial policies Part of the Series What Is Ethereum and How Does It Work? Ethereum Basics What Is Ethereum and How Does It Work? What Is Ether (ETH), the Cryptocurrency of Ethereum Apps? Ethereum Merge How Green is Ethereum 2.0? What Ethereum 2.0 Means For Mining Coins What Are ERC-20 Tokens on the Ethereum Network? How to Invest in Ethereum How Do I Buy Ethereum? How to Short Ethereum How to Stake Ethereum Understanding Spot Ethereum ETFs: A Comprehensive Guide Ethereum's Blockchain Decentralized Applications (dApps): Definition, Uses, Pros and Cons What Are Smart Contracts on the Blockchain and How They Work CURRENT ARTICLE What Is the Ethereum Shanghai Upgrade? Difficulty Bomb: Ethereum's Increasing Difficulty in Mining Gas (Ethereum): How Gas Fees Work on the Ethereum BlockchainWhat Is a Smart Contract?
A smart contract is a self-executing program that automates the actions required in a blockchain transaction. Once completed, the transactions are trackable and irreversible. The best way to envision a smart contract is to think of a vending machine—when you insert the correct amount of money and push an item s button, the program (the smart contract) activates the machine to dispense your chosen item.
Smart contracts permit trusted transactions and agreements to be carried out among disparate, anonymous parties without the need for a central authority, legal system, or external enforcement mechanism.
While blockchain technology has come to be thought of primarily as the foundation for Bitcoin, it has evolved far beyond underpinning a virtual currency.
What You Need to Know
Smart contracts are scripts that automate the actions between two parties. Smart contracts do not contain legal language, terms, or agreements—only code that executes actions when specified conditions are met. Nick Szabo, an American computer scientist who conceptualized a virtual currency called "Bit Gold" in 1998, defined smart contracts as computerized transaction protocols that execute the terms of a contract. "Smart contract" is somewhat of a misnomer—these programs are neither smart nor a contract.Investopedia / Laura Porter
History of Smart Contracts
Smart contracts were first proposed in 1994 by Nick Szabo, an American computer scientist who conceptualized a virtual currency called "Bit Gold" in 1998, 10 years before Bitcoin was introduced. Szabo is often rumored to be the real Satoshi Nakamoto, the anonymous Bitcoin inventor, which he has denied.
Szabo defined smart contracts as computerized transaction protocols that execute the terms of a contract. He wanted to extend the functionality of electronic transaction methods, such as POS (points of sale), to the digital realm.
In his paper, Szabo also proposed the execution of a contract for synthetic assets, such as combining derivatives and bonds. Szabo wrote, "These new securities are formed by combining securities (such as bonds) and derivatives (options and futures) in a wide variety of ways. Very complex term structures for payments can now be built into standardized contracts and traded with low transaction costs, due to computerized analysis of these complex term structures."
Smart contracts do not contain the legal language or even the terms of a contract between two parties. They are scripts that contain functions, module imports, and other programming that automate the actions between two parties.
Many of Szabo s predictions in the paper came true in ways preceding blockchain technology. For example, derivatives trading is now mostly conducted through computer networks using complex term structures.
Smart Contract Uses
Because smart contracts execute agreements, they can be used for many different purposes. One of the simplest uses is ensuring transactions between two parties occur, such as the purchase and delivery of goods. For example, a manufacturer needing raw materials can set up payments using smart contracts, and the supplier can set up shipments. Then, depending on the agreement between the two businesses, the funds could be transferred automatically to the supplier upon shipment or delivery.
It s important to understand that the connections between blockchain transactions and real-world transfers are still being developed. For instance, if you use some ether to order an item from a retailer that uses an e-commerce blockchain that can communicate with Ethereum, it must still be packed up and shipped by a person. In this case, a smart contract would likely transfer your cryptocurrency to the retailer and initiate another script that notifies the shipping department of a sale.
Real estate transactions, stock and commodity trading, lending, corporate governance, supply chain, dispute resolution, and healthcare are only a few examples where smart contracts are theorized to have use.
Smart Contract Pros and Cons
The primary benefit of smart contracts is similar to the benefit of blockchain technology—they remove the need for third parties. Other benefits of this technology are:
Efficiency : They speed up contract execution Accuracy : There can be no human error introduced Immutability : The programming cannot be alteredSome of the downfalls of smart contracts are:
Permanent : They cannot be changed if there are mistakes Human factor : They rely on the programmer to ensure the code is programmed properly to execute the intended actions Loopholes : There may be loopholes in the coding, allowing for contracts to be executed in bad faithWhat Is an Example of a Smart Contract?
The simplest example of a smart contract is a transaction between a consumer and a business, where a sale is made. The smart contract could execute the customer s payment and initiate the business s shipment process.
What Is the Point of a Smart Contract?
The purpose of smart contracts is to further remove the need for a trusted third party to conduct actions between parties that do not trust each other.
What Are the Four Major Parts of a Smart Contract?
It depends on the blockchain and how it is programmed. Generally speaking, smart contracts have state variables (data), functions (what can be done), events (messages in and out), and modifiers (special rules for specific users). Some may have additional elements depending on what they are designed to do.
The Bottom Line
Smart contracts are code written into a blockchain that executes the actions two parties agree to outside the chain. By automating these actions, the need for an intermediary or trust between the parties is removed.
The comments, opinions, and analyses expressed on Investopedia are for informational purposes online. Read our warranty and liability disclaimer for more info.
Nick Szabo. " Smart Contracts ."
Compare Accounts Advertiser Disclosure × The offers that appear in this table are from partnerships from which Investopedia receives compensation. This compensation may impact how and where listings appear. Investopedia does not include all offers available in the marketplace. Provider Name Description Part of the Series What Is Ethereum and How Does It Work? Ethereum Basics What Is Ethereum and How Does It Work? What Is Ether (ETH), the Cryptocurrency of Ethereum Apps? Ethereum Merge How Green is Ethereum 2.0? What Ethereum 2.0 Means For Mining Coins What Are ERC-20 Tokens on the Ethereum Network? How to Invest in Ethereum How Do I Buy Ethereum? How to Short Ethereum How to Stake Ethereum Understanding Spot Ethereum ETFs: A Comprehensive Guide Ethereum's Blockchain Decentralized Applications (dApps): Definition, Uses, Pros and Cons What Are Smart Contracts on the Blockchain and How They Work CURRENT ARTICLE What Is the Ethereum Shanghai Upgrade? Difficulty Bomb: Ethereum's Increasing Difficulty in Mining Gas (Ethereum): How Gas Fees Work on the Ethereum Blockchain Related Terms Ripple Definition Ripple is a blockchain company that provides financial institution-level blockchain financial payment solutions that are cheaper and faster than traditional payment methods. more Polkadot (DOT): Definition, History, and How It Works Polkadot is a platform working on scalability and other technical challenges within blockchain networks. Learn more about Polkadot and what it aims to achieve. more Distributed Ledgers: Definition, How They re Used, and Potential A distributed ledger is a database that is consensually shared and synchronized across multiple sites, institutions, or geographies. more Blockchain Facts: What Is It, How It Works, and How It Can Be Used A blockchain is a digitally distributed, decentralized, public ledger that exists across a network. It is most noteworthy in its use with cryptocurrencies and NFTs. more What Is Solana (SOL) and How Does SOL Crypto Work? Solana is a blockchain platform designed to host decentralized applications. Using a proof-of-history consensus mechanism, it processes transactions quickly at a low cost. more What Is Polygon (POL)? Definition, Strengths, and Weaknesses Polygon (POL) is both a cryptocurrency and blockchain scaling platform. Polygon connects and grows Ethereum-compatible blockchain networks. more Related Articles What Are the World Bank s Blockchain-Based Bonds? EOS Tokens: Definition and Examples Is Blockchain Replacing the SIM Card? Ripple Definition Monero (XMR) Cryptocurrency: Definition, Mining, vs. Bitcoin 10 Important Cryptocurrencies Other Than Bitcoin Partner Links About Us Terms of Service Dictionary Editorial Policy Advertise News Privacy Policy Contact Us Careers EU Privacy # A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Investopedia is part of the Dotdash Meredith publishing family.We Care About Your Privacy
We and our 100 partners store and/or access information on a device, such as unique IDs in cookies to process personal data. You may accept or manage your choices by clicking below, including your right to object where legitimate interest is used, or at any time in the privacy policy page. These choices will be signaled to our partners and will not affect browsing data.We and our partners process data to provide:
Store and/or access information on a device. Use limited data to select advertising. Create profiles for personalised advertising. Use profiles to select personalised advertising. Create profiles to personalise content. Use profiles to select personalised content. Measure advertising performance. Measure content performance. Understand audiences through statistics or combinations of data from different sources. Develop and improve services. Use limited data to select content. List of Partners (vendors)
Accept All Reject All Show Purposes