Sniper Guard
Monitors bonding curve reserves post-launch. Detects external buys by comparing current reserves to initial state minus your total buy. Triggers a configurable action when threshold is exceeded.
Detection method
- Polls
virtualSolReserves every 3 seconds from bonding curve cache - External SOL =
(currentReserves - initialReserves) - ourTotalBuy - Initial reserves fetched fresh via
bcCache.fetchFresh(mint) on start ourTotalBuy = dev buy SOL + sum of all bundle wallet buy amounts- Starts automatically post-confirmation (fire-and-forget)
Configuration
| Setting | Default | Description |
|---|
| enabled | false | Master toggle |
| maxExternalSol | 0.5 | SOL threshold for external buys before triggering |
| triggerMode | stopBuying | Action to take (see below) |
| whitelistPubkeys | [] | Pubkeys excluded from external SOL calculation |
Trigger modes
| Mode | Behavior |
|---|
| stopBuying | Sets stopBuyingFlag permanently. Stops polling. Motion PUMP phase will not execute further buys. |
| pauseBuying | Sets stopBuyingFlag, continues polling. Auto-resumes when external SOL drops back below threshold. |
| sellAll | Sells 100% from dev wallet + all bundle wallets immediately. |
Interactions
- Motion checks
stopBuyingFlag before every PUMP buy - sellAll collects wallet IDs from
bundleWalletsForMint:{mint} localStorage - Config persisted in localStorage:
ql_sniperGuardConfig - Max 50 log entries