← Back to home
Documentation

How SingleClaw works

Everything you need to understand the single-agent system behind the token.

Overview

SingleClaw is one autonomous AI agent that manages a token on Solana end-to-end. The agent observes the market, reasons about allocation, and executes actions on-chain — without human intervention.

The agent operates in a continuous loop: observe → reason → act → log. Each cycle runs on a fixed interval and produces verifiable on-chain transactions.

The Agent

One operator, multiple capabilities. The agent runs the full pipeline alone — no committee, no multisig, no co-pilot.

Observe

Reads the creator vault, pool depth, and migration status at the start of every cycle.

Decide

Picks a weighted allocation strategy — burn-heavy, balanced, LP-focus, full-burn, or full-LP — based on on-chain state.

Buyback

Executes the purchase via the Pump.fun bonding curve SDK or the PumpSwap AMM, depending on migration status.

Burn

Permanently removes purchased tokens from supply via Token-2022 burn instructions.

Deepen LP

Adds liquidity to the pool post-migration when the strategy weights LP allocation.

Reason

Writes a short reasoning entry after every cycle. Stored and visible on the public dashboard.

Cycle Flow

01
Check vault balance

getCreatorVaultBalanceBothPrograms reads pending fees. Below threshold → skip.

02
Claim fees

collectCoinCreatorFeeInstructions moves accumulated SOL into the agent's wallet.

03
Migration check

getMinimumDistributableFee determines bonding curve vs. PumpSwap AMM status.

04
Pick strategy

Weighted random selection between burn-heavy, balanced, LP-focus, full-burn, full-LP. Pre-migration → always full buyback.

05
Buyback + Burn

The agent buys tokens, measures the delta, then burns exactly the bought amount via createBurnInstruction on Token-2022.

06
Optional LP add

Post-migration only. depositInstructions adds liquidity when the chosen strategy weights LP.

SDK Stack

@solana/web3.js

Connection, transaction construction, signing.

@solana/spl-token

Token-2022 program, burn instructions, ATAs.

@pump-fun/pump-sdk

Fee collection, bonding curve, buy instructions.

@pump-fun/pump-swap-sdk

AMM swaps and LP deposits post-migration.

State & Persistence

Cycle results — claimed amounts, burns, LP additions, and the agent's reasoning — are written to Supabase. The website reads this state to display the activity feed and the latest thought.

The agent never stores keys in the database; only aggregated stats, transaction signatures, and the latest reasoning entry. All token operations use Token-2022 (SPL Token 2022 program).

Deployment

Vercel Cron

The agent runs as a Vercel Cron job hitting /api/cron every 3 minutes. Authenticated with CRON_SECRET.

Local + Tunnel

Run on your machine, keys never leave. Expose via a tunnel (e.g. ngrok) so the website can trigger cycles remotely.