Project Documentation
Complete technical overview of PERColator - A sharded perpetual exchange protocol on Solana
Architecture
PERColator consists of four specialized on-chain Solana programs:
Router Program
RoutqcxkpVH8jJ2cULG9u6WbdRskQwXkJe8CqZehcyrGlobal coordinator managing collateral, portfolio margin, and cross-slab routing
- Multi-slab atomic swaps with optimal routing
- Vault custody & collateral management
- Portfolio margin tracking across all slabs
- Liquidation engine & risk monitoring
- Cross-market capital efficiency
Slab Program
SLAB98WHcToiuUMMX9NQSg5E5iB8CjpK21T4h9ZXiepPer-market order book and matching engine (v0: ~4KB, v1: 10MB unified account)
- Price-time priority matching engine
- Fill receipts for atomic settlement
- Anti-toxicity protection (Kill Band, JIT)
- O(1) freelist memory operations
- Risk calculations (IM/MM)
AMM Program
AMMjkEeFdasQ8fs9a9HQyJdciPHtDHVEat8yxiXrTP6pAutomated market maker with constant product formula (x·y=k)
- LP token minting & rewards distribution
- Dynamic fee optimization
- Deep liquidity pools for popular pairs
- Impermanent loss protection mechanisms
- Integration with Router for hybrid liquidity
Oracle Program
oracpooXY8Nnpx2JTLkrLiJsDaMefERUFFRktkAZ3kiReal-time price feed aggregation with multi-source verification
- Multi-source oracle aggregation
- Mark price calculation for liquidations
- Funding rate computation
- Price verification & outlier detection
- Cross-slab basis alignment
Completed Features
Technology Stack
Pinocchio v0.9.2
Zero-dependency Solana SDK for on-chain programs
Surfpool
Local Solana test validator with mainnet state
Rust (no_std)
Zero allocations, panic = abort for BPF
Key Files & Documentation
Design Invariants
Safety
Matching
Anti-Toxicity Mechanisms
Kill Band
Reject orders if mark price moved beyond threshold since batch open
JIT Penalty
DLP orders posted after batch_open get no rebate, discouraging toxic flow
ARG Tax
Roundtrip trades within the same batch are taxed/clipped to prevent gaming