Midnight Builds Smart Contracts Around Selective Data Privacy
The design uses local proof generation and shielded tokens, while leaving some transaction activity visible on-chain.

Midnight’s smart-contract design lets applications keep selected user inputs private while still verifying that contract rules were followed. The approach can support checks such as eligibility without requiring users to expose every underlying detail on a public ledger.
A zero-knowledge proof shows that a statement is true without revealing the information behind it. Developers use Compact smart contracts to set disclosure rules. Selected data stays in local private state, while proofs and public information can be recorded on-chain. For an age check, for example, a user can demonstrate that they meet a requirement without sharing a full identity document.
The design builds on Midnight’s privacy-network model by making data disclosure part of application rules. That gives developers a way to verify a result while keeping the private input out of the public record.
Shielded tokens hide details such as the sender, recipient and transaction value. They do not conceal every sign of activity: observers can still see that a transaction took place and when. Unshielded transactions and information a contract marks as public also remain visible.
Generating proofs requires a local proof server distributed in a Docker container. The server processes private inputs during proof creation and is meant to run on a machine controlled by the user. That local setup is a practical part of Midnight’s privacy model, alongside the disclosure rules written into each contract.
Developers have been able to deploy smart contracts on mainnet without permission since Sept. 28. The Midnight Foundation plans to publish a follow-up next week on privacy’s role for democracy advocates and decentralized networks.