Skip to content

v2.1.0

@icmoore icmoore tagged this 07 May 20:12
Demonstrates the State Twin pattern's multi-scenario decision-making
claim with a worked example. Builds a twin via LiveProvider against
USDC/WETH V3 mainnet, forks the twin N=50 ways under hand-specified
price scenarios, runs SimulatePriceMove against each fork, aggregates
into a distribution, applies a 70%-breach IL<-5% rule for hold-vs-
rebalance recommendation.

- python/examples/state_twin_fork_evaluate.py: canonical demo script
  (script only per D14; notebook deferred)
- --offline flag for MockProvider eth_dai_v3 fallback (CI, no-RPC,
  doc-build environments)
- 70% threshold + IL < -5% rule for the recommendation per D17 —
  illustrative not prescriptive; consumers calibrate their own
- copy.deepcopy(lp) used for forking per D15; PoolSnapshot.clone()
  not added (deepcopy was sufficient at N=50, sub-second wall clock)
- Sanity check confirms forks are independent (different scenarios
  produce different IL outputs)

Version bump 2.1.0a3 -> 2.1.0 (final). CHANGELOG collapsed from three
alpha entries into one coherent v2.1.0 entry; pre-release alphas noted
as a footnote for traceability.

This is NOT an agent. It's a Python script demonstrating the substrate
pattern. DeFiMind / LLM orchestration remain explicitly out of scope
per STATE_TWIN_COMPLETION_PLAN.md.

With this commit, State Twin Completion is functionally complete.
v2.1.0 tagged locally. PyPI push is the next-day operational task —
NOT performed by this commit.

Tests: 686 passed, 11 skipped. No regressions.

Refs: doc/state_twin_execution/STATE_TWIN_PHASE_3.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Assets 2
Loading