Nirmal Solanki

Trading Agent

The first system on real money. An AI agent trades Solana majors with its own memory, and a kill switch it cannot argue with.

pairs against USDC
6
pairs against USDC
live on mainnet
May 13
live on mainnet
decision records
35
decision records
commits
116
commits

The first system that put real money in front of a model. A small, fixed stake on Solana mainnet, six liquid pairs against USDC, and a hard daily target and kill switch around it.

The shape

The agent decides; the bot executes; the tracker enforces. Claude reads one snapshot of everything that matters and returns signals with a confidence and a size it chose inside a cap. A separate executor turns valid signals into Jupiter swaps and keeps the books. A position tracker polls prices on its own and closes positions at their take-profit or stop-loss, whatever the agent thinks.

Proving it before it was real

It ran manual-only on devnet first, then as a multi-day paper run with fills computed in the database, then live. Paper and real were a mode on the same code path, so what was proven on paper is what went live. Later it moved from a laptop to a VPS under systemd, and the cockpit became read-only, with config and wallet reads behind a worker.

What it taught

Everything the later systems do came from here: keep the model away from the stops, treat the chain as the record, and build the gate before the strategy.

How it is built

A gate
Decision to close
  1. Context builder

    Capital, open positions, today's result, recent reasoning and market data, in one snapshot.

  2. Mission gate Gate

    If the day's target is hit or the kill switch has fired, the agent refuses to run.

  3. Claude decides

    With the whole state in view. Every signal checked against hard guardrails before it is kept.

  4. Executor

    Drains signals. Skips stale ones and refuses a fill if the price has moved too far.

  5. Jupiter swap

    Quote, build, sign, send, confirm. Retries with backoff, capped slippage.

  6. Position tracker

    Take-profit and stop-loss enforced mechanically, on its own clock.

Decisions

03
  1. 01

    Stateful, not stateless.

    A prompt that only sees the market makes the same trade twice and forgets it is losing. The agent is given its open positions, its capital, the day's result and its own recent reasoning on every call, so each decision is made by something that knows where it stands.

  2. 02

    Math holds the stops. The agent may only leave early.

    Take-profit and stop-loss are mechanical and run whether or not the agent does. Once a position is open, the one thing the agent can do to it is call an early exit.

  3. 03

    The chain is the source of truth.

    A close is computed from the wallet's actual on-chain balance, not from what the database expected. A failed swap leaves the position open for a retry. There are no fake closes; a position is closed by a real swap or not at all.