• At Kodiak
  • DeFi
  • Perps
  • Lead

Kodiak Perps

Multichain perpetual futures

Role
Senior Full-Stack Engineer
Company
Kodiak Finance
On board
Sep 2024 – now
Chains
14 mainnets, Solana included
Kodiak Perps, the live product

What you’re looking at

  1. Index markets like NAS100 trade next to crypto.
  2. Orders match in Orderly's engine and settle on its own chain.
  3. Order entry on the fork: limit, market, TP/SL.
Visit the port

The situation

Traders had to leave to get leverage.

Kodiak is a DeFi hub running on about ten chains: swaps, pools, farms. Anyone who wanted leverage had to take their money to another venue to get it.

The task

Ship a perps exchange without building a matching engine.

Give Kodiak users perpetual futures inside the same app, with deep books from day one, and without Kodiak having to fund or risk-manage a pool of its own.

Kodiak is a small team: the Perps frontend was me and one other developer. I led it, including the SDK fork the whole exchange runs on.

What I did

Forked the SDK instead of filling in a template.

Kodiak Perps trades on Orderly. Orders match in Orderly's off-chain engine and settle on Orderly's own OP Stack chain, while deposits stay in vaults on each chain. That split is what lets one order book serve many chains: traders deposit from 14 mainnets, from Ethereum, Arbitrum, Optimism and Base to Berachain, Sonic, Sei, Robinhood Chain and Solana. Orderly offers a no-code builder on top of this: pick a theme, deploy an exchange. We wanted features the template didn't have, so we forked Orderly's SDK instead, and I maintained the fork. That put the whole trading screen in our hands rather than inside a template.

Owning the fork

The fork is where Kodiak's own product lived. On top of Orderly's trading screen it added:

  • A leaderboard with season points. Points came from the trading fees each trader generated on Kodiak, plus a bonus from the fees of traders they referred, and the board refreshed every 15 minutes.
  • Symbol analytics: an Analysis page where traders break down their own results by market. Gross and net PnL, fees, volume and maker/taker split, as daily or cumulative charts or a table, over 1, 7, 30 or 90 days or a custom range.

Keeping a fork current is the real cost of forking. Ours tracks Orderly's own repo as an upstream. Every Orderly release gets its own sync branch that merges the release, keeps Kodiak's changes on top, adopts the release's tooling, and ships with upgrade notes and versioned release notes. The app has followed that path from Orderly 2.12 to 3.4.

Numbers that must agree with the engine

A trading screen can be ugly. It cannot be wrong. Price, margin, leverage and liquidation price all have to agree with what the matching engine will do. The screen doesn't do its own maths: every one of those numbers comes from Orderly's own margin and liquidation formulas in the SDK, cross and isolated, fed live from the engine over WebSockets. The screen and the engine work from the same rules.

More than crypto

The market list runs past crypto: index markets like NAS100 sit next to ETH and HYPE.

The result

$1.2B traded.

Kodiak Perps passed $1.2B in lifetime trading volume, with deposits open on 14 mainnets.

  • $1.2Blifetime trading volume
  • 14mainnets to deposit from