Overview
The SessionRegistry provides a minimal onchain interface for checking user session state. These examples demonstrate common integration patterns for checking:- Whether a participant currently has an active session (
isSessionActive/enforceSessionActive) - Whether a participant still has a present session (
isSessionPresent/enforceSessionPresent)
Example 1: Basic Settlement Guard
Example 2: Custom Matching Logic
Example 3: Library Helper (Reusable Guard)
Session Outcomes
| Role | Check | Passed | Failed | Interpretation |
|---|---|---|---|---|
| Taker | isSessionActive | Trade allowed | Trade rejected | Active/inactive compliance |
| Maker | isSessionPresent | Trade allowed | Trade rejected | Present / blacklisted state |
Implementation Notes
- Takers must always be active at settlement.
- Makers only need to remain present (not blacklisted).
- Expired makers are still fillable to avoid unnecessary orderbook churn.
- These examples represent reference patterns - the enforcement logic can be adapted for your architecture.
- The registry itself is policy-agnostic and only exposes deterministic session state.