Skip to Content
GuidesFor Agent OperatorsRunning the Proxy

Running the Proxy

The Lateo proxy is the server that generates ZK proofs, manages agent state, and coordinates payments. It’s the central component that connects agents to the privacy pool.

Environment Variables

VariableRequiredDescription
POOL_SECRETYesOperator’s Stellar secret key (signs withdrawal transactions)
POOL_CONTRACT_IDYesDeployed pool contract address
VERIFIER_CONTRACT_IDYesDeployed Groth16 verifier contract
ASP_MEMBERSHIP_CONTRACT_IDYesASP membership tree contract
ASP_NON_MEMBERSHIP_CONTRACT_IDYesASP non-membership tree contract
USDC_TOKEN_ADDRESSNoUSDC SAC address (defaults to testnet USDC)
PORTNoServer port (default: 3002)
BATCH_WINDOW_MSNoBatch operator window in ms (default: 15000)

The proxy will not start without POOL_SECRET and POOL_CONTRACT_ID. This is intentional — Lateo cannot operate without ZK.

Startup

cd proxy && npm run dev

On startup, the proxy:

  1. Reconstructs the pool Merkle tree from on-chain events
  2. Reconstructs the ASP membership tree from on-chain events
  3. Loads agent state from encrypted SQLite
  4. Verifies on-chain sync (pool root + ASP root must match)

Data Storage

Agent data is stored in proxy/data/lateo.db (SQLite) with AES-256-GCM per-field encryption:

  • Keys derived from HMAC-SHA256(masterKey, agentId:fieldName)
  • Master key generated on first run, stored in proxy/data/secrets.env
  • Private keys, blindings, and note data are never stored in plaintext

Monitoring

The proxy logs to stderr. Privacy-safe logs only — no public keys, tx hashes, agent IDs, or anything that allows correlation. Logs contain only:

  • Aggregate counts (commitments, agents)
  • Timing information (proof generation, tx confirmation)
  • Generic status messages (“deposit confirmed”, “withdrawal confirmed”)
Last updated on