PrismPerp sits between trade execution and the underlying liquidity, acting as a risk, liquidation-defence and order-routing buffer. It runs a four-tier cycle on every market tick.
| Component | Function | Upstream | Downstream | Latency |
|---|---|---|---|---|
| Oracle & pricing feeds | Aggregate CEX/DEX medians and funding | External RPCs, Pyth, Chainlink | Risk engine | Critical <100ms |
| PrismPerp engine | Delta exposure, margin tiers, hedge triggers | Pricing feeds, account state | Router, margin vault | Critical <50ms |
| Margin & vault controller | Collateral, maintenance, deposit locks | PrismPerp engine | Liquidity pools, ledger | High <200ms |
| Execution router | Defensive orders, delta rebalance, tranches | PrismPerp engine | Order books, AMMs | High <150ms |
| Event logger | State updates, slippage delta, alerts | All modules | Indexer, dashboards | Async |
Breach path
When position risk crosses a critical band the engine intercepts the standard market stop-out: it posts modular limit tranches to dampen the spike, routes a counter-hedge to return portfolio delta toward neutral, and draws the dynamic buffer before the maintenance margin is touched.
- Engine and vault interactions are atomic or reentrancy-locked; rapid mark-price volatility must not open a race.
- If feed latency passes its timeout, the system falls back to conservative max-slippage protection and pauses margin withdrawals until oracles resynchronise.
