v2.25.0
Highlights across 227 merged PRs since v2.24.0. See the CHANGELOG for the full detail.
Breaking Changes
- GMX V2 markets are address-first. Declare the market-token address (
Intent.perp_open(market="0x…")); the curatedGMX_V2_MARKETS/GMX_V2_INDEX_TOKEN_DECIMALStables andindex_price_symbol/index_token_decimalsare deleted fromalmanak.connectors.gmx_v2.addresses. Migration: addmarket_addressto GMX configs and runalmanak/framework/cli/repair_position_references.pyon legacy symbol-shaped state before a live teardown. (#3617) - Chain descriptors require typed external IDs (Python API).
ChainDescriptor.external_idsis now always anExternalChainIds; the former Chainlink field is removed. Legacyalmanak.core.chainlinkmaps are read-only compatibility views. - Config-level chain gate. Published-but-unproven pairs now fail at boot:
uniswap_v3+linea,pancakeswap_v3+linea,enso+sonic/berachain/linea,lifi+sonic/linea.sonicandberachainleave the support matrix entirely. - Chainlink backtesting is gateway-only (
oracle_divergence_thresholdremoved). Invalid OHLCV timeframes and unmeasuredmarket.obv()now raise instead of silently falling back.
Features
- Per-intent Uniswap V3 pool pinning via
SwapIntent.swap_params(fee_tier/pool) — pin the exact execution pool or fail compilation. (#3644) - GMX venue-native spot prices for synthetic perp indices (
gmx_ticker), so every listed market is compilable. (ALM-3177) almanak info matrix --jsonschema v2 — per-intent chain coverage (chainsByIntent) plus a provenance envelope. (#3490)- Venue discovery —
MarketSnapshot.token_pools(),almanak ax dex-pools, and alist_token_poolsagent tool. (#3658) - Venue-native OHLCV routing with
ohlcv_source/ohlcv_venueconfig. (#3635) - GMX V2 order cancellation (
Intent.perp_cancel_order) and resting/trigger orders. (#3572) almanak ax perp-marketlive perp-market resolution via the gateway. (#3641)- Backtesting — per-tick decision telemetry (
decisions.jsonl) and simulated perp-book observation (market.perp_positions()). (#3591, #3652) - Safe exact-pool reference-price strategies. (#3692)
- Canonical
OHLCVTimeframevocabulary. (#3530)
Fixes
- Execution refuses to broadcast a deferred bundle it cannot refresh, instead of submitting stale calldata. (#3503)
- GMX V2 perp opens/closes derive a real
acceptablePrice, restoring slippage protection. (#3497) max_slippageis exclusive at 1, and theprotocol_paramsLP slippage bypass fails closed. (#3496)- Uniswap V4 swaps size gas from the estimate instead of a static floor that ran out of gas. (#3568)
- Uniswap V3 CL mints apply tolerance as a price band, not a per-leg haircut. (#3579)
- A fungible-LP teardown burns only this deployment's own liquidity in a shared pool. (#3596, #3605)
- A single physical perp position is enumerated and closed exactly once at teardown. (#3574, #3534)
- An unmeasured teardown no longer certifies success. (#3531)
- Hyperliquid perps get a real teardown closure authority instead of being reported stranded. (#3553, #3551)
- Safe-authorised withdrawals are classified as
WITHDRAWAL, notUNCLASSIFIED_OUT. (#3471) - The shared token disk cache no longer corrupts the file every process reads. (#3488)
Deprecated
almanak.framework.utils.retry— removal in 3.0.0.