smart contracts · perp DEX

smart contracts for perp dex.

The contract side of perp DEX. matching, funding, liquidation, insurance fund, upgradeability gating. Fuzz harnesses for every state transition. Liquidation paths formally specced where it pays off. On-chain perpetual exchange — order book, oracle, liquidation — but specifically, the smart contracts layer of it.

scope

perp DEX — what we ship.

explicit deliverables for this use-case. additional smart contracts pieces stay in scope.

01

use-case deliverables

on-chain perpetual exchange — order book, oracle, liquidation.

primary pieces
matching engine (CLOB or vAMM)
oracle integration (Pyth, Chainlink, Redstone)
liquidation keepers + insurance fund
funding rate model
risk gates on max-OI per side
02

service-wide pieces

contracts that hold the money our trading stacks move.

smart contracts stack
perps + AMM internals
vault + custody primitives
cross-chain messaging
audit liaison + fuzz harnesses (Foundry, Echidna)
03

real-world shapes

not what we built (we don't kiss-and-tell client work), but the shapes-of-the-problem we anchor scope against.

reference points
Hyperliquid HLP-style vault structure
dYdX v4 keeper bots
Drift v2 JIT auctions
FAQ

quick answers.

Q

What angle do you take on perp DEX?

The contract side of perp DEX. Specifically: matching, funding, liquidation, insurance fund, upgradeability gating. Fuzz harnesses for every state transition. Liquidation paths formally specced where it pays off.

Q

Who else has built perp DEX like this?

Reference points we look at when scoping: Hyperliquid HLP-style vault structure, dYdX v4 keeper bots, Drift v2 JIT auctions. We don't copy them; they're shapes-of-the-problem.

Q

Why smart contracts (and not the other two services)?

perp DEX touches multiple disciplines. We split the work along service lines so each engagement has a single scope. If you need more than one side, we'll scope a second engagement (or a combined one) — but a single smart contracts pod is usually the right starting shape.

Q

How do we start?

Book a call. 30 minutes, no NDA, no slide deck. We tell you what scope of work looks like or refer you elsewhere if we're not the right team.