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
- Pre-flight - Load dev keypair, mint, and dev wallet SOL balance. Abort if misconfigured.
- Check creator vault - Read Pump.fun creator fee balance. If below
minClaimSol, end cycle as IDLE (no claim). - Claim fees - Move accumulated creator rewards to the dev wallet (must be the token creator on Pump.fun).
- Resolve tier - Fetch market cap from DexScreener (30s cache). Pick the highest tier where
mcUsdis still at or below current MC. - Snapshot holders - Helius DAS
getTokenAccountswith pagination; aggregate balances per owner; exclude dev, mint, and program accounts. - Hold-cycle filter - Track how many consecutive cycles each wallet met the active tier floor. Pay only after
holdCycleson that tier row (per-tier anti-sybil; see Eligibility). - Anti-whale filter - Drop wallets above
maxHolderBalance(if enabled). - 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.
- 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. - 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. - 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).
- 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. - 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
- Start - Repeating LIVE cycles on your
cycleIntervalSec(first cycle in about 3 seconds). - Run now - One LIVE cycle immediately.
- Stop - Stops the scheduler.
Legacy operator test modes are not available in the client dashboard. Details: Modes.