Skip to main content

Module engine_deps

Module engine_deps 

Source
Expand description

Shared dependency bundle for the UnifiedEngine and its sub-managers.

EngineDeps groups all Arc-shared services that the engine’s sub-managers need to borrow during order processing, margin checks, and expiry handling. By bundling these into a dedicated struct the engine avoids passing 10+ parameters to every delegated method call.

Structs§

DepositUpdateWatermark
EngineCtx
All mutable + immutable shared state that managers need to access.
EngineDeps
Shared, immutable (from the manager’s perspective) dependencies.
EngineMmpState
Engine-internal MMP state for a single (wallet, currency) pair.
EnginePosition
A single position in the engine’s internal state.
MmpFillRecord
A single fill record tracked by MMP.

Enums§

BalanceLedgerMutationSource

Functions§

apply_fill_to_positions
Apply a fill to the engine position map, creating or removing entries as needed.
apply_option_deposit_to_positions
Credit externally deposited option-token inventory into engine positions.
apply_option_withdrawal_to_positions
Debit option-token inventory for an on-chain withdrawal.
classify_rejection_reason
Classify a rejection reason string into a metric label.
engine_positions_to_portfolio_balance
Convert engine positions to a PortfolioBalance for margin calculations.