Building DeFi on Solana: RPC Caching, Bundle Size, and Hitting $93M Daily Volume

July 18, 2025

At stabble, we ran a Solana DApp handling 150,000+ transactions per day and $93M peak daily volume on $33M TVL. The work taught me that performance on DeFi isn't optional. Every extra RPC call, every extra kilobyte in the bundle, every extra millisecond of Time-to-Interactive hits users when they're trying to swap. Here's what we did.

The Starting Point

When I joined, the DApp was on React 17 and Next.js 13. Five core pages, plenty of legacy UI code, and an RPC layer that was burning through over a million calls per day. Redundant fetches, no caching, and a client bundle that slowed down first paint. We had real volume and real users. The goal was simple: make it faster and cheaper to run, without breaking anything.

Cutting RPC Calls by 40%

We built backend microservices for RPC caching and transaction orchestration. The idea was straightforward: cache read-heavy RPC responses, batch where possible, and avoid re-fetching the same state for every component. The result was a drop from roughly 1 million redundant RPC calls per day to 600,000. That's a 40% reduction. Fewer calls meant lower costs, less load on the RPC provider, and faster responses for users.

BeforeAfter
~1,000,000 RPC calls/day~600,000 RPC calls/day
No caching layerDedicated caching microservice
Per-component fetchesOrchestrated, batched requests

Frontend Overhaul: React 19, Next.js 15, Tailwind, ShadCN

We migrated the five core pages from React 17/Next.js 13 to React 19/Next.js 15 and rebuilt the UI with Tailwind CSS and ShadCN UI. The payoff:

  • 18% smaller client bundle – fewer dependencies, better tree-shaking
  • Time-to-Interactive from 1.5s to 1.05s – about 30% faster
  • 25% fewer monthly UI bug reports – cleaner component structure

The Solana SDK integration (smart-liquidity routing, margin liquidity, arbitrage) drove 3,150 daily stablecoin swaps at $29,600 average per swap, with 180ms median latency. That 17% latency improvement came from both the RPC work and the leaner frontend.

CI/CD and Release Cadence

We launched a GitHub Actions CI/CD pipeline with global CDN delivery and parallel builds. Deploy time dropped from 8.5 minutes to 5.1 minutes (40% faster), and we went from 2 to 3 releases per month. Being able to ship fixes and features faster mattered when handling real money.

What We Tried That Didn't Stick

We prototyped an LLM-powered chatbot using the OpenAI API to guide users through swap and liquidity flows. It reduced onboarding friction in tests, but we eventually sunset it due to product direction changes. Sometimes the right call is to ship, learn, and prune.

Wrap-up

DeFi performance is a full-stack problem. RPC caching, transaction orchestration, a lean frontend, and solid CI/CD all contributed. The numbers that stuck with me: 40% fewer RPC calls, 18% smaller bundle, 30% faster TTI, and $93M peak daily volume on $33M TVL. Build for speed and reliability. Users notice.

GitHub
X