Skip to content
Carlo Miguel Dy
← Back to the specimen catalogue

Acc. III · Cerebrum defiensis — crypto-AI inference gateway, cultivated 2025

AltLLM — crypto-AI platform with MCP-DeFi gateway

Full-stack engineer · 2025 – 2026 · AltLayer

AltLayer's tiered crypto-AI platform: an OpenAI-compatible inference gateway with MCP-DeFi tools auto-injected on every request, plus a consumer portal for billing, credits, API keys, and analytics.

Cerebrum defiensis — crypto-AI inference gateway, cultivated 2025

Field notes

The context

AltLLM needed its Python inference gateway to execute real DeFi operations through MCP tools across multiple LLM models — with onchain transaction safety, clean tool-loop termination, and a billing and credits layer correct enough to charge money against.

Cultivation

What I built

  • Led MCP-DeFi integration into the OpenAI-compatible inference gateway — migrated and recalibrated Python backend code, with protocol-aware tool selection, parameter auto-correction, and structured render hints so tool results render as rich cards in the portal.
  • Enabled MCP tools to perform READ and WRITE operations through the gateway and supported injection of MCP tools into every LLM model the application supports.
  • Hardened the LLM tool-execution loop and tool-schema compatibility so DeFi queries terminate cleanly and downstream OpenAI-compatible clients can consume every tool result.
  • Made onchain swaps reliable on Coinbase Developer Platform wallets — EIP-1559 signing, EIP-55 address normalisation, native-token alias resolution, multi-RPC fallbacks across every supported chain, and pre-flight Tenderly simulation.
  • Hardened portal billing and credits — cycle-aligned budget resets, auto-recharge safety defaults, and Decimal-correctness fixes across the billing UI.
  • Owned a major share of Playwright end-to-end coverage across portal, chat inference, and cross-product contract checks; wrote unit, smoke, and API integration tests plus manual QA scenarios — including API integration tests that directly exercised LLM models using MCP tools from another service deployed on Vercel.
  • Drove coordinated production rollouts via Release Please and Flux GitOps in a GCP + Kubernetes deployment context.

Root system

How it works

A Python, OpenAI-compatible inference gateway (LiteLLM) auto-injects MCP-DeFi tools on every request across supported models. Onchain execution runs on CDP wallets with Tenderly pre-flight simulation and multi-RPC fallbacks. A Next.js consumer portal handles billing, credits, API keys, and analytics. Everything deploys to Kubernetes on GCP with Helm and Flux GitOps.

Harvest

Outcomes

  • MCP-DeFi tools live in production across every model AltLLM supports, with tool results rendered as rich cards in the portal.
  • Onchain swap path hardened end-to-end — signing, address normalisation, RPC fallbacks, and simulation before execution.
  • Billing and credits correctness delivered against real money flows.
  • Cross-service verification performed on local Docker Compose stacks against epic worktree branches.
Pressed leaf — what it taught
When an LLM can move funds, the boring engineering is the product: address normalisation, simulation, RPC fallbacks, and Decimal correctness matter more than model choice. Test the model-with-tools path directly — integration tests against live LLMs caught what unit tests never would.