Skip to main content

Module margin_mode

Module margin_mode 

Source
Expand description

Margin mode enum shared across the persistence and engine layers.

Two margin regimes exist:

  • Standard: Deribit-style isolated margin. Each position’s margin is computed independently; no cross-collateralization between options and perps.
  • Portfolio: SPAN-based cross-margin. The margin engine runs scenario analysis across the entire portfolio, allowing offsetting positions to reduce total margin requirement.

This enum lives in hypercall-types (not hypercall-margin) so that the DB trait layer can reference it without pulling in the full margin engine.

Modules§

mode_str
Canonical string representations stored in the DB user_tiers.margin_mode column.

Structs§

ParseMarginModeError

Enums§

MarginMode
Per-wallet margin regime. Determines which margin engine path is used.