Apeing.ai (via Lazer Technologies)
Agentic Solana trading
A real-time meme-token trading terminal: Yellowstone Geyser ingestion published over NATS JetStream, a native Rust swap engine covering 21 execution venues with no SDK on the hot path, and the Kubernetes platform that runs it.
x.com/apeingai ↗Stack & integrations
- Rust (tokio · axum)
- Solana (solana-sdk 3.x)
- Yellowstone Geyser gRPC
- NATS JetStream
- Redis
- PostgreSQL + ClickHouse
- Protobuf / SSE
- Turnkey (remote signing)
- Titan + Jupiter v6 (Metis) routers
- AWS EKS · Helm · FluxCD
- Terraform (IaC)
- Prometheus · Grafana
- k6 load testing
- Bare-metal (systemd · cgroups v2 · nftables)
- Next.js 16 (Vercel)
The product, and where I came in
Apeing.ai is a consumer trading terminal on Solana: token-discovery columns that surface launches as they happen, one-click swaps, plus perps (Hyperliquid), prediction markets (Polymarket), and livestream rooms. The bet is speed — a meme token is interesting for minutes, so the platform has to see a launch and act on it before the crowd does.
When I joined, the terminal read market data by polling an external REST API and bucketed candles in the browser: the discovery feed refreshed on a timer, not as launches happened, and there was no live on-chain event plane. The bar was terminals like Axiom, where tokens appear and move in real time. I built that real-time spine end to end and led the team that shipped it — an on-chain event stream at processed commitment feeding the UI within a slot, which removed the multi-second discovery lag and demoted the external API to a fallback.
I worked across all three codebases and was a top contributor in each: I originated the bare-metal Rust execution engine (apeing-sol-engine), was one of the most active engineers on the 22-crate Rust backend (apeing-backend) and the Next.js frontend, and owned the platform and reliability work around them.
Leading the team
I led a team of 6 as the connective engineer across all three codebases, and ran the process end to end: the board on Linear wired to Slack, scrum master, QA sessions, and the demos. I oversaw the infrastructure, the load testing, and the AWS components, and wrote the design docs the work ran on — the chart-data v2 pipeline to code level, the autoscaling rollout, and the IaC migration plan. A lot of it was overtime, and taking the terminal from a polling demo to a real-time platform was the strongest stretch of engineering I have done.
Bare-metal execution engine — Rust, low level
The latency-critical path doesn't run in Kubernetes at all. It runs on a dedicated bare-metal Ubuntu box (Ryzen 9, 128GB, dual 25GbE bonded) that I set up and manage directly with systemd and cgroups — one instanced service per environment, stage and prod isolated by cgroup freeze/thaw rather than K8s namespaces, with NUMA-local pinning and kernel tuning. I wrote this engine from the first commit; it is the half of the platform where microseconds show up on the read pane.
- Zero-copy parsing, no SDK on the hot path. On-chain account layouts are cast straight from bytes with no allocation and no copy (a single-digit-nanosecond cast) instead of field-by-field deserialization. There is no Anchor, Borsh, or Jupiter crate in the dependency tree — instructions are encoded by hand: 8-byte discriminators, little-endian packing, PDA derivation.
- Transactions that fit and land. An address-lookup-table cache with a legacy-to-v0 fallback keeps transactions under the 1232-byte limit, resolving lookup tables in sub-microseconds on a cache hit. Signing is remote through Turnkey: the engine signs once, then fans the signed transaction out to every RPC in parallel with preflight skipped, against a pre-warmed blockhash pool. Confirmation runs on two paths at once — a WebSocket signature-subscription pool plus a batched status poller — streamed back to the client as server-sent events.
- Live ingestion. A 64-worker pool parses the Yellowstone Geyser gRPC stream (at processed commitment, for pre-confirmation speed) into typed lifecycle events, held in a concurrent DashMap token cache with O(1) routing by mint. Releases are atomic symlink swaps behind an nftables firewall.
Backend and data plane — Rust on EKS
- Durable, back-pressured ingestion. NATS JetStream durable pull consumers with explicit acks, file-backed retention, and automatic fallback to core NATS, under a backoff-reconnect supervisor with a liveness watchdog. The consumer hot path is engineered for sustained 2,000+ msg/s: bounded channels split per event class so one class can't starve another, back-pressure measured as drop counters, cooperative yielding, and a buffer-then-snapshot-then-drain bootstrap so no trade is lost or double-counted.
- Reliable events, no dual-write. A transactional outbox writes domain events in the same database transaction as the business update and relays them to JetStream work-queue streams (wallet tracking, referral payouts). Postgres is the system of record with compile-checked queries; Redis serves cache-aside reads with a single-flight lock against stampedes; ClickHouse holds analytics fed by a Vector pipeline; PgBouncer pools the database.
- The real-time market-data engine. A three-column DashMap (new / graduating / graduated) hydrated from Redis on cold start, serving token data in-memory first with the external API demoted to fallback, plus a config-gated chart cache with sub-20ms hits. I designed the full chart-data v2 pipeline to code level (ring-buffer candle aggregation on the existing hot path); the in-memory aggregator is built and hot-path-fed behind a config gate.
Frontend — real-time UI
This is the half the demo was missing. I rebuilt the discovery dashboard from a REST-polling monolith into a live, event-driven UI, on top of a WebSocket transport the team maintained.
- Live discovery columns. A decode-once, route-many message bus fans typed events to per-column subscriptions, with renders batched to animation frames and atomic cross-tab moves as a token graduates — intra-second updates replacing the poll.
- Protobuf decode off the main thread. Every WebSocket frame is a protobuf envelope decoded in a Web Worker; the terminal's live-data plane is split into typed buses so a price tick doesn't re-render unrelated panels, and the subscription hook replays subscriptions and migrates handlers on reconnect.
- Faster return visits, tested. IndexedDB persistence rehydrates a token view from disk in under 20ms before revalidating, and a Playwright end-to-end harness enforces a “click to fully rendered under one second” invariant.
Platform, reliability and DevOps — AWS
- Build and deploy. A multi-stage Docker build (cargo-chef, mold linker) produces nine service binaries from one image; GitHub Actions pushes to ECR and an OCI Helm registry, and FluxCD reconciles the release across staging and EU-production EKS clusters, authenticated by AWS OIDC with no static keys.
- Load testing. A k6 suite covers REST, market WebSocket, rooms WebSocket, and stepped breakpoint scenarios with ed25519 wallet-auth helpers, run against stage and prod — a 1,000 virtual-user run sustained roughly 20k messages/second of fan-out within thresholds.
- Reliability and observability. I opened four reviewed reliability PRs — autoscaling (HPA), PodDisruptionBudgets, readiness-probe fixes, capped revision history — and built a typed per-service Prometheus metrics crate exposing metrics on every service (NATS rates, handler latency, back-pressure drops, swaps by venue and outcome), surfaced in Grafana.
- Cloud estate. I audited the hand-provisioned AWS estate with EC2/RDS audit scripts and authored the Terraform migration plan to bring it under infrastructure-as-code.
The agentic trading demo
The platform sees every launch and every trade before a human could, which makes it a natural base for agents that research and propose trades on their own. We built a demo of that on LangGraph and LangChain, with MCP tool servers and Postgres behind it, to these specs. The rule that shaped it: the LLM side is allowed to think, the deterministic side is the only thing allowed to move money.
A LangGraph router fans a request out to four specialist agents that run in parallel and write to their own channels in shared state rather than one shared blob. The market agent normalizes OHLCV, funding, open interest and volatility; the news agent does live search plus semantic recall over a vector store; the pattern agent compares the setup against historical analogs and backtest slices; the rug-risk agent checks contract metadata, holder concentration and liquidity locks. Each reaches its data through MCP tool servers, so a new source is a new server rather than a change to the graph.
Everything the agents produce is evidence, not an order. A deterministic scorer merges the findings into a go or no-go, the synthesis agent writes a thesis from that evidence only, and then a deterministic risk gate is the hard boundary: it checks limits, slippage, venue allowlist and position size before anything reaches the execution engine, which places the order through the same Apeing swap engine a human click uses. Exit is deterministic too, a monitor closing on take-profit, stop-loss or timeout. The whole point of the split is blast radius: an agent that talks itself into a bad trade still cannot get past the gate.
