Kerf is a first release and may still have small bugs. Our team is building it around the clock - follow updates and new features onEarly release - small bugs possible. Updates onx.com/UseKerf
Kerf
Chapter 01 · Overview

Overview

What Kerf is, the nine contracts and four services that make it, and how they call each other.

Kerf is one venue on Robinhood Chain where an LP position is something you can trade and a trade is something that earns. Nine contracts turn one token into a managed Uniswap position, a limit order that earns while it waits, a vault, a hedged vault or a dated note; four services put a chart, a portfolio and a perp venue in front of them. Nothing is upgradeable, no admin function reaches a user's position, and the two keys a server holds are named in Hedged vaults and Perps via Lighter.

What it is

Two halves were cut together to make it.

The liquidity half is LP management on Uniswap v3 and v4: an atomic swap-and-mint zap that takes one token and gives back a position, three range presets, permissionless harvest and rebalance under a policy the owner sets, fee-earning limit orders, a Trending / Established screener, and ERC-4626 vaults over single pools - plain, hedged and structured.

The trading half is a terminal: Lighter perps with USDG collateral, spot through the Universal Router, email login with embedded wallets, a portfolio with LP metrics, and a Theses feed where a position carries the argument for it.

Kerf keeps both halves and wires them to each other. The chart you draw a range on is the chart you buy from. The vault you deposit into shorts the same asset it LPs. The token you track on /launch becomes a vault you can deposit into on /yield.

The shape of the system

System topologySolid arrows are calls; dashed arrows are reads or event streams. The hedger and the Lighter order key are the only two keys a server holds. Hover a node to isolate its links.
off chainRobinhood Chain 4663JSONwrites · simulated firstGraphQL/order · /onboardsigned ordersharvest · rebalance · fillreportHedgetrack · graduateeventsprotocol shareclone + initializecreateV3VaultfundHedge (USDG)mint · collect · swapETH/USD30 min TWAPWeb appNext.js · wagmi · PrivyAPIFastify · PostgresBotskeeper · hedger · graduatorSignerFastAPI · Lighter order keyIndexerPonder · GraphQLLighterzk perps · order-key tradesKerfZapV3 / V4swap + mint · 25 bpsRangeOrdersplace · fill · cancelPositionKeeperharvest · rebalanceFeeRouter + ReferralRegistrytake · 20% to the referrerVaultFactoryEIP-1167 clonesLPVaultERC-4626 · one rangeHedgedLPVaultLPVault + shortStructuredVaultIncome · Protected · maturityLaunchPipelinetrack · graduatePreMarketPerpvAMM · USDG marginUniswap v3 / v4pools · NPM · PoolManagerChainlinkETH/USD · NVDA · SGOVLighter depositonly address fundHedge pays

On chain, every contract is non-upgradeable, every external mutator carries a reentrancy guard, every state change emits an event, and every reference to a Uniswap contract is immutable and set at construction. The web app writes to the chain directly: chain guard, eth_call simulation, wallet confirm, send, then a refetch of the indexer at 1.5, 4 and 10 seconds. It reads everything else from the API.

Off chain there are four processes:

ServiceRuntimeOne job
IndexerPonder 0.16Folds Uniswap and Kerf events into tables and serves them over GraphQL to the API, and only to the API.
APIFastify, Postgres/radar, /portfolio, /theses, /vaults, /launch, market data with fallbacks, the perp venue proxy, points and referrals.
Botsinside the API process, opt-in by envA keeper that harvests, rebalances and fills; a hedger that sizes each hedged vault's short and reports it; a graduator that tracks and graduates tokens.
SignerFastAPI, PythonHolds each user's Lighter order key, Fernet-encrypted, and signs orders. It has no code path that submits a withdrawal.

Everything the API and the bots compute is pure TypeScript in @kerf/core - tick maths, range shapes, zap maths, impermanent loss, APR, the basis signal, the LP delta, the keeper policy, the payoff curves - tested against fixtures the Solidity exports, so a number on a card is the number the contract will enforce.

The contracts

ContractOne job
KerfZapV3 / KerfZapV4One token in, one position out. Skims 25 bps, swaps the excess side, mints, refunds the dust. Holds nothing between calls.
RangeOrdersA single-sided position parked on one side of the price: a limit order that collects swap fees until the price crosses it. Anyone may fill; only the owner may cancel.
PositionKeeperLets anyone harvest or rebalance an enrolled position under rules only its owner can set, for a bounty the owner also sets.
LPVaultAn ERC-4626 vault over one Uniswap v3 range, priced behind a TWAP guard, capped for the beta, harvested and rebalanced permissionlessly.
HedgedLPVaultAn LPVault whose price exposure is shorted on Lighter by a hedger key that can fund and report but never withdraw.
StructuredVaultA dated note: an LP sleeve plus a long perp sleeve (Income) or a T-bill sleeve (Protected), unwound to the asset at maturity.
VaultFactoryDeploys the three vault kinds as EIP-1167 clones and initialises each in the same transaction. Its list is a list, not an endorsement.
LaunchPipelinetrack a token's first pool, graduate it into a vault once it is three days old and deep enough.
PreMarketPerpA constant-product virtual AMM for tokens no venue lists: USDG margin, 3x, an insurance fund, and a documented way of socialising bad debt.
FeeRouter + ReferralRegistryEvery protocol fee lands in one place and splits 20% to the user's referrer.

Locked decisions

These do not change without a new deployment:

  • Chain: Robinhood Chain, id 4663, and no other.
  • No token. There is a referral registry and an off-chain points ledger. Nothing is promised about either.
  • Non-custodial everywhere except the Lighter order key, which can trade an account and cannot withdraw from it.
  • The beta caps are 5 WETH and 15 000 USDG per vault and are immutable once a vault exists; raising one means deploying a new vault.
  • Every contract is non-upgradeable and has no admin function that touches a user position.
  • Fees: 25 bps on a zap or a spot swap, 10% of earned fees on a harvest, never a fee on principal. The whole table is in Fees & referrals.

How to read these docs

Chapters 02 to 04 follow one token from the zap to a managed position. Chapters 05 to 07 are the vaults, from the plain one to the dated notes, and 06 is where the one trust assumption lives. Chapters 08 and 09 are the two perp venues - the one Kerf runs and the one it is a client of. Chapter 10 is the off-chain layer, 11 is the money, and 12 and 13 are for whoever deploys or reviews the system.

Every diagram is generated from data in the repository, so a node label matches a function, a struct field or a constant you can grep for.

Read the code
  • contracts/src/ the nine contracts and their libraries
  • packages/core/src/ the pure maths every service shares
  • docs/superpowers/specs/2026-09-06-kerf-design.md the locked design decisions