The Strategy Engine evaluates manager-defined rules and dispatches DeFiX intents to the OMS. It owns strategy lifecycle state, lane ordering, live shard state, intent history projections, and emergency locks. Base URL: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.
https://strategy.superform.xyz
Auth: Authorization: Bearer <jwt>
vault_id uses {chainId}:{vaultAddress} format, for example 8453:0xdef.... Erebor often uses separate chain_id and vault_address fields.Strategies
List Strategies
kind—USER_DEFINEDorEMERGENCY_EXIT.state— lifecycle state.lane—DEPOSIT,WITHDRAWAL, orREBALANCE.target_address— lowercased target yield source / route address.limit,offset.
kind=EMERGENCY_EXIT; normal editor flows use USER_DEFINED by default.
Create Strategy
id, vault_id, name, indicators, rules, action_config, and max_concurrent.
Priority is not part of create. Use the reorder endpoint after creation.
Update Strategy
version is required for optimistic concurrency. A stale version returns 409 Conflict.
Priority is not part of update. Use the reorder endpoint.
Transition State
IDLE, RUNNING, ARCHIVED, and ERROR depending on current state and policy.
For emergency exits, arm requests may include emergency_arm_reason.
Reorder Strategies
1..N inside the (vault_id, lane) partition.
Rules:
- Include every non-archived strategy in that lane exactly once.
- Do not include archived strategies.
- The lane must match the lane derived from each strategy action.
- Reorder is the only priority persistence path.
Strategy Kinds
| Kind | Description |
|---|---|
USER_DEFINED | Manager-authored strategy visible in normal canvas flows |
EMERGENCY_EXIT | System-managed withdrawal strategy paired to one whitelisted yield source |
EMERGENCY_EXIT strategies are controlled from Pause Operations. They are read-only in normal strategy editing flows.
Vault Config and Shards
emergency_locks.
An emergency lock has:
Intent History
The Strategy Engine maintains an operator-facing projection of OMS intent execution.Search Intents
vault_idstrategy_idactionstatechain_idtx_hashtoken_in,token_out- created/completed time ranges
- amount-in ranges
error_code- free-text search across
intent_id,execution_id,error_message, and fill transaction hash
Intent Facets
Events and Fills
completed_at, terminal_at, gas_used_total, and fill data may be null until execution events and receipts arrive.
Important Schemas
StrategyResponse
Important fields:idvault_idnameversionstatekindindicatorsrulesaction_configprioritycooldown_msmax_concurrent
IntentLogEntry
Important fields:intent_idexecution_idstrategy_idvault_idactionstatesourcefills_countlast_event_seq- lifecycle timestamps such as
acked_at,executing_at,completed_at,terminal_at error_code,error_messagetotal_amount_in,total_amount_outgas_used_total
IntentFillEntry
Important fields:fill_idintent_idexecution_idchain_idtx_hashamount_in,amount_outtoken_in,token_outgas_usedfill_timevenue
Endpoint Inventory
| Endpoint | Method | Description |
|---|---|---|
/api/v1/strategies | GET | List strategies |
/api/v1/strategies | POST | Create strategy |
/api/v1/strategies/{id} | GET | Get strategy |
/api/v1/strategies/{id} | PUT | Update strategy |
/api/v1/strategies/{id} | DELETE | Archive strategy |
/api/v1/strategies/{id}/state | PATCH | Transition state |
/api/v1/strategies/reorder | POST | Persist lane order |
/api/v1/intents | GET | Search intent projections |
/api/v1/intents/facets | GET | Intent facets |
/api/v1/intents/{intent_id}/events | GET | OMS event log |
/api/v1/intents/{intent_id}/fills | GET | Fills for one intent |
/api/v1/fills | GET | Search fills |
/api/v1/vaults/{vault_id} | GET/PATCH | Vault engine config and emergency locks |
/api/v1/engine/status | GET | Engine status |
/api/v1/engine/shards/{vault_id}/state | GET | Live shard state |
