Built a full DeFi terminal on the SDK in three sessions

by

I built across three sessions over about a month. It's a professional trading terminal with cross-network swaps, tokenized equities, limit orders, lending and borrowing, staking, leverage-yield vaults, a cross-network portfolio, and live protocol analytics. 3,648 lines of app code, 38 SDK hooks, 21 chains in config, 28 money-market reserves live.

The goal was specific: a viewer thinks "this looks like a real product I'd deposit into" and a builder thinks "I could ship this."

Session one was 37 minutes. Scaffold to working product with analytics, trading, earn, and portfolio tabs. About five minutes per major feature area. The ordering mattered: analytics came first because it needs no wallet. The app is useful and demonstrable before a single connection exists. Every tab after that layered onto something that already worked.

Session two is the better story because it starts with the build being thrown out. The first version had 2,500 lines of hand-written CSS, a DIY dropdown/modal/token-picker, and a hand-drawn SVG chart. The feedback was blunt: it looks cheap. The diagnosis: the design decisions were fine, the problem was hand-rolling things that have well-built libraries. Bespoke primitives miss the details that read as quality: focus traps, portalling, keyboard semantics, tooltip engines. No amount of restyling fixes that. So it got rebuilt on Tailwind v4, shadcn/ui on Base UI, TanStack Table, and ECharts. Same afternoon.

The visualization went through three rejected iterations before landing on an ECharts network graph where nodes are chains, edges are live intents, and particles only travel along routes with actual activity. The motion is data, not decoration.

Session three added leverage-yield vaults in 11 minutes. But I wrote a 170-line verification script that ran 17 assertions against live mainnet before touching any UI. Good thing too. The handover doc was wrong in six places, including one that would have silently earned zero partner fees on every leverage deposit forever. The SDK's types caught everything the doc got wrong, which is a strong endorsement of the Result<T, E> pattern across the codebase.

What the SDK made possible: one integration point for swaps, money market, staking, leverage vaults, backend orderbook data, wallet connections across EVM and Solana, and chain/token/hub-asset resolution. The live config means nothing is hardcoded. 38 hooks and a config service covered the entire product surface without reaching outside the SDK once.

What I'd flag for other builders: the backend indexes intents under a hub wallet derived from your spoke chain and address, not your EOA, and every spoke chain derives a different one. A complete cross-chain history means one query per chain plus a dedupe pass. That's in no documentation. Also, formatUserSummary().healthFactor returns "-1" when there's no debt. I shipped it once as a red critical badge reading "HF -1.00" on a completely debt-free position. Branch on sentinels before any threshold comparison.

One caveat: I'm on the team but I'm community, not engineering. I don't work on the protocol or the SDK itself. There is no version of this where I ship a product like this without the SDK and the MCP server doing the heavy lifting. No write path in this app has been executed with a real wallet yet either. Reads and quotes are verified against mainnet. The product is real but the transaction paths are untested. I'm being upfront about that because overclaiming helps nobody.

Would like to hear from builders who try the SDK themselves. Where does it click, where does it confuse, what do the docs not prepare you for.

Live at .

Stack:

  • Next.js 15.5 / React 19

  • @sodax/sdk 2.0.0

  • @sodax/dapp-kit 2.0.0

  • @sodax/wallet-sdk-react 2.0.0

  • Tailwind v4 + shadcn/ui on Base UI

  • TanStack Table v9

  • ECharts 6

  • anime.js v4

7 views

Add a comment

Replies

Be the first to comment