Skip to main content
cloak-bots/cloak-mixer is a Rust CLI bot that cycles funds through shielded flows.

Command surface

  • setup: initialize/reset wallet pool and DB
  • status: show wallet balances and DB lifecycle counts
  • run: execute deposit/withdraw cycles (bounded or continuous)
  • recover: withdraw indexed historical deposits
  • rebalance: redistribute wallet funds (plain or private path)

Runtime integrations

  • Program interactions through Transact instruction building and PDA derivation
  • Relay interactions for /transact, /range-quote, /commitments
  • Local SQLite state for deposit lifecycle and recovery operations

Safety and reliability

  • Global lock file to avoid concurrent critical sections
  • Graceful shutdown handling for long-running loops
  • Merkle proof fallback strategy (frontier -> relay -> chain scan)
  • Recovery mode for previously indexed but unspent deposits

Configuration

Common env vars:
  • POOL_DIR
  • RPC_URL
  • RELAY_URL
  • PROGRAM_ID
  • DB_PATH
Operational scripts in cloak-bots/scripts/ support multi-set launches and controlled shutdown.