How Latrine Bot works

One LIVE mainnet cycle = one pass through the pipeline below. Default interval is 60 seconds while the scheduler is running.

Before the first cycle

The dashboard runs launch readiness (GET /api/projects/:id/preflight) before Start or Run now. That checks mint, credentials, RPC, on-chain mint, dev wallet as Pump.fun creator, SOL reserve, and the cloud engine. See Configuration - Launch readiness.

One LIVE cycle

  1. Pre-flight - Load dev keypair, mint, and dev wallet SOL balance. Abort if misconfigured.
  2. Check creator vault - Read Pump.fun creator fee balance. If below minClaimSol, end cycle as IDLE (no claim).
  3. Claim fees - Move accumulated creator rewards to the dev wallet (must be the token creator on Pump.fun).
  4. Resolve tier - Fetch market cap from DexScreener (30s cache). Pick the highest tier where mcUsd is still at or below current MC.
  5. Snapshot holders - Helius DAS getTokenAccounts with pagination; aggregate balances per owner; exclude dev, mint, and program accounts.
  6. Hold-cycle filter - Track how many consecutive cycles each wallet met the active tier floor. Pay only after holdCycles on that tier row (per-tier anti-sybil; see Eligibility).
  7. Anti-whale filter - Drop wallets above maxHolderBalance (if enabled).
  8. Estimate fees - Build the rewards pool from rolled-over pending fees plus this claim. Subtract estimated transaction fees (claim, acquire, airdrop, optional burn track) before splitting the pool.
  9. Fee pool split - Split the pool after fees by your dashboard percents: buybackPercent (Rewards to distribute %), burnPercent (Burn %), and hold % (remainder up to 100%). See Configuration.
  10. Burn track (optional) - When burnPercent > 0, the burn slice buys the project token and 100% of those tokens are SPL-burned (supply reduction). This is separate from the distribute track. Works with any reward asset setting.
  11. Distribute track - The distribute slice acquires the chosen reward asset: project token buyback (Pump / PumpSwap), Jupiter swap to USDC or a custom mint, or plain SOL (no swap).
  12. Hold slice - The hold remainder stays in the dev wallet and adds to totalHeldSol, unless you activate Dex Vault - then hold fees transfer to a per-project vault each cycle until Dex payment. Optional hold fund transparency labels this reserve on the token page and Stream Studio.
  13. Airdrop - Split the acquired reward across eligible holders by balance share (optional holder perk cohorts and X post boost weights - see Configuration). SPL batched transfers; SOL native transfers.

Hold cycles in the tier table (anti-sybil streak) are not the same as fee-split hold % or hold fund transparency. See Eligibility.

Self-financing

Each cycle is meant to pay for itself from creator fees claimed in that same cycle. SOL already on the dev wallet is a buffer for reserves and edge-case fees, not the main buyback source.

Controls

Legacy operator test modes are not available in the client dashboard. Details: Modes.

Full setup guide