Protocol
Architecture
HoodPerp is deliberately thin. It composes battle-tested venues — Uniswap for spot, Lighter for perps — behind a small set of contracts and a stateless backend that never takes custody.
Components#
| Layer | Role |
|---|---|
| Trade app | The web terminal — wallet connection, charts, order entry, deposits. |
| Backend | Quotes, market data, and a delegated L2 signer for Lighter. Holds no user funds. |
| Router contract | Atomic stock → USDG → deposit into your trading account. |
| Uniswap v4 | Spot liquidity for stock ↔ USDG pairs. |
| Lighter | ZK order book that settles perpetuals and holds margin. |
The delegated-key model#
Trading on Lighter uses a delegated L2 key so you don't sign every order. Onboarding is fully non-custodial and browser-signed:
- The backend generates a delegated trading key for your account.
- You sign a one-time L1 message in your wallet to register that key on Lighter (change-pubkey).
- You optionally approve HoodPerp as an integrator with a second signature.
After that, orders are signed server-side with the delegated key. The key is scoped to trading only — it cannot move your funds. Withdrawals always settle back to your own wallet.
You stay in custody
At no point does HoodPerp hold your assets. Spot swaps run from your wallet; perp collateral is held by the Lighter protocol against your account, not by HoodPerp.
Data & pricing#
Market data (marks, order book, recent trades) comes from Lighter. A backend price recorder samples marks into continuous OHLC candles so charts stay gap-free even when the venue's candle history is sparse.

