Skip to main content

Hub and Settlement


slp-hub overview

The SLPHub and SettlementManager together form the ticket entrypoint and the settlement backbone of the protocol. The hub handles player-facing flows and VRF orchestration, while the settlement manager keeps liabilities consistent even when tickets resolve out of order.

SLP Hub

SLPHub is the ticket entrypoint and VRF orchestrator. It coordinates ticket creation, resolution, and balance accounting while delegating nonce management to SettlementManager.

createTicket{WithETH} validates the pair and token, computes correct outputs and manages the funds of the target pair using ticket_ hooks. Randomness is requested from the VRF integration and sets up the callback path for resolution. The callback determines the result, applies win/loss handling and inserts the ticket into settlement.

Operator controls include the ability to pause ticket creation, as well as configure the VRF and other hub variables.

Settlement Manager

The SettlementManager contract is the source of truth for open liabilities on each pair in the platform. To ensure that liquidity providers are fairly impacted by tickets (both credited and debited), the contract maintains contiguous ranges with both scaled liabilities and raw totals so that funds can be tracked accurately even when processed out of order.

The contract also generates withdrawals snapshots for exiting LPs so that currently open tickets can be resolved and paid out with a deferred settlement.