Fixed-window perps protocol on Solana
Sumi Perps is the base fixed-window perps layer for bounded Solana markets. Markets define their close boundary up front, run through an explicit slot window, then seal at the last slot.
This repository contains the base fixed-window perps engine, SDK, CLI, tests, and proof surfaces for builders.
| Feature | Status | Evidence |
|---|---|---|
| Fixed-window markets | Stable | programs/last-slot-perps + tests/program/lifecycle.ts |
| Last-slot sealing | Stable | docs/settlement.md + tests/program/settlement.ts |
| Funding tape | Stable | programs/last-slot-perps/src/state/funding_tape.rs + tests/program/funding.ts |
| Insurance balance | Stable | docs/insurance.md + programs/last-slot-perps/src/state/insurance_balance.rs |
| TypeScript SDK | Available | sdk/src |
| Operator/developer CLI | Beta | cli/src/main.ts |
| Mainnet proof anchor | Published | docs/proof/mainnet-proof-anchor.json |
| Base perps layer infra | Next expansion | Developer-facing surfaces for teams building bounded perps markets |
flowchart LR
Developer[Developer / market operator]
SDK[TypeScript SDK / CLI]
Window[Margin window PDA]
Slab[Risk slab]
Funding[Funding tape]
Insurance[Insurance balance]
Settlement[Settlement trace]
Proof[Proof anchor]
Developer --> SDK
SDK --> Window
Window --> Slab
Slab --> Funding
Funding --> Insurance
Insurance --> Settlement
Settlement --> Proof
A Sumi market revolves around a risk slab, a bounded margin window, an append-only funding tape, an insurance balance, and a sealed settlement trace. The proof anchor ties the public program, IDL hash, lifecycle accounts, and mainnet transaction trace together for source-level review.
Install and validate the public engine surfaces:
npm install npm run build npm run test:public npm run proof:render-mainnet
Run local validator-backed program tests when a Solana validator is available:
npm run test:program
Build with the SDK from sdk/src:
import { LAST_SLOT_PERPS_PROGRAM_ADDRESS, buildOpenWindowInstruction, buildSealWindowInstruction, } from "@sumi-perps/sdk";
Use the CLI package for operator and developer flows:
npm --workspace @sumi-perps/cli run start -- --help
See examples/ for slab initialization, window opening, and last-slot sealing flows.
programs/last-slot-perps/ Anchor program
idl/ Anchor IDL
sdk/ TypeScript SDK
cli/ operator/developer CLI
examples/ integration examples
tests/program/ deterministic lifecycle/funding/settlement tests
docs/proof/ mainnet proof anchor + schema
scripts/proof/ proof renderer
.github/workflows/ CI/release checks
| Surface | Value |
|---|---|
| Program ID | GQ6AnPc2m1FYc74QnxXFjGazCsmMjeTDLMhj5UWZc9SY |
| IDL | idl/last_slot_perps.json |
| Proof anchor | docs/proof/mainnet-proof-anchor.json |
| Proof schema | docs/proof/mainnet-proof-anchor.schema.json |
| Proof renderer | scripts/proof/render-mainnet-proof.mjs |
| Public validation | npm run build + npm run test:public + npm run proof:render-mainnet |
| Releases | v0.1.0-prep through v0.4.0-rc.1 |
- Architecture
- Instructions
- Integration
- Settlement
- Insurance
- Proof walkthrough
- Operations readiness
- Module review
- Security review
- Release process
- Solscan program:
GQ6AnPc2m1FYc74QnxXFjGazCsmMjeTDLMhj5UWZc9SY - Proof docs:
docs/proof/README.md - Module review:
docs/review/MODULE_REVIEW.md - Security policy:
SECURITY.md
Sumi is building the base fixed-window perps layer that other developers can build markets on. The next repo-facing expansion is developer-facing infra: market creation interfaces, SDK/CLI guardrails, and integration docs for teams building bounded perps markets.
Please read SECURITY.md. Do not include private keys, custody material, wallet seed phrases, or deployment secrets in issues or examples.
MIT. See LICENSE.
Sumi Perps publishes a compact proof anchor: program source, Anchor IDL, and one mainnet lifecycle trace.
| Artifact | Value |
|---|---|
| Network | Solana mainnet |
| Program ID | GQ6AnPc2m1FYc74QnxXFjGazCsmMjeTDLMhj5UWZc9SY |
| RiskSlab | GigkW5X5aWmavjSci1rDcPTr5gdebdFnDCsRfBv8Nfh3 |
| FundingTape | GV9qtJV4eUDyF2K1bUYkmfxJDWgiVAGFbV6Bu6MHHUEx |
| InsuranceBalance | 3Tee1hTUYbM9hAKf9GGmLy1w93ENRNw8nJBd7zHgGNA2 |
| MarginWindow | 3cPQYxwRumXxc6XKiV1QaPovswCXFSVtQLxNAuNpqHL1 |
| SettlementTrace | EFmqG734MyduYfHWNg9ettYzHnK2XqAzUNd2MTyUZn5u |
| Lifecycle hash | ac9c3a3de04860f4c45d161e41f0daaeedbab8846aa5b164b86eea5371e290a3 |
| Repo commit | 3ec1f30 |
| IDL hash | 6d084a6d7b4811f5ea608dd369ba51a69f89f44e8a3d3c869b83455c45c787c4 |
Lifecycle transactions: