# Midnight Network Documentation > Midnight is a zero-knowledge partner chain to Cardano that revolutionizes blockchain privacy. Developed by Input Output Global (IOG), the research company behind Cardano, Midnight enables developers to build applications that can selectively hide sensitive information while still allowing public verification of correctness. Unlike traditional blockchains where all transaction data is publicly visible, this is achieved through advanced zero-knowledge cryptography that proves computations were performed correctly without revealing the underlying data. ## What is Midnight? Midnight solves a fundamental problem in blockchain technology: the tension between transparency and privacy. Traditional blockchains make all data public, which prevents many real-world use cases like private voting, confidential business transactions, or personal data management. Midnight changes this by allowing smart contracts to operate on private data while still maintaining the security and verifiability that makes blockchains valuable. The network operates as a "partner chain" to Cardano, meaning it inherits Cardano's proven security model while adding specialized privacy capabilities. This architecture allows developers to choose the right level of privacy for each piece of data in their applications. ## How Privacy Works on Midnight Midnight uses zero-knowledge proofs (ZK proofs) to enable private computation. Here's how it works: 1. **Private Inputs**: Users can submit encrypted or hidden data to smart contracts 2. **Public Verification**: The network can verify that computations were performed correctly without seeing the private data 3. **Selective Disclosure**: Applications can choose exactly what information to make public and what to keep private 4. **Cryptographic Guarantees**: Mathematical proofs ensure that private computations follow the same rules as public ones ## Key Technologies Explained **Compact Programming Language**: A specialized programming language designed specifically for writing privacy-preserving smart contracts. Unlike general-purpose languages, Compact is built from the ground up to work with zero-knowledge proofs, making it easier to write secure, private applications. **Zswap Protocol**: Midnight's privacy-preserving token system that hides transaction amounts, sender and receiver identities, and token types. Unlike Bitcoin where all transaction amounts are public, Zswap transactions appear as cryptographic commitments that prove validity without revealing details. **Zero-Knowledge Proofs**: Mathematical techniques that allow one party to prove they know certain information without revealing that information. In Midnight's context, this enables smart contracts to prove they executed correctly without revealing private inputs or intermediate calculations. **State Channels (Hydra Integration)**: Advanced scaling technology that allows groups of users to conduct many transactions off-chain at high speed, then settle the final result on-chain. This provides both privacy and performance benefits. **Partner Chain Architecture**: Rather than being a completely separate blockchain, Midnight connects to and inherits security from Cardano. This provides the benefits of Cardano's proven consensus mechanism while enabling privacy features that wouldn't be possible on the main chain. ## Who Builds Midnight? Midnight is developed by Input Output Global (IOG), formerly known as IOHK, the research and development company behind Cardano. IOG has a strong focus on peer-reviewed research and formal verification methods, applying academic rigor to blockchain development. The team includes cryptographers, programming language researchers, and distributed systems experts who have been working on privacy-preserving technologies for years. - **Research-First**: New features are typically published in academic papers before implementation - **Formal Verification**: Mathematical proofs that code behaves correctly - **Open Source**: All code is publicly available for review and contribution - **Community-Driven**: Active engagement with developers and researchers worldwide ## Real-World Applications Midnight enables entirely new categories of blockchain applications: **Private DeFi**: Financial applications where transaction amounts and trading strategies remain confidential while still being verifiable and auditable. **Confidential Business Logic**: Companies can run business processes on-chain without revealing sensitive commercial information to competitors. **Privacy-Preserving Identity**: Identity verification systems that can prove credentials without revealing unnecessary personal information. **Confidential Voting**: Democratic decision-making systems where vote counting is transparent but individual votes remain secret. **Supply Chain Privacy**: Track goods through supply chains while keeping sensitive business relationships and pricing confidential. ## Getting Started Resources - https://docs.midnight.network/quickstart/ - Complete setup from zero to first running application - https://docs.midnight.network/develop/ - High-level architecture and key concepts - https://docs.midnight.network/learn/resources - Curated educational materials and background reading - https://docs.midnight.network/learn/glossary - Definitions of technical terms and concepts ## Tutorials - https://docs.midnight.network/develop/tutorial/ - Builds a complete application from scratch - https://docs.midnight.network/develop/tutorial/high-level-arch - How all the pieces fit together - https://docs.midnight.network/develop/tutorial/building/ - Development workflow and best practices - https://docs.midnight.network/develop/tutorial/building/examples-repo - Real-world reference implementations These tutorials are designed to take you from basic concepts to building production-ready privacy-preserving applications. ## Compact Programming Language Compact is purpose-built for zero-knowledge applications. Unlike adapting existing languages, Compact was designed from scratch to make privacy-preserving programming natural and secure. - https://docs.midnight.network/develop/reference/compact/ - Philosophy and design principles - https://docs.midnight.network/develop/reference/compact/lang-ref - Every syntax feature explained with examples - https://docs.midnight.network/develop/reference/compact/compact-std-library/ - Built-in functions for cryptography, data structures, and blockchain interaction - https://docs.midnight.network/develop/reference/compact/compact-grammar - Precise specification for tools and advanced users Traditional programming languages weren't designed for zero-knowledge proofs. Compact makes it easy to write code that compiles to efficient ZK circuits while providing familiar programming constructs. ## APIs and Integration These APIs allow applications to interact with the Midnight network and integrate privacy features into existing systems. - https://docs.midnight.network/develop/reference/midnight-api/ - How to connect external applications - https://docs.midnight.network/develop/reference/midnight-api/compact-runtime/ - Execute Compact programs and handle results - https://docs.midnight.network/develop/reference/midnight-api/compact-runtime/functions/addField - Low-level cryptographic operations for advanced use cases - https://docs.midnight.network/develop/reference/midnight-api/compact-runtime/functions/mulField - Additional cryptographic primitives These APIs provide both high-level convenience functions and low-level access to cryptographic primitives. ## Network Infrastructure For those who want to participate in securing and operating the Midnight network. - https://docs.midnight.network/validate/run-a-validator - How to run network infrastructure and participate in consensus - https://docs.midnight.network/relnotes/midnight-indexer/midnight-indexer-2-0-0 - Database indexing service v2.0.0 - https://docs.midnight.network/relnotes/midnight-indexer/midnight-indexer-2-1-0 - Database indexing service v2.1.0 - https://docs.midnight.network/relnotes/midnight-indexer/midnight-indexer-2-1-4 - Database indexing service v2.1.4 - https://docs.midnight.network/relnotes/node/node-0-8-0-RC3 - Core network software release candidate ## Community and Support **Getting Help and Staying Updated**: - https://discord.com/invite/midnightnetwork - Real-time discussions, technical support, and developer collaboration - https://x.com/MidnightNtwrk - Latest announcements, feature releases, and ecosystem news - https://docs.midnight.network/blog/web3-intro-selective-disclosure - Introduction to selective disclosure in Web3 - https://docs.midnight.network/blog/query-the-blockchain - Technical deep-dives and implementation details The community includes cryptography researchers, privacy advocates, and developers building the next generation of privacy-preserving applications. ## Current Development Status Midnight is currently in active development toward mainnet launch. The network is functional for development and testing, but protocols and APIs may change as the system matures. This is normal for cutting-edge technology that's pushing the boundaries of what's possible in blockchain privacy. - APIs are stabilizing but may have breaking changes - Test networks are available for development - Production mainnet launch is planned but not yet available - Regular updates and improvements are ongoing This documentation reflects the current state of the technology and is updated as features are added and refined.