Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.superform.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Simulation sits between the Strategy Canvas and Intent History. Use it after authoring or reordering strategies, but before treating the live automation loop as production-ready. The page is vault-scoped. Select the vault first, then choose whether to run a historical backtest or a forward-looking simulation against the current strategy set.

Simulation Modes

ModeEndpointUse It For
BacktestPOST /api/v1/simulations/backtestReplay strategy behavior over historical vault and yield-source state.
Forward simulationPOST /api/v1/simulations/aheadProject how the current strategy set behaves from a chosen starting state.
Backtests are best for validating trigger thresholds, action sizing, and lane ordering against known market history. Forward simulations are better for checking a proposed strategy set before the next keeper cycle.

Operator Flow

  1. Open Operate → Simulation with the target vault selected.
  2. Choose backtest or forward simulation.
  3. Select the strategy set, time range, and run parameters.
  4. Run the simulation.
  5. Review the chart, metrics, generated command timeline, and per-strategy results.
  6. Save the run if it should become comparison evidence for future edits.
Simulation does not execute OMS intents or submit onchain transactions. It is a decision-support surface for strategy changes.

Saved Simulations

Saved simulations let teams compare strategy edits over time without rerunning every scenario.
EndpointMethodDescription
/api/v1/simulations/savedGETList saved simulations for the current vault/user scope.
/api/v1/simulations/saved/{simulation_id}GETLoad one saved simulation.
/api/v1/simulations/saved/lookupPOSTCheck whether an equivalent simulation already exists.
/api/v1/simulations/savedPOSTSave a completed simulation result.
/api/v1/simulations/saved/{simulation_id}DELETEDelete a saved simulation.
Use saved runs as review artifacts when changing thresholds, size_expr values, or lane order. They are especially useful when a strategy appears healthy in the canvas but produces too many small intents, creates oscillation, or misses a liquidity target.

What to Inspect

SurfaceWhat to Check
Trigger timingRules fire when the vault state actually crosses the intended threshold.
Action sizesize_expr produces positive, reasonable amounts and does not overshoot the intended reserve.
Lane orderHigher-priority strategies win when multiple strategies are eligible.
Command timelineGenerated actions match the expected deposit, withdrawal, claim, swap, bridge, or rebalance sequence.
Error outputValidator, hook, merkle, or data gaps are visible before live execution.
After a simulation looks correct, move to Intent History to monitor real OMS execution.

API Reference

EndpointMethodDescription
/api/v1/simulations/backtestPOSTRun a historical strategy simulation.
/api/v1/simulations/aheadPOSTRun a forward-looking simulation.
/api/v1/simulations/savedGETList saved simulations.
/api/v1/simulations/saved/{simulation_id}GETRead a saved simulation.
/api/v1/simulations/saved/lookupPOSTFind an existing saved simulation for the same inputs.
/api/v1/simulations/savedPOSTPersist a simulation result.
/api/v1/simulations/saved/{simulation_id}DELETEDelete a saved simulation.