Breaking Changes
- The
Chainenum is removed (almanak.Chain,almanak.core.enums.Chain,
VIB-4851). Chain identity is the canonical lowercase name string resolved
throughalmanak.core.chains.ChainRegistry. Migration:Chain.ETHEREUM→
"ethereum";Chain[s]/Chain(s)→ChainRegistry.resolve(s)(or
try_resolve);list(Chain)→ChainRegistry.names(). Serialized wire/DB
chain values are now lowercase; read paths stay case-insensitive forever, so
existing persisted records keep deserializing. Chains are fully
self-registered — adding a chain is one descriptor file under
almanak/core/chains/. - The legacy
Protocolenum and the v1Action/ActionBundlemodels are
removed (almanak.Protocol,almanak.Action,almanak.ActionBundle).
Protocol identity is connector-manifest strings (e.g."uniswap_v3");
enumerate the live universe viaCONNECTOR_REGISTRY. The MCP
almanak://protocolsresource now lists canonical lowercase connector names.
Features
- Hyperliquid perps connector (HyperEVM) —
PERP_OPEN/PERP_CLOSE/
PERP_WITHDRAWover the CoreWriter precompile, with runner-pumped fill
reconciliation + reject detection, margin-aware valuation, min-order
preflight, Safe permissions, fill-economics accounting, and a demo. - HyperEVM chain (id 999) — chain descriptor + gateway data layer
(HyperCore oracle prices, symbol resolution, perp dashboards). - Curve N-coin / metapool vertical — metapool + 3-coin pool support,
single-sided (coin_index) and imbalanced (imbalanced_amounts) closes
with fail-closed floors, non-USD LP valuation, gateway-backed dynamic pool
resolution, oracle/MEV-aware swap guards, and a bespokecurve_lp
Accountant scorecard + tricrypto fixture. - Teardown verification + recovery wave — Plan-B emergency
--discover,
Plan-A on-chain reconciliation, fail-closed post-teardown verification with
on-chain-verified closure counts, structured decision-log audit trail,
position-registry cutovers (lending / GMX / Pendle), HF-safe lending unwind
primitive + staircase,PERP_CANCEL_ORDERto recover stranded GMX V2
pending-order collateral, and boot-time strand detection with loud halt. - Typed LP ranges —
LPOpenIntent.range_specaccepts
PriceBand(portable human prices) orTickBand(raw ticks). - Backtesting — address-native rollout (data, portfolio, snapshots,
attribution), preflight support matrix, unsupported intents refused instead
of silently costed, numeraire-canonical performance + per-tick price
series, PnL seeded from token funding, connector-owned PnL providers. - Valuation integrity — stablecoin de-peg cross-checks on spot + lending
USD marks and Curve LP NAV; held-YT valuation via the gateway YT mark. - CLI —
almanak strat testmarket-condition injection;axrunnable
from any cwd; uniform sub-level--chain/-c; liquidation threshold in
ax lending-reserves. - Euler V2 extended to Base / Arbitrum / Ethereum; Aerodrome per-pair
routing with classic fallback; new demos:benqi_looping,metamorpho
yield-floor gating,traderjoe_lprebalance hysteresis, Curve 3pool.
Changed
- Teardown eligibility is an authoritative opt-in — the runner now honours
IntentStrategy.supports_teardown()(defaultTrue; an explicitFalse
is refused loudly at the teardown trigger and the request is left pending
for manual recovery). Position observability stays decoupled. - Flash loans + prediction markets withheld from the support matrix
pending validation — flash-loan intents disabled,balancer_flash_arb
demo parked; the connectors remain in the codebase as experimental. - ERC-20 approval sequencing consolidated onto one shared allowance-aware
primitive (incl. USDT-style reset-to-zero).
Fixes
- Teardown: 25+ correctness fixes — V4 post-close verification, Compound
V3 market keys, receipt-block-pinned reads, ERC-1155 reconciliation scope,
Pendle PT/YT/LP teardown paths, Fluid position keying, zero-debt Morpho
withdraws, no more false-FAILED lending teardowns, stranded NO_ACCOUNTING
token recovery, ~15s teardown-signal latency, unmeasured-vs-LTV=0
conflation, decoded lending revert selectors. - Accounting: N-leg (>2-coin) reconciliation root cause fixed and proven
on a volatile tricrypto round-trip; Curve LP USD viavirtual_price;
ERC4626 NAV decimal scaling; drawdown fold skips UNAVAILABLE-confidence
snapshots; Pendle PT discounted marks + gas stamps; TraderJoe LB
cost-basis; fail-loud placeholder prices (Spark unmeasured, Morpho Blue). - Curve: registry addresses,
coins(i)order validation, tagged receipt
extraction + CryptoSwap decode ghosts, on-chain allowance seeding + USDT
reset, live gas estimation,max_slippagehonored on LP open/close. - Backtesting: parameter sweeps survive real strategies end-to-end;
symbol→address bridging; funding lane wired into snapshots; gas-asset
pricing; demotoken_fundingschema migration. - Market data / routing: shape-aware
pool_reserves()for Solidly + V2
pools; Aerodromemax_price_impact+ tick-straddle enforcement + bounded
RPC retries.
Full details in CHANGELOG.md.