PERColator

A perpetual DEX with multiple slabs - each liquidity provider can have their own 10MB slab with dedicated matching, risk, and LP management.

Contract Address
CXobgfkQT6wCysehb3abkuimkmx5chS62fZew9NBpump

This is an enhanced fork with production-ready infrastructure, not a copy of the original work.

Scroll to explore

Key Concepts

Essential terms to understand how PERColator works

Slab

A 10MB memory block containing an entire market - order book, positions, and all trading data in one contiguous space for maximum speed.

Reserve-Commit

Two-phase trading: First 'reserve' locks liquidity at current prices, then 'commit' executes the trade - preventing price manipulation between steps.

Slice

A piece of reserved liquidity from a specific order. Your reservation might grab slices from multiple orders to fill your size.

DLP

Designated Liquidity Provider - VIP traders who can post orders immediately and trade during freeze windows. Think of them as market makers with special access.

Kill Band

Safety check that rejects trades if the price moved too much (default 1%) since you reserved. Protects you from stale prices.

ARG Tax

Aggressor Roundtrip Guard - detects if you buy AND sell in the same batch (sandwich attempt) and charges you extra. Anti-manipulation.

Portfolio

Your cross-market account tracking total exposure and risk across all slabs. One portfolio, many markets.

Capability Token

Time-limited (2min max) authorization pass that lets specific markets access your funds. Scoped security - no blanket permissions.

Funding Rate

Hourly payment between longs and shorts that keeps perpetual prices anchored to spot. If perp > spot, longs pay shorts (and vice versa).

Core Features

Unified Memory Architecture

Single 10MB account per market containing order book, positions, reservations, and free lists in one cohesive structure.

Ultra-Low Latency

Sub-second execution times with O(1) operations and optimized memory pools for maximum trading performance.

Advanced Security

Capability-based access control with time-limited tokens and anti-replay protection for secure operations.

Cross-Margin Trading

Portfolio-level risk management with cross-slab margin calculations and unified collateral system.

Anti-Toxicity Mechanisms

Kill Band, JIT Penalty, and ARG systems protect against toxic order flow and ensure fair trading.

Modular Design

Four specialized programs (Router, Slab, AMM, Oracle) work together seamlessly with clear separation of concerns.

Technical Architecture

Solana Program Architecture

Router Program

RoutqcxkpVH8jJ2cULG9u6WbdRskQwXkJe8CqZehcyr
Cross-slab routing & portfolio margin
Vault custody & collateral management
Liquidation engine & risk monitoring

Slab Program

SLAB98WHcToiuUMMX9NQSg5E5iB8CjpK21T4h9ZXiep
10MB unified order book & matching
Price-time priority & fill receipts
Anti-toxicity protection (Kill Band, JIT)

AMM Program

AMMjkEeFdasQ8fs9a9HQyJdciPHtDHVEat8yxiXrTP6p
Automated market maker pools (x·y=k)
LP token minting & liquidity rewards
Dynamic fee optimization

Oracle Program

oracpooXY8Nnpx2JTLkrLiJsDaMefERUFFRktkAZ3ki
Real-time price feed aggregation
Multi-source oracle verification
Mark price calculation & funding rates

Slab v0 Layout

CURRENT
Minimal ~4KB Account
Header
256B
QuoteCache
256B
BookArea
3KB
Total: ~3.5KB
Proves core routing concept

Slab v1 Layout

PLANNED
Full 10MB Unified Account
Header
200B
Accounts
320KB
Orders
2.4MB
Positions
1.4MB
Reservations
480KB
Slices
512KB
Trades
800KB
Aggressor
192KB
Total: ~6.1MB
3.9MB available for expansion

Four Program System

Router - Multi-Slab Routing

Orchestrates cross-slab atomic swaps, manages collateral vaults, and handles portfolio margin with liquidation monitoring.

Slab - Order Book Engine

10MB unified memory with price-time priority matching, fill receipts, and anti-toxicity protection (Kill Band, JIT Penalty, ARG).

AMM - Liquidity Pools

Constant product market maker (x·y=k) with LP token rewards, dynamic fees, and deep liquidity for popular pairs.

Oracle - Price Feeds

Real-time multi-source price aggregation with mark price calculation, funding rates, and oracle verification for accurate liquidations.

Security & Safety

Programs cannot access vaults directly. All operations require time-limited capability tokens with strict scope validation.

Technology Stack

Pinocchio
Zero-dependency Solana SDK
Rust
no_std, zero allocations
Surfpool
Local test validator
140+ Tests
Comprehensive coverage