PersonalBusiness
PersonalBusiness
Buy Crypto

Buy Bitcoin, Ethereum and 100+ more.

  • Download the MoonPay App
  • See all cryptocurrencies
Popular
  • Buy BitcoinBTC
  • Buy EthereumETH
  • Buy PolygonPOL
  • Buy SolanaSOL
  • Buy DogecoinDOGE
  • Buy CardanoADA
  • Buy AvalancheAVAX
  • Buy BNBBNB
  • Buy XRPXRP
  • Buy LitecoinLTC
  • Buy ChainlinkLINK
  • Buy Bitcoin CashBCH
Get started
  • How to buy crypto
  • Payment methods
  • Fees
  • Help Center

Sell crypto and cash out to your bank.

  • Download the MoonPay App
  • See all cryptocurrencies
Popular
  • Sell BitcoinBTC
  • Sell EthereumETH
  • Sell PolygonPOL
  • Sell SolanaSOL
  • Sell DogecoinDOGE
  • Sell CardanoADA
  • Sell AvalancheAVAX
  • Sell BNBBNB
  • Sell XRPXRP
  • Sell LitecoinLTC
  • Sell ChainlinkLINK
  • Sell Bitcoin CashBCH
Get started
  • How to sell crypto
  • Payout methods
  • Fees
  • Help Center

Convert between tokens, even across chains.

  • Download the MoonPay App
  • See all cryptocurrencies
Popular
  • Convert BitcoinBTC
  • Convert EthereumETH
  • Convert PolygonPOL
  • Convert SolanaSOL
  • Convert DogecoinDOGE
  • Convert CardanoADA
  • Convert AvalancheAVAX
  • Convert BNBBNB
  • Convert XRPXRP
  • Convert LitecoinLTC
  • Convert ChainlinkLINK
  • Convert Bitcoin CashBCH
Get started
  • How to convert crypto
  • Supported networks
  • Fees
  • Help Center

Track prices for Bitcoin, Ethereum and 100+ more.

  • Download the MoonPay App
  • All crypto prices
Popular
  • Bitcoin priceBTC
  • Ethereum priceETH
  • Polygon pricePOL
  • Solana priceSOL
  • Dogecoin priceDOGE
  • Cardano priceADA
  • Avalanche priceAVAX
  • BNB priceBNB
  • XRP priceXRP
  • Litecoin priceLTC
  • Chainlink priceLINK
  • Bitcoin Cash priceBCH
Explore
  • Learn about crypto
  • Buy crypto
  • Sell crypto
  • Help Center

MoonPay is how the world moves value.

  • Contact us
Company
  • About us
  • Careers
  • Press & Media
  • Newsroom
Resources
  • Learn
  • MoonPay Minute
  • Help Center
  • Security & Trust Center
  • MoonPay Discover
MoonPay MinuteSeed PhrasesA seed phrase is a list of 12 to 24 random words that gives a person access to their crypto wallet. When a wallet is first set up, it generates a seed phrase, also called a…

Popular

Buy BitcoinBTCBuy EthereumETHBuy PolygonPOLBuy SolanaSOLBuy DogecoinDOGEBuy CardanoADABuy AvalancheAVAXBuy BNBBNBBuy XRPXRPBuy LitecoinLTCBuy ChainlinkLINKBuy Bitcoin CashBCH

Get started

How to buy cryptoPayment methodsFeesHelp Center
Download the MoonPay AppSee all cryptocurrencies

Popular

Sell BitcoinBTCSell EthereumETHSell PolygonPOLSell SolanaSOLSell DogecoinDOGESell CardanoADASell AvalancheAVAXSell BNBBNBSell XRPXRPSell LitecoinLTCSell ChainlinkLINKSell Bitcoin CashBCH

Get started

How to sell cryptoPayout methodsFeesHelp Center
Download the MoonPay AppSee all cryptocurrencies

Popular

Convert BitcoinBTCConvert EthereumETHConvert PolygonPOLConvert SolanaSOLConvert DogecoinDOGEConvert CardanoADAConvert AvalancheAVAXConvert BNBBNBConvert XRPXRPConvert LitecoinLTCConvert ChainlinkLINKConvert Bitcoin CashBCH

Get started

How to convert cryptoSupported networksFeesHelp Center
Download the MoonPay AppSee all cryptocurrencies

Popular

Bitcoin priceBTCEthereum priceETHPolygon pricePOLSolana priceSOLDogecoin priceDOGECardano priceADAAvalanche priceAVAXBNB priceBNBXRP priceXRPLitecoin priceLTCChainlink priceLINKBitcoin Cash priceBCH

Explore

Learn about cryptoBuy cryptoSell cryptoHelp Center
Download the MoonPay AppAll crypto prices

Company

About usCareersPress & MediaNewsroom

Resources

LearnMoonPay MinuteHelp CenterSecurity & Trust CenterMoonPay Discover

MoonPay Minute

Seed Phrases
Contact us
Buy Crypto

All rights reserved. MoonPay USA LLC is a registered money service business (NMLS ID: 2071245). For Law Enforcement requests please direct your official document to our compliance team here.

  • Personal
  • Buy Crypto
  • Sell Crypto
  • Trade Crypto
  • Learn about Crypto
  • Crypto Price
  • MoonAgentsNew!
  • Business
  • Ramps
  • Virtual AccountsNew!
  • MoonPay Discover
  • MoonPay Commerce
  • MoonPay InstitutionalNew!
  • Stablecoin Transparency
  • Company
  • About Us
  • CareersWe're hiring
  • Newsroom
  • Media
  • Changelog
  • Support
  • API Docs
  • Help Center
  • Contact Us
  • Status
  • Security
  • Buy
  • Buy Bitcoin
  • Buy Ethereum
  • Buy Solana
  • Buy Cardano
  • Sell
  • Sell Bitcoin
  • Sell Ethereum
  • Sell XRP
  • Sell Solana
  • Trade
  • Trade Ethereum
  • Trade SOL
  • Trade Aave
  • Trade Chainlink
  • Crypto Prices
  • Bitcoin Price
  • Ethereum Price
  • Dogecoin Price
  • XRP Price
  • Cardano Price
  • Learn
  • What is Blockchain?
  • What are NFTs?
  • What is Bitcoin mining?
  • What is DeFi?
  • What is crypto staking?
  • Legal
  • Licenses
  • Privacy Policy
  • Cookie Policy
  • Terms of Use

All rights reserved. MoonPay USA LLC is a registered money service business (NMLS ID: 2071245). For Law Enforcement requests please direct your official document to our compliance team here.

PersonalBusiness
PersonalBusiness
Buy Crypto

Buy Bitcoin, Ethereum and 100+ more.

  • Download the MoonPay App
  • See all cryptocurrencies
Popular
  • Buy BitcoinBTC
  • Buy EthereumETH
  • Buy PolygonPOL
  • Buy SolanaSOL
  • Buy DogecoinDOGE
  • Buy CardanoADA
  • Buy AvalancheAVAX
  • Buy BNBBNB
  • Buy XRPXRP
  • Buy LitecoinLTC
  • Buy ChainlinkLINK
  • Buy Bitcoin CashBCH
Get started
  • How to buy crypto
  • Payment methods
  • Fees
  • Help Center

Sell crypto and cash out to your bank.

  • Download the MoonPay App
  • See all cryptocurrencies
Popular
  • Sell BitcoinBTC
  • Sell EthereumETH
  • Sell PolygonPOL
  • Sell SolanaSOL
  • Sell DogecoinDOGE
  • Sell CardanoADA
  • Sell AvalancheAVAX
  • Sell BNBBNB
  • Sell XRPXRP
  • Sell LitecoinLTC
  • Sell ChainlinkLINK
  • Sell Bitcoin CashBCH
Get started
  • How to sell crypto
  • Payout methods
  • Fees
  • Help Center

Convert between tokens, even across chains.

  • Download the MoonPay App
  • See all cryptocurrencies
Popular
  • Convert BitcoinBTC
  • Convert EthereumETH
  • Convert PolygonPOL
  • Convert SolanaSOL
  • Convert DogecoinDOGE
  • Convert CardanoADA
  • Convert AvalancheAVAX
  • Convert BNBBNB
  • Convert XRPXRP
  • Convert LitecoinLTC
  • Convert ChainlinkLINK
  • Convert Bitcoin CashBCH
Get started
  • How to convert crypto
  • Supported networks
  • Fees
  • Help Center

Track prices for Bitcoin, Ethereum and 100+ more.

  • Download the MoonPay App
  • All crypto prices
Popular
  • Bitcoin priceBTC
  • Ethereum priceETH
  • Polygon pricePOL
  • Solana priceSOL
  • Dogecoin priceDOGE
  • Cardano priceADA
  • Avalanche priceAVAX
  • BNB priceBNB
  • XRP priceXRP
  • Litecoin priceLTC
  • Chainlink priceLINK
  • Bitcoin Cash priceBCH
Explore
  • Learn about crypto
  • Buy crypto
  • Sell crypto
  • Help Center

MoonPay is how the world moves value.

  • Contact us
Company
  • About us
  • Careers
  • Press & Media
  • Newsroom
Resources
  • Learn
  • MoonPay Minute
  • Help Center
  • Security & Trust Center
  • MoonPay Discover
MoonPay MinuteSeed PhrasesA seed phrase is a list of 12 to 24 random words that gives a person access to their crypto wallet. When a wallet is first set up, it generates a seed phrase, also called a…

Popular

Buy BitcoinBTCBuy EthereumETHBuy PolygonPOLBuy SolanaSOLBuy DogecoinDOGEBuy CardanoADABuy AvalancheAVAXBuy BNBBNBBuy XRPXRPBuy LitecoinLTCBuy ChainlinkLINKBuy Bitcoin CashBCH

Get started

How to buy cryptoPayment methodsFeesHelp Center
Download the MoonPay AppSee all cryptocurrencies

Popular

Sell BitcoinBTCSell EthereumETHSell PolygonPOLSell SolanaSOLSell DogecoinDOGESell CardanoADASell AvalancheAVAXSell BNBBNBSell XRPXRPSell LitecoinLTCSell ChainlinkLINKSell Bitcoin CashBCH

Get started

How to sell cryptoPayout methodsFeesHelp Center
Download the MoonPay AppSee all cryptocurrencies

Popular

Convert BitcoinBTCConvert EthereumETHConvert PolygonPOLConvert SolanaSOLConvert DogecoinDOGEConvert CardanoADAConvert AvalancheAVAXConvert BNBBNBConvert XRPXRPConvert LitecoinLTCConvert ChainlinkLINKConvert Bitcoin CashBCH

Get started

How to convert cryptoSupported networksFeesHelp Center
Download the MoonPay AppSee all cryptocurrencies

Popular

Bitcoin priceBTCEthereum priceETHPolygon pricePOLSolana priceSOLDogecoin priceDOGECardano priceADAAvalanche priceAVAXBNB priceBNBXRP priceXRPLitecoin priceLTCChainlink priceLINKBitcoin Cash priceBCH

Explore

Learn about cryptoBuy cryptoSell cryptoHelp Center
Download the MoonPay AppAll crypto prices

Company

About usCareersPress & MediaNewsroom

Resources

LearnMoonPay MinuteHelp CenterSecurity & Trust CenterMoonPay Discover

MoonPay Minute

Seed Phrases
Contact us
Buy Crypto

All rights reserved. MoonPay USA LLC is a registered money service business (NMLS ID: 2071245). For Law Enforcement requests please direct your official document to our compliance team here.

  • Personal
  • Buy Crypto
  • Sell Crypto
  • Trade Crypto
  • Learn about Crypto
  • Crypto Price
  • MoonAgentsNew!
  • Business
  • Ramps
  • Virtual AccountsNew!
  • MoonPay Discover
  • MoonPay Commerce
  • MoonPay InstitutionalNew!
  • Stablecoin Transparency
  • Company
  • About Us
  • CareersWe're hiring
  • Newsroom
  • Media
  • Changelog
  • Support
  • API Docs
  • Help Center
  • Contact Us
  • Status
  • Security
  • Buy
  • Buy Bitcoin
  • Buy Ethereum
  • Buy Solana
  • Buy Cardano
  • Sell
  • Sell Bitcoin
  • Sell Ethereum
  • Sell XRP
  • Sell Solana
  • Trade
  • Trade Ethereum
  • Trade SOL
  • Trade Aave
  • Trade Chainlink
  • Crypto Prices
  • Bitcoin Price
  • Ethereum Price
  • Dogecoin Price
  • XRP Price
  • Cardano Price
  • Learn
  • What is Blockchain?
  • What are NFTs?
  • What is Bitcoin mining?
  • What is DeFi?
  • What is crypto staking?
  • Legal
  • Licenses
  • Privacy Policy
  • Cookie Policy
  • Terms of Use

All rights reserved. MoonPay USA LLC is a registered money service business (NMLS ID: 2071245). For Law Enforcement requests please direct your official document to our compliance team here.

Back to all articles

Smart contracts

Smart contracts are blockchain programs in which specific inputs trigger corresponding outputs. This makes them self-executing, meaning they allow agreements to be made between anonymous parties without the need for intermediaries.

Geoffrey Lyons

By Geoffrey Lyons

Published on Aug 2, 2024

Last modified on Feb 26, 2026

Smart contracts are blockchain programs in which specific inputs trigger corresponding outputs. This makes them self-executing, meaning they allow agreements to be made between anonymous parties without the need for intermediaries.

Smart contracts use simple “if / then” logic. For example, a smart contract could be made to process home loan applications: IF an application meets certain conditions THEN the home loan is automatically approved or denied. The entire process can be carried out without the need for anyone to process paperwork, which can be expensive and prone to human error. 

Sign up to our weekly MoonPay Minute newsletter

Think of them as vending machines

The popular vending machine analogy offers a clear understanding of smart contract mechanics. Both vending machines and smart contracts are:

Transparent

  • Smart contracts are stored on a public ledger (blockchain)
  • Vending machines are often found in public spaces (like airports and bus terminals)

Secure

  • Smart contracts are secured using public-key cryptography
  • Vending machines are secured using locking mechanisms (and payment systems that reject counterfeit money)

Pre-programmed

  • Smart contracts have rules and conditions coded in programming language
  • Vending machines also have rules and conditions coded in programming language

Self-executing

  • Smart contracts automatically deploy an output (e.g. student ID) if the correct input (student enrollment info) is supplied
  • Vending machines automatically deploy an output (e.g. soda can) if the correct input ($1.00) is supplied

Fun fact: The earliest known vending machine, which dates back to first-century Egypt, was used to dispense holy water.

Real-world applications

According to smart contract platform Hedera, a smart contract is “a straightforward concept with huge implications”.

Here are some areas where smart contracts could have a big impact: 

unnamed copy.png

Subscribe to our newsletter!

Did you like this article? Sign up to our weekly MoonPay Minute newsletter to get similar content delivered directly to your inbox.