- A boolean
rulestree that decides whether a strategy should fire. - Numeric expressions, such as
size_expr, that decide how much the strategy should send to OMS.
Rule Nodes
Use shallow rule trees when possible. Deep trees are harder to review and usually indicate that two strategy lanes should be split.
Expression Guidelines
Expressions are evaluated by the Strategy Engine against the current vault snapshot.
In the examples above,
0xabc stands in for the full lowercase yield-source address.
Common Variables
Variable availability depends on the datafeed and vault snapshot. Common families include:
These are the canonical engine snapshot keys. Per-source (
ys_) and Merkl (merkl_) keys require a full lowercase 0x address and one of the known metric suffixes; any unknown identifier is rejected at create/update time with a position-tagged error. When in doubt, inspect the validation error and the engine snapshot shown in Intent History.
size_expr
action_config.size_expr is numeric and must evaluate to a positive amount in the hook’s input units, which depend on the action:
DEPOSIT(e.g.ApproveAndDeposit4626VaultHook) sizes in underlying asset base units.WITHDRAWAL(Redeem4626VaultHook) sizes in yield-source share base units, because the hook callsredeem(shares).
- It must be positive at runtime; a value of
0or less is dropped before reaching OMS. - It should be bounded by available liquidity or the held position.
- It should match the action’s unit (assets for deposit, shares for redeem) and direction.
- It should be easy to audit from dashboard numbers.
Conviction Config
conviction_config controls how many passing ticks are required before a strategy publishes.
Use
BINARY for simple operational gates. Add stronger conviction only when false positives are expensive and delayed action is acceptable.
Validation Timing
The Strategy Engine validates at create and update time:- JSON shape and required fields.
- Known action names and lane compatibility.
- Expression parseability.
- Basic dry-run evaluation.
- Address formatting.
- Version conflicts on update.
execution_name exists in the live hook registry, and it does not check that size_expr units match the hook (asset wei vs share wei). Verify both against Action Config.
Runtime checks still apply after validation. A strategy can save successfully and later fail to publish if it lacks a session key, merkle proof, active yield source, or executable OMS route.