midnight-concepts

SKILL.md

Midnight Concepts

Comprehensive guide to Midnight Network's foundational concepts, privacy technology, and architecture.

What is Midnight?

Midnight is a zero-knowledge partner chain to Cardano that enables privacy-preserving blockchain applications. It solves the fundamental tension between transparency and privacy in blockchain technology through advanced zero-knowledge cryptography.

Key Innovation: Selective disclosure - applications can choose exactly what information to make public and what to keep private, while maintaining verifiability.

Core Concepts

Kachina Protocol

THE foundational smart contract architecture. See kachina-protocol.md for:

  • Public state (on-chain) + Private state (local) model
  • Zero-knowledge proof bridge between states
  • Transcript-based concurrency mechanism
  • Universally Composable (UC) security framework
  • How contracts update both states simultaneously
  • Practical examples (private voting)
  • Integration with Compact language

Ledger Models: UTXO vs Account

Midnight's unique hybrid architecture. See ledger-models.md for:

  • UTXO model (Bitcoin-style) vs Account model (Ethereum-style)
  • Ledger Tokens (UTXO-based) vs Contract Tokens (Account-based)
  • When to use each model (decision matrix)
  • Performance and privacy implications
  • Hybrid patterns combining both
  • Migration guides from Ethereum and Bitcoin

Zero-Knowledge Proofs

Mathematical techniques that prove computations were performed correctly without revealing the underlying data. See zk-proofs.md for detailed explanation.

Privacy Mechanisms

  • Zswap Protocol: Privacy-preserving token system hiding transaction amounts, identities, and token types
  • Selective Disclosure: Applications control what data is public vs private
  • State Channels (Hydra): Off-chain transactions for privacy and scalability

See privacy-mechanisms.md for complete details.

Architecture

  • Partner Chain: Connects to Cardano, inheriting its security model
  • Compact Language: Purpose-built for zero-knowledge smart contracts
  • Developed by IOG: Research-first approach with peer-reviewed cryptography

See architecture.md for technical details.

Use Cases

Midnight enables entirely new categories of blockchain applications:

  • Private DeFi: Confidential trading and financial operations
  • Confidential Voting: Transparent counting with secret ballots
  • Privacy-Preserving Identity: Prove credentials without revealing unnecessary data
  • Supply Chain Privacy: Track goods while keeping business relationships confidential

See use-cases.md for detailed examples.

When to Use Midnight

Use Midnight when building applications that require:

  • Private transactions with public verifiability
  • Confidential business logic on-chain
  • Selective disclosure of sensitive information
  • Compliance with privacy regulations while maintaining transparency

Reference Materials

Interactive Learning

Use scripts/concept-explainer.py to explore concepts interactively with examples.

Resources

Weekly Installs
3
GitHub Stars
1
First Seen
Feb 22, 2026
Installed on
opencode3
gemini-cli3
github-copilot3
codex3
amp3
kimi-cli3