Skip to main content

ADR-002: Midnight Network as L1

Status: Accepted Date: 2026-03-14

Context

Knight Shield needs a blockchain with native privacy for transactions. The options considered were: Midnight Network, Zcash, Aztec (L2 Ethereum), Secret Network, and Aleo.

Decision

Use Midnight Network as the exclusive L1.

Rationale

  1. Protocol-native ZK: Midnight has zero-knowledge proofs integrated at the consensus layer, not as an add-on. Selective disclosure is a first-class feature.

  2. Compact language: A contract language purpose-built for ZK that compiles to ZKIR + proving keys. Allows expressing privacy logic declaratively, unlike Solidity with separate ZK circuits.

  3. Nascent ecosystem: As the first independent wallet in the Midnight ecosystem, Knight Shield has first-mover advantage and can influence standards.

  4. Compliance-friendly: Midnight supports selective disclosure (reveal compliance status without revealing data), aligned with the vision that privacy does not mean criminal anonymity.

  5. Mature SDK: 17 npm packages (@midnight-ntwrk/*) with TypeScript support, functional preprod network.

Alternatives Considered

AlternativeReason for Rejection
ZcashMore mature but limited smart contract ecosystem (no Compact equivalent)
AztecL2 on Ethereum, dependency on Ethereum, still in heavy development
Secret NetworkPrivacy via TEE (hardware), not ZK (cryptographic) — different trust model
AleoNative ZK but less mature ecosystem than Midnight, Leo language less expressive

Consequences

  • Positive: Real privacy guarantees, first-mover advantage, TypeScript SDK
  • Negative: Network still in preprod, small user base
  • Mitigation: Maintain contract compatibility for potential migration if needed