pzza.works

VoidDEX

Privacy-first DEX aggregation with zero-knowledge swaps.

VoidDEX homepage

Every swap on a public blockchain tells a story. Anyone can see your wallet address, the tokens you hold, the amounts you move and every address you have interacted with. For many people that is not just uncomfortable, it is a real security risk. Void DEX removes that tradeoff between DeFi's openness and your financial privacy.

Void DEX is a privacy-first DEX aggregator. You get the best available rate across decentralized exchanges, and the trade runs from a private balance that outside observers cannot tie back to your public wallet. One rule sits underneath everything: your wallet keys never leave your browser.

Your keys stay with you

Everything sensitive happens in the app running in your browser. It holds your keys, builds the privacy proofs, decrypts your private balance so only you can see it, and signs every transaction. The Void DEX server only ever handles public data: price quotes, token lists and market prices. It prepares an unsigned transaction with the best route, and you sign it locally.

The design assumes the server could be compromised one day. Even then, it never sees your private key, your viewing key, your balance or which funds are yours, so a breach could not steal funds or reveal your trading history.

Flow
Your BrowserVoidDex ServerBlockchainUserVoidDex UIAPI - Quotes, Tokens,PricesDEX ContractsRailgun SDK + Keys +ZK ProofsRailgun ContractsVoidDex Router

Shield, swap, unshield

You start by shielding tokens: they move into a private balance that only you can see and spend. From there you swap privately. Before you confirm, the app shows the quote and swap details, and when the trade completes the output lands back in your private balance automatically. When you want out, you unshield to any public address, and the on-chain link between your original deposit and that withdrawal is broken.

Each private swap proves you have enough balance without revealing which funds you are spending, and that proof is created in your browser. The transaction is then sent through a decentralized peer-to-peer network, so even submitting it does not depend on a central server.

Flow
Public TokensShieldPrivate BalancePrivate SwapUnshieldPublic Address

Best route across DEXes

Void DEX compares Uniswap V2 and V3 pools to find the best route for your trade, and you can see that route before you swap. Large orders can be split across several venues at once for less price impact, and trades between long-tail tokens can hop through intermediate tokens, for example a small token through ETH to USDC.

Your minimum output is enforced on-chain by the router itself, not just checked in the app, so a trade that would come in below it reverts. New exchanges plug in as separate adapters, so support can grow without replacing the router.

Networks and private receiving

Pick the network you want to trade on from the network menu. The app is configured for Ethereum, Polygon, Arbitrum and BNB Chain, plus the Sepolia testnet.

To get paid privately, open Receive Privately and share your private address. Tokens sent to it go straight into your private balance, and your balance and transactions stay hidden. For full privacy the sender also needs a wallet that supports Railgun.

src/core/VoidDexRouter.sol · L54-87
GitHub
/// @notice Route step for multi-DEX split routing struct RouteStep { bytes32 dexId; // DEX adapter ID uint256 percentage; // Percentage of input (10000 = 100%) uint256 minAmountOut; // Minimum output for this step bytes dexData; // DEX-specific data (paths, pools, etc.) } /// @notice Single swap parameters struct SwapParams { address tokenIn; address tokenOut; uint256 amountIn; uint256 minAmountOut; bytes32 dexId; bytes dexData; } /// @notice Route result for quotes struct RouteResult { bytes32 dexId; address dexAdapter; uint256 amountOut; bytes extraData; } /// @notice Sequential hop step for multi-hop routing (A->B->C) struct SequentialStep { bytes32 dexId; // DEX adapter ID for this hop address tokenOut; // Output token for this hop uint256 minAmountOut; // Minimum output for this hop bytes dexData; // DEX-specific data }

Built with

The frontend is a Next.js and React app using Wagmi and RainbowKit for wallets and the Railgun SDK for privacy, with Railgun's zkSNARK proofs compiled to WebAssembly and run in the browser, and transactions broadcast over the Waku P2P network. The quote and routing API is built with NestJS, PostgreSQL and Redis.

The contracts are written in Solidity with Foundry and OpenZeppelin. Railgun's contract verifies each proof and then calls the VoidDexRouter as an adapt contract. The router supports single-DEX swaps, split routes and sequential multi-hop routes through per-DEX adapter contracts, and it is hardened with Admin, Operator and Guardian roles, an emergency pause, reentrancy guards and SafeERC20. The routing structs are open source:

Keep reading