Private orderflow and MEV-resistant execution for Solana.
zshield is currently a prototype repo, not a production-ready protocol.
What exists today:
- a scaffolded Anchor commitment program
- a working relay HTTP service with signed-intent admission
- Jito/native-TPU/public-RPC/direct validator-RPC/private-lane execution adapters with receipt tracking and bundle metadata
- durable relay receipt snapshots with restart recovery
- relay edge rate limiting,
/metricsJSON counters, and/metrics/prometheusexport for operator visibility - local Prometheus, Alertmanager, and Grafana bring-up assets for relay monitoring and alert routing
- a TypeScript SDK for signed intents and executable Jupiter swap envelopes
- a wallet-enabled demo frontend
- GitHub Actions CI for relay tests, SDK tests, integration tests, and workspace builds
- initial Circom circuit experiments
What does not exist yet:
- real on-chain Groth16 verification
- production-grade key management and operator hardening
- audits and production-grade observability sinks
- multi-region relay coordination
That matters because the original README and architecture docs overstated the current implementation. The repo now documents a launchable path that is honest about what v1 can protect and what it cannot.
The credible v1 claim is:
ZShield protects pre-trade orderflow from public-RPC observers and common Solana MEV searchers.
The v1 claim is not:
- full transaction privacy on Solana
- post-trade privacy after execution lands on-chain
- immunity against malicious relays or colluding leaders
- a production Zcash compliance layer
If you market ZShield as "full privacy for Solana", the product and the protocol will not support the claim. If you market it as "private orderflow for Solana", the roadmap is defensible.
Launch in three steps:
- Managed private orderflow beta
- Production private relay network with partner lanes
- Optional ZK commitment registry and deeper Zcash-attested extensions
That sequence gets something useful into market faster, while keeping the stronger protocol direction alive.
docs/PROTOCOL_REVIEW.md: gap analysis versus the Hermes Zcash plans and the current repodocs/ARCHITECTURE.md: recommended production architecture and trust modeldocs/PRODUCTION_READINESS.md: launch gates, blockers, milestones, and operational checklistdocs/GO_TO_MARKET.md: positioning, messaging, partnerships, and launch plandocs/OBSERVABILITY.md: Prometheus metrics, alert thresholds, and dashboard guidancedocs/RUNBOOKS.md: relay operations and incident response playbooksops/monitoring/: local Prometheus and Grafana stack for relay metrics and alert bring-upops/monitoring/alertmanager/: local Alertmanager routing config for relay alertsops/deploy/: self-hostable Docker Compose stack for relay, frontend, and monitoringops/drills/: executable operator drills for fallback and backlog checks
circuits/: Circom experiments for commitment and order validity proofsprograms/zshield/: Anchor commitment registry prototyperelay/: relay prototype for private submissionsdk/: SDK scaffold for private swap flowfrontend/: demo UItests/: placeholder tests
The frontend now calls the real @zshield/sdk private-swap path from a browser wallet instead of returning a mock result.
It also surfaces relay health, receipt persistence state, recent receipts, relay edge metrics, and Jito bundle metadata for showcase and operator-demo flows.
Configure it with:
frontend/.env.exampleNEXT_PUBLIC_ZSHIELD_RELAY_URLNEXT_PUBLIC_ZSHIELD_RPC_URLNEXT_PUBLIC_ZSHIELD_PROGRAM_ID
The demo also exposes a dedicated relay status surface at /status.
Do not put a relay shared secret in a public frontend. Managed encryption secrets belong on trusted clients or relay-side infrastructure, not in browser code.
This repo now uses bun for JavaScript workspace management.
Key commands:
bun installbun run buildbun run testbun run test:integrationbun run ops:monitoring:upbun run ops:monitoring:downbun run ops:monitoring:logsbun run ops:deploy:render-alertmanagerbun run ops:deploy:configbun run ops:deploy:bootstrap:stagingbun run ops:deploy:bootstrap:productionbun run ops:deploy:validate:stagingbun run ops:deploy:validate:productionbun run ops:deploy:config:stagingbun run ops:deploy:config:productionbun run ops:drill:jitobun run ops:drill:tpubun run ops:drill:backlogcargo test --manifest-path relay/Cargo.toml
Relay execution envs:
ZSHIELD_RELAY_JITO_URLZSHIELD_RELAY_TPU_WEBSOCKET_URLZSHIELD_RELAY_VALIDATOR_RPC_URLSZSHIELD_RELAY_VALIDATOR_RPC_AUTH_TOKENZSHIELD_RELAY_PRIVATE_LANE_URLZSHIELD_RELAY_PRIVATE_LANE_AUTH_TOKENZSHIELD_RELAY_SUBMISSION_RETRY_AFTER_MSZSHIELD_RELAY_SUBMISSION_MAX_ATTEMPTS
SDK checks:
cd sdk && bun run test -- --runInBandcd sdk && bun run test:integration
The integration script boots the Rust relay, mocks Solana RPC plus Jupiter/Jito dependencies, submits a real SDK private swap, and verifies receipt finalization.
If the goal is to launch and market soon, do not spend the next sprint polishing the current placeholders. Replace overclaiming with a narrow wedge:
- Jupiter first
- Jito and validator partners second
- measurable MEV savings and fill-rate proof
- invite-only alpha before broad launch
That is the shortest path from repo to product.