Skip to content

docs(strategy): align strategy authoring docs with engine#48

Open
NicolaBernini wants to merge 1 commit into
mainfrom
docs/fix-strategy-engine-drift
Open

docs(strategy): align strategy authoring docs with engine#48
NicolaBernini wants to merge 1 commit into
mainfrom
docs/fix-strategy-engine-drift

Conversation

@NicolaBernini

@NicolaBernini NicolaBernini commented May 25, 2026

Copy link
Copy Markdown

Alignment pass against the superman-strategy engine surfaced drift in the strategy authoring pages:

  • quickstart: the withdrawal example used a nonexistent hook (ApproveAndWithdraw4626VaultHook) and asset-denominated sizing. The real withdrawal hook is Redeem4626VaultHook, which calls redeem(shares), so size_expr must be share-denominated. Switched to 0.5 * ys__shares.
  • dsl: the variable tables listed identifiers the engine snapshot does not emit (ys_*_alloc, vault_pps_stale/_age_seconds, tick_age_seconds/ _block_number/timestamp). Replaced with the canonical keys from internal/domain/eval_state_keys.go and listed the valid ys metric suffixes.
  • Documented that size_expr units differ by action (asset wei for DEPOSIT, share wei for WITHDRAWAL/redeem) across quickstart, dsl, and action-config, including why an assets->shares pps division fails validation.
  • action-config: added missing optional fields (max_duration_seconds, allow_order_splitting, venue lists, merkle descriptors).
  • Noted the validator does not check hook-registry existence or size_expr units (only shape/identifier/dry-run checks).

Following up on https://linear.app/superform/issue/SUP-19908/superform-institutional-check-doc-against-the-real-code and fixing according to https://linear.app/superform/issue/SUP-19909/fix-sup-19908

Alignment pass against the superman-strategy engine surfaced drift in the
strategy authoring pages:

- quickstart: the withdrawal example used a nonexistent hook
  (ApproveAndWithdraw4626VaultHook) and asset-denominated sizing. The real
  withdrawal hook is Redeem4626VaultHook, which calls redeem(shares), so
  size_expr must be share-denominated. Switched to 0.5 * ys_<addr>_shares.
- dsl: the variable tables listed identifiers the engine snapshot does not
  emit (ys_*_alloc, vault_pps_stale/_age_seconds, tick_age_seconds/
  _block_number/_timestamp). Replaced with the canonical keys from
  internal/domain/eval_state_keys.go and listed the valid ys_ metric suffixes.
- Documented that size_expr units differ by action (asset wei for DEPOSIT,
  share wei for WITHDRAWAL/redeem) across quickstart, dsl, and action-config,
  including why an assets->shares pps division fails validation.
- action-config: added missing optional fields (max_duration_seconds,
  allow_order_splitting, venue lists, merkle descriptors).
- Noted the validator does not check hook-registry existence or size_expr
  units (only shape/identifier/dry-run checks).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@NicolaBernini
NicolaBernini requested a review from vikramarun May 25, 2026 17:13
@mintlify

mintlify Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
superform-docs 🟢 Ready View Preview May 25, 2026, 5:13 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant