Protocol
Architecture
End-to-end system design across repos and services.
Siphon spans five deployable repositories integrated over HTTP and RPC.
Layer diagram
Browser (siphon-app)
· Wallet, vault deposit/withdraw
· FHE encrypt strategy bounds locally
· Groth16 proof generation
· Visual builder + AI assistant
│
▼
Off-chain (siphon-fhe)
· Trade Executor — strategies, scheduling, note DB
· FHE Engine — homomorphic price comparison
· Proving Relayer — optional server-side proofs
· Vault index API — reads indexer Postgres
│
├──────────────────┐
▼ ▼
siphon-indexer On-chain (siphon-contracts)
Ponder → Postgres Entrypoint, Vaults, MerkleTrees
Groth16 verifiers, Uniswap routingIntegration boundaries
| Rule | Why |
|---|---|
| Frontend → trade executor only | Indexer can be replaced without app changes |
| Repos communicate over network | Independent deploy and release cycles |
| Same ABI/circuits on all EVM chains | One proof stack; per-chain addresses only |
Strategy lifecycle
- Deposit — commitment minted; note secrets stay local
- Build — canvas or AI produces a valid graph
- Encrypt — FHE bounds encrypted in browser
- Fund — execution fee paid on-chain
- Monitor — executor + FHE engine vs Pyth prices
- Trigger — browser decrypts result; user authorizes
- Execute — ZK withdraw, DEX swap, optional re-deposit
Read path for balances
zkHandler → leafIndexClient → trade-executor /vault-index/leaves
→ on failure: chunked eth_getLogs fallback (slow but correct)