For a privacy-oriented network, a public transaction system is not a contradiction, but an absolute operational necessity. Within the Dusk Network ecosystem, the answer to this infrastructure design enigma revolves around its virtual machine model and hybrid architecture.
🌟 The Core of the Paradox: The Role of Moonlight
Moonlight is the public and transparent transaction model that coexists with Citadel (Dusk's private identity and transaction system). Dusk implements Moonlight because a 100% private enterprise blockchain is computationally unfeasible and incompatible with the global DeFi ecosystem for three fundamental reasons:
Consensus Synchronization: Validators of the Proof-of-Blind-Bid (PoBB) mechanism must publicly verify that nodes have locked their bids without revealing the bidder's identity. This requires a public state registry to prevent the double-spending of consensus tokens.
Gas and Network Fees: Processing Zero-Knowledge Proofs (ZKPs) consumes massive network resources. Calculating and paying gas fees in a fully private environment would slow down Dusk's block finality, which is targeted at under 10 seconds.
Regulatory Compliance: Moonlight enables the issuance of hybrid tokens where the transfer of ownership can be confidential, but the asset's lifecycle (issuance, burning, dividend payments) maintains mandatory public audit trails for regulations like MiCA in Europe.
🔎 Dusk's Architecture: Piece by Piece
To understand how Moonlight interacts with the rest of the system, it is necessary to break down Dusk's operating system and execution environment:
1. Piecrust: The State Engine
Piecrust is Dusk's native Virtual Machine (VM). Unlike Ethereum's EVM, Piecrust is based on WebAssembly (WASM) and specifically optimized for state transitions involving ZK cryptography.
Designed in Rust to maximize the execution speed of confidential smart contracts.
Implements a sharded storage model that separates public states (Moonlight) from blind privacy commitments.
2. PLONK: The Proof System
Dusk utilizes an ultra-optimized implementation of PLONK (a type of zk-SNARK) as its cryptographic backbone.
Eliminates the need for a repetitive "trusted setup" for each contract update.
Enables client-side transaction proof generation (in a web browser or smartphone) within seconds, sending only the mathematical proof to Moonlight.
3. The Confidential Smart Contract (XSC) Model
Dusk's Confidential Smart Contracts enable companies to issue regulated security tokens. Moonlight comes into play here to manage the contract's transfer rules (e.g., "the buyer must be European and of legal age") by verifying a ZK proof without revealing the user's personal data safeguarded in Citadel.
💡 Conclusion and Next Steps
Dusk does not aim for an anarchic or dark privacy; it seeks regulated privacy. Moonlight provides the infrastructural transparency required for regulators to trust the network's accounting integrity (ensuring no fake tokens are minted out of thin air), while the shadow operating system shields the competitive commercial data of financial institutions.

