Back to work
AI TradingAgent: VL-Coresystem

AI Trading Copilot — Human-AI Collaborative Trading on Smart Money Signals

Track on-chain smart money: live monitoring, candidate signals, pre-trade AI assessment, unified risk control, automated execution — evolved from a solo tool into a multi-tenant control plane with billing, treasury and an admin console.

AI Trading Copilot — Human-AI Collaborative Trading on Smart Money Signals

It began as a personal pain: human eyes can never catch smart money's early entries on-chain — but fully automated copy-trading hands over the entire steering wheel, and without pre-trade assessment and unified risk control, drawdowns only get amplified. The shape I wanted was a copilot: machines monitor, signal and execute; AI assesses before every trade; risk rules backstop; the human keeps strategic control — and every high-risk action must be explainable and reviewable. Users must never see outcomes without reasons.

What one bug taught me about on-chain reality

The hardest bug of the project: a star bot wallet made 427 trades in 7 days, and my system received — zero signals. The root cause was almost comedic: Solana RPC's account subscription only fires when the wallet's main account balance changes, and the bot routed everything through pre-wrapped WSOL and associated token accounts. The main balance never moved a lamport. The WebSocket stayed silent forever.

All three "proper" alternatives were blocked by reality: enhanced transaction subscriptions require an enterprise plan; webhooks need a public callback endpoint; log subscriptions would instantly torch the RPC quota. The final fix was almost from a previous era — actively poll the signature list every 600 seconds. But polling itself triggers rate limits, so four layers of budget protection went around it: a pre-flight circuit breaker (trips at 70% quota), serial awaiting (at any moment exactly one wallet hits the RPC — the fundamental defense), a 500ms per-wallet stagger, and a timer re-entry guard.

Half the engineering difficulty of on-chain systems hides where no documentation will ever tell you.

From solo tool to SaaS control plane

Signal sources were later abstracted behind a pluggable interface — wallet-following, narrative ambush (watching GitHub Trending and Hacker News to position in related tokens early), and listing sniping — three implementations sharing one "AI assessment → risk → execution" pipeline. For that migration I ran a shadow comparison over 5,700 historical samples and merged only at 100% output parity between old and new paths.

Multi-tenancy was a long repayment of debt: every user-level config scattered in .env (RPC endpoints, LLM keys, trading private keys, Telegram tokens) moved into per-workspace encrypted storage, and every "silently fall back to the platform key when unconfigured" pattern was deleted — in SaaS that fallback is not fault tolerance, it is an incident. Five phases later, .env holds exactly 14 platform-only fields.

The commercial layer has two iron laws: performance fees accrue only on realized, confirmed profit — never on paper gains, never on unconfirmed proceeds; and hot-wallet sweeps to the vault must check in-flight trades and position margin first, rejecting over-limit amounts outright instead of clamping them. With money, under-collect before you ever mis-collect.

Why it stopped, and what remains

Once the system had grown into a multi-tenant control plane with a partially isolated execution plane (521 test files, a full Telegram control surface, three-tier health diagnostics, and a side-effects matrix documenting which tables, runtimes and live channels every action touches), I shut the product line down deliberately — the competitive structure of crypto trading tools does not suit a lone wolf.

But its "signal → AI assessment → risk control → execution → audit" pipeline became the underlying blueprint for every agent system I built afterwards. Knowing how to build a system is one thing; knowing which market not to enter is another — this project taught me both.