Expand description
percli-core: Offline simulation adapter for the Percolator risk engine.
Wraps the Percolator engine with human-readable account names, serde-compatible snapshots, and ergonomic defaults.
Modules§
Structs§
- Account
- Unified account (spec §2.1)
- Account
Snapshot - Serializable snapshot of a single account’s state.
- Crank
Outcome - Outcome of a keeper crank operation
- Engine
Snapshot - Complete serializable snapshot of the engine state.
- I128
- Insurance
Fund - Insurance fund state
- Named
Engine - Human-readable wrapper around the Percolator
RiskEngine. - Params
Config - Serde-friendly risk parameter configuration with sensible defaults.
- Risk
Engine - Main risk engine state (spec §2.2)
- Risk
Params - Risk engine parameters
- U128
- BPF-safe unsigned 128-bit integer using [u64; 2] for consistent alignment. Layout: [lo, hi] in little-endian order.
Enums§
- Engine
Error - Errors from the
NamedEnginewrapper layer. - Liquidation
Policy - Liquidation policy (spec §10.6)
- Risk
Error - Side
Mode - Side mode for OI sides (spec §2.4)
Constants§
- ADL_ONE
- ADL_ONE = 1_000_000 (spec §1.3)
- MAX_
ACCOUNTS - MAX_
ORACLE_ PRICE - MAX_ORACLE_PRICE = 1_000_000_000_000 (spec §1.4)
- MAX_
VAULT_ TVL - POS_
SCALE - POS_SCALE = 1_000_000 (spec §1.2)