Skip to main content

Module unified_engine

Module unified_engine 

Source

ModulesΒ§

apply_interface πŸ”’
Apply/state-machine interface for UnifiedEngine.
builder πŸ”’
UnifiedEngine builder and construction wiring.
fill_metadata πŸ”’
journaling πŸ”’
Journal and idempotency orchestration for UnifiedEngine.
markets πŸ”’
Market lifecycle handlers for UnifiedEngine.
matching πŸ”’
Order processing pipeline helpers for UnifiedEngine.
order_routing πŸ”’
Order routing and order-type specific request handling for UnifiedEngine.
recovery πŸ”’
Replay and recovery logic for UnifiedEngine.
rfq_handler πŸ”’
runtime πŸ”’
Runtime loop and flush coordination for UnifiedEngine.
traits πŸ”’
Readability-focused capability traits for UnifiedEngine.

StructsΒ§

AgentAuthRequest
Agent authorization request sent by the API to approve or revoke agents through the engine’s command stream.
AllocatedOrder πŸ”’
Result of order allocation
CashWithdrawalApplyReceipt
CashWithdrawalRequest
DepositRequest
Deposit request sent from faucet/admin handlers to update balance_ledger.
EngineQuiesceReport
Report returned after the engine crosses a quiesce or resume barrier.
EngineQuiesceRequest
Engine-level quiesce control for restart and blue/green drain barriers.
EngineRuntimeSettings
HypercoreEquityRequest
HyperCore equity update from the Hydromancer feed for PM margin.
LiquidationBonusRequest
Liquidation bonus request sent from the chain observer to update balance_ledger.
MarginModeUpdateRequest
Margin mode update request sent by the API to keep engine-owned admission state in sync with the tier cache.
MarketRequest
Market management request sent to the runtime engine task.
MatchingResult πŸ”’
Result of matching execution
NonceCheckRequest
Nonce-only request sent by QP handshakes to advance the per-wallet nonce watermark through the engine command stream.
OptionDepositRequest
Option-token deposit request sent from the chain observer to update engine-owned option inventory.
OptionWithdrawalApplyReceipt
OptionWithdrawalRequest
TierUpdateRequest
Tier update sent from runtime handlers to refresh engine-owned admission state.
UnifiedEngine
The unified engine that combines order matching and margin calculations.
UnifiedEngineBuilder
Builder for creating the unified engine
UnifiedEngineBuilderResult
Result of building the engine with additional info
UnifiedEngineRequest
Request to the unified engine order path.

EnumsΒ§

CashRestartAuthority πŸ”’
EngineError
Error type for apply operations
EngineQuiesceAction
Control action for an engine quiesce barrier.

ConstantsΒ§

DEFAULT_ORDER_BUFFER_SIZE πŸ”’
Default buffer size for order channel
ENGINE_REQUIRE_SNAPSHOT_RESTORE_ENV πŸ”’
IDEMPOTENCY_CACHE_LOOKBACK_HOURS πŸ”’
Hours to look back when loading idempotency cache
MARKET_REQUEST_BUFFER_SIZE πŸ”’
Buffer size for market request channel
MAX_EXPIRY_NATS_PAYLOAD_BYTES πŸ”’
SNAPSHOT_CASH_VALIDATION_OVERRIDE_ENV πŸ”’
TWAP_WINDOW_SECONDS πŸ”’
TWAP settlement window in seconds (30 minutes)
UNSAFE_SNAPSHOT_REPLAY_OVERRIDE_ENV πŸ”’

FunctionsΒ§

cash_restart_authority_for_startup πŸ”’
decrement_pending_requests
env_flag_enabled πŸ”’
get_pending_requests
increment_pending_requests
non_replayable_tail_count_for_coverage_check πŸ”’
post_replay_cash_validation_checkpoint πŸ”’
should_validate_hot_journal_coverage_for_base_replay πŸ”’
validate_hot_journal_covers_base_replay πŸ”’
validate_non_replayable_tail πŸ”’