midnight-concepts — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited midnight-concepts (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Comprehensive guide to Midnight Network's foundational concepts, privacy technology, and architecture.
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 Features:
Each Compact smart contract has three components:
THE foundational smart contract architecture that enables private state management.
How It Works:
Key Properties:
From the whitepaper: Kachina uses a novel combination of a public ledger and private witnesses, with circuits proving correct state transitions.
#### Zswap Protocol Privacy-preserving token system hiding:
Features:
// Shielded transfer flow
1. Create input from owned shielded coin
2. Create output for recipient
3. Generate ZK proof
4. Submit to network
5. Recipient can receive and spend#### Selective Disclosure Applications control exactly what data is public vs private:
// Private comparison
export circuit verifyAge(age: Uint<32>): Boolean {
const secretAge = witness Age(); // Private
return disclose(secretAge >= 18); // Only reveal boolean
}Midnight uses a hybrid UTXO + Account model:
#### UTXO Model (Ledger Tokens)
#### Account Model (Contract Tokens)
Decision Matrix:
| Use Case | Recommended Model |
|---|---|
| Simple transfers | UTXO |
| Token balances | Account |
| Complex state | Account |
| High privacy | UTXO |
| High throughput | UTXO |
| Smart contracts | Account |
Mathematical techniques proving computations are correct without revealing inputs.
Key Concepts:
Use in Midnight:
Midnight is a partner chain to Cardano:
Benefits:
Integration:
| Data | Privacy Level | Disclosure |
|---|---|---|
| Account balances | Optional | User choice |
| Transaction amounts | Optional | Hidden in Zswap |
| Identities | Optional | Hidden in Zswap |
| Business logic | Automatic | Circuit keeps secret |
| Credentials | Selective | Only proven facts |
DUST is NOT a static balance. It's a dynamic gas system where your DUST balance changes based on your NIGHT holdings and time.
Analogy:
#### How DUST Works
#### Key Properties
| Property | Description |
|---|---|
| Shielded | DUST UTXOs are private |
| Non-transferable | Cannot send DUST to others |
| Dynamic | Value changes over time |
| Derived | Computed from NIGHT UTXO |
#### DUST Units
#### Spending Rules
#### Full Architecture
The full technical specification is available in the DUST spec.
On Preprod network, DUST is no longer available from the faucet. DApps must programmatically generate DUST:
Reference: midnight-dust-generator - Official script for Preprod
Prerequisites:
npm install
docker compose -f proof-server.yml up # terminal 1
npm start # terminal 2 - interactive walkthroughThe script handles: wallet creation/restoration, funding detection, address designation, and registration.
What Midnight provides:
What Midnight does NOT provide:
pragma language_version >= 0.20;
// Public state
export ledger balance: Uint<64>;
// Private witness
witness secretAmount(): Uint<64>;
// Circuit enforces rules
export circuit deposit(amount: Uint<64>): [] {
// Verify private input
const secret = secretAmount();
// Only disclose commitment
const commitment = disclose(persistentCommit(balance.read(), secret));
// Update public
balance.write(balance.read() + amount);
}Kachina Guarantees:
Formal process for proposing changes to Midnight: midnight-improvement-proposals
| Category | Description |
|---|---|
| Core | Protocol, consensus, VM changes |
| Standards | Smart contract interfaces, data formats |
| Networking | P2P communication |
| Governance | Decision-making processes |
| Informational | Guidelines, research (no change) |
Proposed → Review → Accepted → Implemented → Superseded/Obsolete/Rejected/Withdrawn
---
MIP: <number>
Title: <title>
Authors: <name> <github>
Status: Proposed
Category: <Core|Standards|Networking|Governance|Informational>
Created: <date>
Requires: <other MIPs>
Replaces: <MIP number>
---Reference: MIP-1: MIP Process
| Term | Definition |
|---|---|
| Circuit | ZK program proving computation |
| Witness | Private input to circuit |
| Transcript | Ordered transaction history |
| Zswap | Private token system |
| Selective Disclosure | Explicit privacy control |
| Partner Chain | Secondary chain to Cardano |
| Compact | ZK smart contract language |
| Shielded | Privacy-preserving transaction |
| UTXO | Unspent Transaction Output |
| DUST | Privacy coin denominations |
This skill provides foundational concepts. For practical development see these related skills.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.