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
ErgoScript
Smart Contracts
Intermediate
Updated 11/26/2025

What is

ErgoScript?

Ergo's smart contract language - a declarative, Scala-based language for defining spending conditions on boxes.

ErgoScript is Ergo's native smart contract language. It's a declarative, non-Turing-complete (within bounds) language based on Scala that defines the conditions under which a box can be spent. ErgoScript supports Sigma Protocols natively, enabling privacy-preserving contracts impossible on other platforms.

Key Points

  • Declarative: describes WHAT conditions, not HOW to execute
  • Based on Scala - familiar syntax for developers
  • Native Sigma Protocol support for ZK proofs
  • Bounded execution - predictable costs, no gas surprises
  • Access to box registers, context, and headers
  • Compile to efficient ErgoTree bytecode

Use Cases

1

Custom token issuance and management

2

DEX order matching logic

3

Stablecoin minting/burning rules

4

Multi-signature and time-locked wallets

5

Privacy-preserving DeFi contracts

Technical Details

ErgoScript compiles to ErgoTree, a typed abstract syntax tree evaluated by nodes. Key constructs include: `SELF` (current box), `INPUTS`/`OUTPUTS` (transaction boxes), `CONTEXT` (block info), and Sigma propositions (`proveDlog`, `proveDHTuple`). Scripts return Boolean or SigmaProp values.

Related Infographics

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.

Where Ergo Fits Among Major Chains

Where Ergo Fits Among Major Chains

Scatterplot comparing Ergo, Bitcoin, Ethereum, Monero, Cardano, Solana, CBDCs and typical VC chains across launch model, programmability, DeFi and privacy.

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.

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.

NiPoPoWs: Trustless Light Clients & Bridges on Ergo

Learn how Non-Interactive Proofs of Proof-of-Work (NiPoPoWs) enable lightweight blockchain verification, stateless clients, and trustless cross-chain bridges on Ergo.

How Ergo's Storage Rent Solves Blockchain State Bloat

Ergo's miners can charge small fees on dormant accounts, clearing dust transactions and ensuring blockchain state stays manageable.

Frequently Asked Questions

Questions about ErgoScript

Common questions about this topic

What is ErgoScript and how does it work?

ErgoScript is Ergo's smart contract language - a Scala-based, functional language that compiles to ErgoTree for on-chain execution. Unlike Solidity, ErgoScript is not Turing-complete by design, ensuring predictable execution costs and easier formal verification. It's powerful enough for complex DeFi yet safe enough to audit.

Explainer
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 can I do with Ergo?

Ergo supports a full ecosystem: trade on Spectrum DEX, use SigmaUSD stablecoin, mix transactions with ErgoMixer, collect NFTs on SkyHarbor, mine with GPUs, lend/borrow on DuckPools, bridge to other chains via Rosen, and build dApps with ErgoScript. It's a complete platform for decentralized finance and applications.

Explainer
Getting Started

How private is Ergo blockchain?

Ergo is not private by default like Monero, but offers powerful optional privacy tools. ErgoMixer provides non-interactive, non-custodial mixing. Sigma Protocols enable zero-knowledge proofs in smart contracts. Stealth addresses hide recipients. The key difference: Ergo's privacy is programmable - you choose when and how much to reveal.

Explainer
Privacy
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 PoolsBoxesSigmaUSDNative TokensMEV Resistance

Master Ergo Terminology

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

Follow for daily updates