Digital Nations
  • DIGITAL NATIONS BOOK
    • Get Your Free Copy
  • Web3 Overview
    • What is Web3?
    • The Problem with Centralized Economies
    • The Benefits of Decentralized Economies
    • How do Decentralized Economies Work?
      • Decentralized Ledgers
        • Blockchains
        • Digital Key Cryptography
        • Consensus Mining
        • How to Read a Decentralized Ledger
      • Smart Contracts
      • NFTs
    • The Web3 Ecosystem
      • Cryptocurrencies
        • What is a Cryptocurrency?
        • What is Money?
        • The Problems with Centralized Money
        • The Benefits of Decentralized Money
        • How do Cryptocurrencies Work?
          • What are Databases?
          • How are Cryptocurrencies Distributed?
          • How are Cryptocurrencies Decentralized?
            • What are Blockchains?
            • What is Digital Key Cryptography?
            • What is Consensus Mining?
        • Key Players
          • Bitcoin
          • Ether
          • Stablecoins
          • Other
        • Problems with Cryptocurrencies
          • High Fees
          • Volatility
          • Environmental Concerns
          • Tax Cheats & Criminals
          • MEV
        • The Long-Term Potential of Cryptocurrencies
      • DeFi
        • What is DeFi?
        • The Problems with Centralized Finance
        • The Solution - Decentralized Finance
        • What's Different about DeFi?
          • Decentralized Cash (aka "Stablecoins")
          • Decentralized Exchanges
          • Decentralized Lending and Borrowing
          • Decentralized Insurance
          • Decentralized Derivatives
        • What's New in DeFi?
          • Yield Farming
          • Flash Loans
          • Money Legos
        • DeFi Infrastructure
          • Smart Contract Platforms
          • Oracles
          • Data Aggregators
          • Storage Protocols
          • Interoperability Protocols
        • The Dark Side of DeFi
          • High Fees
          • User Error
          • Usage by Criminals and Terrorists
          • Exploits, Hacks and Attacks
          • Regulation
        • Why DeFi Will Eat Wall Street
      • NFTs
        • What are NFTs?
        • Problems with Centralized Asset Ownership
        • Benefits of Decentralized Asset Ownership
        • History of NFTs
        • How do NFTs work?
          • What is a Token?
          • What makes a token “Non-Fungible”?
          • What are Smart Contract Platforms?
        • NFT Ecosystem
          • Digital Art
            • Avatars
            • Collectibles
            • Art
          • Virtual Worlds
          • Gaming
          • Social
          • Music
          • Intellectual Property
          • Other NFT Applications
        • NFT Infrastructure
          • Smart Contract Platforms
          • Rollups
          • Decentralized Storage
          • NFT Marketplaces
          • Wallets
        • NFT Financialization
          • Borrowing and Lending
          • Licensing
          • Fractionalization
        • Criticisms of NFTs
          • Weak Arguments Against NFTs
            • Easily Copied
            • Centralized
            • Tacky
          • Legitimate Criticisms of NFTs
            • High Fees
            • Fraud and Theft
            • Poor User Experience
        • Why NFTs Will Eat Hollywood (and maybe the World…)
      • DAOs
        • What is a DAO?
        • The Problem with Traditional Corporations
        • The Benefits of a DAO
        • How Does a DAO Work?
        • DAO Ecosystem
          • Protocol DAOs
          • Investment DAOs
          • Charity DAOs
          • Collector DAOs
          • Media DAOs
          • Service DAOs
          • Social DAOs
        • DAO Tooling
          • Communications
          • Fundraising
          • Governance
          • Treasury Management
          • Compensation
          • DAO Frameworks
        • Problems with DAOs
          • Lack of Legal and Regulatory Clarity
          • Operational Inefficiencies
          • Gas Prices
          • Usage by Criminals and Terrorists
          • Hacks and Scams
        • Why DAOs will Eat Corporations
      • Smart Contract Platforms
        • What are Smart Contract Platforms?
        • The History of Smart Contract Platforms
        • Why are Smart Contract Platforms Important?
        • How do Smart Contract Platforms Work?
          • Whare are Blockchains?
          • What are Smart Contracts?
          • What is Consensus Mining?
        • What are the Problems with Smart Contract Platforms?
        • How do we Solve these Problems?
          • On-Chain Solutions
          • Off-Chain Solutions
        • Who are the Key Players?
          • Ethereum
          • BSC (formerly Binance Smart Chain
          • Cardano
          • Solana
          • Avalanche
          • Polkadot
          • Polygon
          • Tron
          • NEAR
          • Cosmos
        • What’s Next? The Multi-Chain World
    • Web3 Infrastructure
      • Virtual Worlds
      • Wallets
      • Decentralized Domain Name Servers
      • Decentralized Internet Service Providers
      • Node Providers
      • Smart Contract Platforms (Layer 1s)
      • Rollups (Layer 2s)
      • Decentralized Data Storage
      • Querying Tools
      • Oracles
      • Bridges
      • Decentralized Computers
    • Challenges
      • High Fees
      • Limited Traction
      • Volatility
      • Environmental Concerns
      • Limited Interoperability
      • Miner-Extractable Value (MEV)
      • Poor User Experience
      • Usage by Criminals and Terrorists
      • Hacks and Scams
        • Malware
        • Code Exploits
        • Scams
      • Lack of Legal and Regulatory Clarity
    • Why Web3 Will Eat the World
  • Resources
    • Web3 University
      • White Belt (<1 Hour)
      • Blue Belt (1 Day)
      • Purple Belt (1 Week)
      • Brown Belt (1 Month)
      • Black Belt (1 Year)
      • Red Belt (Lifetime)
    • Books, Articles & Videos
      • Books
      • Articles and Videos
      • Canons
    • Twitter Accounts
      • Favorite Accounts
      • DeFI
      • NFTs
      • Metaverse
      • DAOs
      • Web3
      • Developers
      • Investors
      • News & Research
      • Consolidated
    • Podcasts
    • Reddit
    • News & Research Sources
    • Courses
    • Data Sources
      • Favorites
      • General Market Information
      • Industry Information
      • On-Chain Analytics
      • Block Explorers
      • Social
      • Technical
      • Tokenomics
      • Other
  • My Journey Down the Web3 Rabbithole...
Powered by GitBook
On this page
  1. Web3 Overview
  2. The Web3 Ecosystem
  3. Smart Contract Platforms

How do Smart Contract Platforms Work?

Note: Data in this section last updated August 26th, 2022

PreviousWhy are Smart Contract Platforms Important?NextWhare are Blockchains?

Last updated 2 years ago

Smart contract platforms perform three basic functions:

  • Data Storage: Store important data such as account balances on a blockchain

  • Execution: Run programs via smart contracts

  • Consensus: Provide consensus mining to secure the network and validate state

So if Alice and Bob wanted to use the Ethereum blockchain to trade U.S. dollars for Ethereum tokens, the process would look something like this:

  1. The Ethereum blockchain stores Alice and Bob’s original account balances (i.e. Alice has 2ETH and Bob has $8,000)

  2. Bob would open a trading dapp, such as Uniswap*, which would read these balances

  3. Uniswap’s smart contracts would determine the price of Ethereum, let’s say it’s $4,000, and execute the trade

  4. he results of the trade along with the updated balances would be sent to miners to verify

  5. Miners would verify this transaction using a Proof-of-Work consensus protocol

  6. Miners would then update the Ethereum blockchain with the new balances – (i.e. Alice now has 1 ETH and $4,000 and Bob now has 1 ETH and $4,000)

*This is actually a vast oversimplification of the process and also not how Uniswap actually works. That said, I believe it is helpful in getting a general idea of the flow of a smart contract platform. If you’re interested in learning more about how a decentralized exchange operates, you can check out my paper on DeFi (link).

So, at the end of the day, the network is secured by economic incentives and game theory – a miner who acts appropriately could receive hundreds of thousands of dollars in rewards, while one who attempts to cheat the system will almost certainly be left with nothing but a huge electricity bill.

In the next three sections, we'll dive deeper into how blockchains, smart contracts and consesus mining work...

👉