Skip to main content
ERGO
  • Docs
  • Blog
Get Wallet
PLATFORM
TechnologyUse CasesEcosystemCompare BlockchainsInfographicsWallets
LEARN
Start HereDocumentationGlossaryFAQPlaybooksDev Patterns
COMMUNITY
BlogDiscordTelegramTwitterGitHubGrants

© 2025 ERGO PLATFORM. ALL RIGHTS RESERVED.

ERGO IS AN OPEN-SOURCE PROJECT. CONTRIBUTE ON GITHUB

Home
Learn
Glossary
Smart Contracts
Smart Contracts
Smart Contracts
Beginner

What is

Smart Contracts?

Self-executing programs stored on blockchain that automatically enforce agreement terms when conditions are met.

Smart contracts are programmable agreements that execute automatically when predefined conditions are satisfied. On Ergo, smart contracts are written in ErgoScript and stored in eUTXO boxes. Unlike Ethereum's Turing-complete contracts, ErgoScript is deliberately limited to ensure predictable execution, lower gas costs, and easier formal verification.

Key Points

  • Self-executing when conditions are met
  • Stored on-chain, immutable once deployed
  • ErgoScript ensures predictable gas costs
  • No reentrancy attacks possible on eUTXO
  • Supports multi-stage protocols
  • Can interact with Sigma protocols for privacy

Use Cases

1

Decentralized exchanges (DEXs)

2

Lending and borrowing protocols

3

Token issuance and management

4

Multi-signature wallets

5

Time-locked payments

6

Oracle-based derivatives

Technical Details

ErgoScript compiles to ErgoTree, a typed language that evaluates to true/false. Contracts guard boxes and define spending conditions. The eUTXO model means contracts see only their inputs/outputs, not global state, eliminating many attack vectors.

Related Infographics

MEV-Resistance vs the 'Dark Forest'

MEV-Resistance vs the 'Dark Forest'

How global DeFi 'dark forest' mempools compare to Ergo's MEV-aware eUTXO local ordering for front-running, value capture, UX and mitigation.

Smart-Contract L1 Tree

Smart-Contract L1 Tree

How Bitcoin, Ethereum, Cardano and Ergo differ in smart-contract state models, determinism, audit complexity, expressiveness and hidden global state risk.

Ergo vs Privacy Coins

Ergo vs Privacy Coins

How Ergo, Monero, Zcash and L2 mixers differ in privacy models, programmability, selective disclosure, auditability and fair-launch tokenomics.

eUTXO vs Accounts vs Classic UTXO

eUTXO vs Accounts vs Classic UTXO

How classic UTXO, global accounts and Ergo's eUTXO differ in parallelism, logic transparency, smart-contract design and fee predictability.

Related Articles

ErgoScript Tutorial: Smart Contracts on Ergo Blockchain

ErgoScript is the Ergo blockchain's functional smart contract language, purpose-built for the eUTXO model. Learn how it works and what makes Ergo smart contracts secure and predictable.

Babel Fees: Pay Ergo Transaction Fees in Any Token

Ergo's Babel Fees turn gas payments into an on-chain market, letting users pay transaction fees in almost any token while miners still receive ERG.

Ergo Oracle Pools: A Trust-Minimised Oracle Model Explained

Learn how Ergo's decentralized oracle pools minimize trust assumptions through on-chain aggregation, permissionless participation, and transparent data storage in eUTXOs.

Two Blockchain Models: Why Ergo Chose Differently

Deterministic execution, explicit state transitions, and auditable privacy patterns — how Ergo's eUTXO model differs from Ethereum's account model for secure, scalable DeFi.

Frequently Asked Questions

Questions about Smart Contracts

Common questions about this topic

How to build DeFi on Ergo?

Building DeFi on Ergo starts with understanding the eUTXO model and ErgoScript. Unlike account-based chains, Ergo's box model provides deterministic execution, no MEV by design, and predictable gas costs. Use Oracle Pools for price feeds, and leverage existing patterns from Spectrum Finance and SigmaUSD.

How-to
DeFi

How is Ergo different from Bitcoin?

Ergo extends Bitcoin's model with smart contracts. Both use PoW and UTXO, but Ergo adds: eUTXO for programmable boxes, ErgoScript for smart contracts, Sigma Protocols for privacy, storage rent for sustainability, and NiPoPoWs for light clients. Think of Ergo as 'Bitcoin with smart contracts done right.'

Comparison
Technology

Is Ergo a good investment?

This is not financial advice. Ergo has strong fundamentals: fair launch (no VC dump risk), innovative technology (eUTXO, Sigma Protocols, NiPoPoWs), active development, and a cypherpunk ethos. It's a smaller market cap project with higher risk/reward than established chains. Research thoroughly, understand the technology, and never invest more than you can afford to lose.

Comparison
Getting Started

What is Rosen Bridge?

Rosen Bridge is Ergo's cross-chain bridge protocol for trustless asset transfers between blockchains. It connects Ergo with Cardano, Bitcoin (Runes), and Dogecoin. Unlike centralized bridges, Rosen uses a decentralized watcher network and multi-sig security. Bring assets to Ergo's DeFi ecosystem or move ERG to other chains.

Explainer
DeFi
View all questions

Related Topics

DeFi on Ergo

Decentralized Finance Without MEV, Without Permission

Explore topic

Ergo Technology

Research-Driven Innovation for Real-World Use

Explore topic

Explore More Terms

eUTXOOracle PoolsErgoScriptBoxesSigmaUSDNative Tokens

Master Ergo Terminology

Get more educational content and deep dives into Ergo technology delivered to your inbox.

Follow for daily updates