Skip to main content

From Intent to Trades

With prices available, Orion translates the strategist's intent into a concrete rebalance plan: the system compares the vault's current holdings to the target allocation implied by the intent. For each asset, it determines whether the vault is over- or under-allocated and computes the corresponding amount to sell or buy.

Deterministic Trade Generation

This process is deterministic: given the same intent, prices, and vault state, the same set of trades will always be produced. There is no discretion, optimization, or routing logic at this stage, only a mechanical conversion from desired portfolio weights to required asset movements.

Sequential Failure Recalibration

Orion implements a sequential failure recalibration mechanism: the order generation engine is a deterministic state machine that handles execution failures while preserving critical invariants:

Core Invariants

  • Index ordering: Failures are processed one at a time in ascending order. Once an asset fails at a given index, all subsequent recalibration logic applies only to assets with higher indices. Assets that have already been processed (including failed ones) are never modified, ensuring deterministic state progression.

  • Self-financing: The system preserves the self-financing property. This ensures the portfolio remains fully invested without requiring external capital.

  • Reproducibility: The entire recalibration process is reproducible from onchain states.

Failure Handling Mechanisms

Sell failures: When a sell order fails, the system applies two-leg scaling:

  • The scaling factor is calculated as the ratio of the failed sell notional to the sum of total sell and buy notional
  • All remaining sell orders are scaled up proportionally, while all buy orders are scaled down proportionally
  • This preserves the self-financing property while adjusting for the failed sell

Buy failures: When a buy order fails:

  • The failed asset is locked (no further trades attempted)
  • Its notional is reallocated to the underlying asset index as buy shares
  • This ensures capital remains deployed while respecting execution constraints

Security Properties

Crucially, all assumptions made during this step are later revalidated during execution. If market conditions change or constraints are violated, execution will revert rather than silently deviating from the intent.

The sequential, index-ordered processing ensures that:

  • State transitions are deterministic and verifiable onchain;
  • No partial state corruption can occur;
  • The system can recover from individual asset failures without compromising the overall rebalance;
  • All recalibrations maintain the self-financing invariant, protecting against capital leakage.