Shielded Pool
TL;DRYour balance on Darknyx is a set of notes, UTXO-style values committed on-chain
as Poseidon hashes. Commitments live in Merkle-tree shards. Every use publishes
an unlinkable, circuit-derived note-use tag and all consumption paths share the
same tag-keyed replay guard. Zero-knowledge proofs enforce valid state
transitions without exposing shielded note openings.
Notes, not balances
A custodial venue stores your balance as a number in a database. Darknyx stores it as a set of notes. A note is a commitment, a Poseidon hash, to four things:The Merkle tree
Every note commitment is appended to an on-chain incremental Merkle tree. The tree’s root is a single hash summarizing every note that exists. To use a note you prove, in zero knowledge, that it is a leaf under the current root, without revealing which leaf.Replay guards prevent double-spends
A commitment proves a note exists. Every spending proof derives the shared on-chain consume-once handle, the note-use tag:note_use_tag = Hash(note_commitment, inner_hash)is unlinkable to the public leaf without the private inner hash, and- it is deterministic: every lock, settle, merge, or withdrawal of the same
note addresses the same
ConsumedNoteEntry, so the second use collides.
ConsumedNoteEntry, while an observer cannot string-match the
handle to its Merkle leaf. Deposit
also rejects a commitment that has already been appended, so repeating a
deterministic deposit cannot move in a second amount that the same commitment
could never spend. In every path, replay prevention is enforced on-chain rather
than left to the matcher.
The amount-independent inner hash
Each note’s commitment and note-use tag are both anchored on a single amount-independent value, the note’s inner hash. It serves two jobs: it is the private entropy that separates a commitment from its later use tag, and it lets a client deterministically recover descendant notes. Different note transitions derive it from the private material available to that transition:
All four constructions are enforced by their corresponding proof. The matcher
cannot choose arbitrary output randomness, and an observer cannot derive a
descendant use tag from public commitments alone.
For user trade and change outputs, the settlement circuit uses the equivalent
of
Hash(consumed_input_inner, output_role). The matcher can therefore re-lock
a partial-fill remainder without a client round-trip, while the client can
independently reproduce the same opening.
Spending in zero knowledge
To withdraw or merge, the client produces a zero-knowledge proof. For matched trades, the attested engine produces a batch proof. Across these paths, the proofs establish the relevant combination of:- the input note is a leaf under a recent tree root (it exists and is yours),
- output notes conserve value and use the configured assets and fees, and
- outputs are derived for the correct owner rather than chosen by the matcher.