Poseidon
Privacy without compromises
The problem Poseidon solves
Solana transactions are fully public by default - anyone can see who sent what to whom. While other privacy solutions exist on Solana (like Privacy Cash), Poseidon differentiates through:
Explosive Withdrawals: Multi-hop privacy mixing that routes withdrawals through configurable intermediate wallets, making transaction graph analysis significantly harder even if individual hops are compromised.
Trustless Relayer Architecture: WebSocket-based relayer that bundles withdrawal transactions without requiring users to trust the relay operator with funds or privacy guarantees.
Full zkSNARK Unlinkability: Join-split transactions with Groth16 proofs ensure deposits and withdrawals are cryptographically unlinkable, not just obfuscated.
The trade-off is increased complexity and harder auditability compared to simpler approaches, but for users who need strong privacy guarantees on Solana, the zkSNARK model provides mathematical certainty rather than probabilistic privacy.
Challenges I ran into
Circuit Complexity & Proof Generation
The biggest challenge was getting the Groth16 circuit to verify correctly on-chain. The BN254 curve verification in Solana's compute budget is tight - had to optimize the Poseidon hash rounds and carefully structure the Merkle proof verification to stay under compute limits.
Nullifier Double-Spend Prevention
Implementing proper nullifier tracking without leaking privacy was tricky. Solution: using PDAs (Program Derived Addresses) for each nullifier with cross-checks between nullifier pairs. This prevents double-spending while keeping the nullifier set commitment-agnostic.
Explosive Withdrawal Transaction Bundling
Getting the relayer to properly bundle multi-hop withdrawals without timing issues was harder than expected. WebSocket state management between hops required careful sequencing - if intermediate wallets weren't funded in the right order, the whole chain would fail. Fixed it by implementing a dependency graph for transaction ordering.
Merkle Tree State Management
Solana account size limits made storing a full Merkle tree state challenging. Had to implement an efficient sparse Merkle tree representation that only stores non-zero nodes, similar to Light Protocol's approach but adapted for our specific commitment scheme.
Test Coverage for Attack Vectors
Writing comprehensive security tests was time-consuming but necessary. Built 53 tests covering 16 different attack vectors - everything from nullifier reuse to arithmetic overflow exploits. The pentest module catches edge cases that would've been security vulnerabilities.







Technologies used
