Shielded DeFi (Layer 2)
Layer 2 provides privacy-preserving financial primitives — a private AMM, shielded lending, and shielded staking — each implemented as a shielded smart contract on the DarkNet zkEVM.
Private DEX / Swap
The native DEX uses an AMM model (constant product or constant sum depending on the pair) implemented as a shielded contract. On a standard AMM, the pool state is public and individual swap amounts are visible in the mempool. On DarkNet:
- Input and output amounts of each swap are hidden via note-based in/out.
- The trader's address is not associated with the swap in public state.
- Pool reserves are maintained in a shielded commitment structure; AMM arithmetic is enforced via ZK arithmetic constraints. A zero-knowledge range proof ensures the AMM invariant holds.
- Front-running is structurally eliminated: without visible pending amounts, searcher bots cannot identify profitable reordering opportunities.
Private Lending & Borrowing
Collateralised borrowing where both the collateral amount and the loan amount are hidden. Liquidation — which must be triggered by an on-chain condition — is implemented as a zero-knowledge proof of undercollateralisation:
θ is the publicly-known liquidation threshold. Pricespcollateral, ploan come from a ZK-verified oracle (Chainlink DECO or Pyth). The proof establishes liquidation validity without revealing the collateral amount, loan amount, or borrower identity to anyone except the liquidator — who receives a private note as reward.
Hidden Position Size
Treasury and fund positions aren't broadcast to MEV bots or competing funds.
Verifiable Liquidations
Anyone can trigger a liquidation — the proof itself certifies the position is underwater.
Shielded Staking & Anonymous Governance
$DNET stakers secure the network and earn protocol fee revenue. Stake amount and lock duration are hidden from the public ledger. Staking commitments are recorded as notes in the shielded pool; reward distributions are processed as private transfers to the staker's shielded address.
Governance voting uses nullifier-based anonymous voting: a voter proves that their shielded stake meets the threshold, casts a vote, and records a nullifier to prevent double-voting — without associating the vote with a specific address or stake amount.
Private Stake Notes
Each stake commitment is a note; the stake amount and unlock time remain shielded.
Unlinkable Votes
Votes are tied to nullifiers, not to identities. Large holders can participate without publishing their positions.
