mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-09-30 01:15:10 +00:00
Address PR #13 review: 18 comments across M0-M3g specs
M0: economy organ stores local memory ledger; M6 supervises M5
directly, M7 is independent antivirus/guarddog alerting M6 via
Ichor; Ada dependency reframed to economy scope; build sequence
changed to subcomponent-first with ablative tests.
M1: submit_action returns {succeeded|failed}, diagnostics internal
to Conductor; stubs now print "if finished, would respond with..."
for debugging; law script changes require operator + Homunculus
signatures; law script format added as open item.
M2: removed Python/Rust from language options; confidence scale
changed to [0.0, 10.0] per position.
M3 hub: normalized all time horizons to ~40s wall time windows;
confidence scale 0.00-10.00 with "X.XX/10.00" print format; gain
rates as "low - mid - high / 10.00"; removed Python from language
list across all sub-specs (M3a-M3g).
M3a: Julia/R/Fortran/Octave replaces Python; fBM citation added
(Hosking 1984, Wood & Chan 1994); confidence/correctness/certainty
distinguished as 3 separate metrics; models span multiple horizons.
M3b: models span multiple horizons note added; Mesa/Python removed.
M3c: Solidity for on-chain precision; Julia/Octave for analytics.
M3d-M3g: Python removed; confidence values updated to 10.0 scale.
This commit is contained in:
@@ -23,11 +23,13 @@ TBD · new location e.g. `src/economy/`. The organ is polyglot by nature: tradin
|
||||
## 4. Does / does-not
|
||||
- **Does:** host crypto/NFT trading via the Marketplace (M1); run always-on market prediction
|
||||
Sims (M3) fed by live Data Feeds (M2); manage sovereign-custody Wallets (M4); supervise
|
||||
Traders (M5) via a Conductor (M6) and SAE monitor (M7); collect taxes on trader income and
|
||||
stub transfer to Verschwörern Veregeister wallets.
|
||||
Traders (M5) via a Conductor (M6); guard against anomalies via SAE monitor (M7); collect taxes
|
||||
on trader income and stub transfer to Verschwörern Veregeister wallets; maintain a **ledger of
|
||||
economy-related memories and patterns** (trade history, learned market patterns, calibration
|
||||
state).
|
||||
- **Does-not:** consult the organism's Brain for trade decisions (scoped autonomy); route around
|
||||
Ada for organism-bound messages (S1); store organism memories (E*); act as the organism's
|
||||
conscience (that's Eth-Int / A6).
|
||||
Ada for organism-bound messages (S1); store **organism** memories (E*) — economy-specific
|
||||
memories stay local; act as the organism's conscience (that's Eth-Int / A6).
|
||||
|
||||
## 5. Interface contract
|
||||
- **Ichor interface (outbound):** `Envelope(Stomach, AdaBorder, OrganSecretion, payload)` — market
|
||||
@@ -35,14 +37,15 @@ TBD · new location e.g. `src/economy/`. The organ is polyglot by nature: tradin
|
||||
- **Ichor interface (inbound):** organism directives arrive via Ichor (e.g. risk posture changes,
|
||||
budget adjustments from A2 energy).
|
||||
- **Internal wiring:** Marketplace (M1) ↔ Data Feeds (M2) ↔ Sims (M3). Wallets (M4) bind to
|
||||
Traders (M5). Conductor (M6) supervises Traders via SAE (M7). All trader actions route through
|
||||
Marketplace.
|
||||
Traders (M5). Conductor (M6) supervises Traders (M5). SAE (M7) acts as an independent
|
||||
antivirus / guarddog / alarm bell — monitors via Ichor-routed messages and alerts M6.
|
||||
All trader actions route through Marketplace.
|
||||
- **Tax stub:** `transfer_tax(amount, source_wallet, dest_wallet) -> receipt` — automation hook
|
||||
for Verschwörern Veregeister internal wallet-to-wallet transfer. **Out of scope** — stub only.
|
||||
|
||||
## 6. Dependencies & stubs
|
||||
- Ichor bus (D2) — existing `Broker` + `Envelope`.
|
||||
- Ada border (D1) — screens outbound organism messages; *stub:* Ichor `Barrier`.
|
||||
- Ada border (D1) — outbound economy envelopes cross here (S1); *stub:* Ichor `Barrier`.
|
||||
- A2 energy — potential consumer of economic signals; *stub:* no integration initially.
|
||||
- Verschwörern Veregeister wallets — tax destination; *stub:* log transfer, no real wallet.
|
||||
|
||||
@@ -58,10 +61,10 @@ TBD · new location e.g. `src/economy/`. The organ is polyglot by nature: tradin
|
||||
SAE surveillance (M7), and wallet-level limits (M4) each independently constrain risk.
|
||||
|
||||
## 8. Build steps
|
||||
1. Define the internal wiring topology (how M1–M7 connect).
|
||||
1. Build sub-components (M1–M7) individually — each with defined success criteria and ablative tests.
|
||||
2. Extend the existing `Stomach` primitive in Ichor to carry the hub facade.
|
||||
3. Wire sub-components as their specs land.
|
||||
4. Implement the tax stub for Verschwörern Veregeister transfer.
|
||||
3. Define internal wiring topology and connect tested sub-components.
|
||||
4. Implement tax stub and Verschwörern Veregeister transfer last.
|
||||
|
||||
## 9. Tests
|
||||
Hub smoke: Marketplace reachable; Sims running and queryable; Wallet bound to Trader; Conductor
|
||||
|
||||
@@ -23,7 +23,9 @@ signing (M4), and the Conductor (M6). Deterministic law script must be auditable
|
||||
(Wallets do); supervise behavior (Conductor + SAE do).
|
||||
|
||||
## 5. Interface contract
|
||||
- `submit_action(trader_id, action: MarketAction, wallet_id) -> { accepted | vetoed | law_violation | no_wallet }`.
|
||||
- `submit_action(trader_id, action: MarketAction, wallet_id) -> { succeeded | failed }`.
|
||||
Diagnostic reasons (law violation, veto, missing wallet) are internal — routed to Conductor
|
||||
(M6) for upstream output. Immune system is a separate organ (out of scope here).
|
||||
`MarketAction` ∈ { `buy`, `sell`, `mint`, `provide_liquidity`, `withdraw_liquidity`, `claim_rewards`, … }.
|
||||
- `law_check(action: MarketAction) -> { pass | violation(rule_id, reason) }` — deterministic,
|
||||
pure function. The law script is loaded at startup and **immutable at runtime** (mirrors S3 /
|
||||
@@ -35,18 +37,19 @@ signing (M4), and the Conductor (M6). Deterministic law script must be auditable
|
||||
- `tax_event(trader_id, income_amount) -> receipt` — triggers tax collection.
|
||||
|
||||
## 6. Dependencies & stubs
|
||||
- M4 Wallets — signing + execution; *stub:* mock wallet that logs transactions.
|
||||
- M5 Traders — action source; *stub:* canned trade requests.
|
||||
- M6 Conductor — veto authority; *stub:* always-approve.
|
||||
- M7 SAE — action log consumer; *stub:* print actions.
|
||||
- Blockchain RPCs — on-chain execution; *stub:* simulated chain responses.
|
||||
- M4 Wallets — signing + execution; *stub:* "if finished, would sign and broadcast tx [details]".
|
||||
- M5 Traders — action source; *stub:* "if finished, would submit [action] for [asset] at [price]".
|
||||
- M6 Conductor — veto authority; *stub:* "if finished, would evaluate [action] against risk policy; approving".
|
||||
- M7 SAE — action log consumer; *stub:* "if finished, would analyze [action] for behavioral anomalies".
|
||||
- Blockchain RPCs — on-chain execution; *stub:* "if finished, would execute [action] on [chain], returning tx_hash".
|
||||
|
||||
## 7. Invariants / laws
|
||||
- **L1 (C5):** **all market actions route through the Marketplace** — no direct on-chain
|
||||
execution by any trader. This is the economy organ's S1.
|
||||
- **L2 (C5):** the **deterministic law script is immutable at runtime** — loaded at startup,
|
||||
never modified by traders, conductor, or sims. Changes require a restart with a new script
|
||||
version. Mirrors the COBOL vault (S3).
|
||||
version **and a pair of signatures from the operator and the Homunculus**. Mirrors the COBOL
|
||||
vault (S3).
|
||||
- **L3 (C4):** **no wallet, no access** — a trader without a bound wallet cannot submit actions.
|
||||
The Marketplace enforces this before any other check.
|
||||
- **L4 (C4):** **veto is checked after law, before execution** — law violations are rejected
|
||||
@@ -73,3 +76,4 @@ Tax: income event triggers tax stub. Immutability: law script cannot be modified
|
||||
- Position limits, drawdown stops, and other risk parameters — live in the law script or in the
|
||||
Conductor's judgment?
|
||||
- Tax rate / calculation method (fixed %, tiered, per-asset?).
|
||||
- Non-Turing law script design — to discuss (format, expressiveness, bounds).
|
||||
|
||||
@@ -11,7 +11,7 @@ DESIGN-FIRST · ABSENT. Role C3; implementation C1.
|
||||
|
||||
## 3. Language & location
|
||||
TBD · `src/economy/feeds/`. Needs async I/O for streaming data (WebSockets, SSE, RSS polling).
|
||||
Pony actors are a natural fit (async, backpressure-aware). Python or Rust for API client libs.
|
||||
Pony actors are a natural fit (async, backpressure-aware).
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** ingest live market data from external sources (RSS, price APIs, DEX subgraphs,
|
||||
@@ -30,8 +30,8 @@ Pony actors are a natural fit (async, backpressure-aware). Python or Rust for AP
|
||||
- `query_history(feed_type, time_range) -> [NormalizedDatum]` — sims and traders can pull
|
||||
historical data within the session window.
|
||||
- `NormalizedDatum { feed_type, source, timestamp, payload, confidence }` — common shape.
|
||||
`confidence` ∈ [0.0, 1.0] — data source reliability (exchange-reported price = high; RSS
|
||||
sentiment = lower).
|
||||
`confidence` ∈ [0.0, 10.0] — data source reliability per position produced (exchange-reported
|
||||
price = high; RSS sentiment = lower). Sims produce even finer-grained confidence.
|
||||
|
||||
## 6. Dependencies & stubs
|
||||
- External data sources (price APIs, RSS, RPC nodes) — *stub:* canned market data replay.
|
||||
|
||||
@@ -15,9 +15,9 @@ DESIGN-FIRST · ABSENT. Role C3; implementation C1. Mathematical foundations C4
|
||||
established); specific model parameters C1.
|
||||
|
||||
## 3. Language & location
|
||||
TBD · `src/economy/sims/`. Numerical computing (Julia, Python/NumPy, Octave, or Rust) for the
|
||||
simulation cores. A query facade accessible to Traders. Each sim type (M3a–M3g) may use a
|
||||
different runtime suited to its math.
|
||||
TBD · `src/economy/sims/`. Numerical computing (Julia, Octave, Fortran, R, Solidity, or C++)
|
||||
for the simulation cores. A query facade accessible to Traders. Each sim type (M3a–M3g) may use
|
||||
a different runtime suited to its math.
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** tick-advance continuously at **90:1** (1 wall-second = 90 simulated seconds)
|
||||
@@ -29,11 +29,11 @@ different runtime suited to its math.
|
||||
| Horizon | Window | Tick step | Effective ratio | Wall time for window |
|
||||
|---------|--------|-----------|-----------------|---------------------|
|
||||
| Tick–hourly | Next 1–60 min | 1s | 90:1 | ~40s |
|
||||
| Daily | Next 24h | 1 min | 5,400:1 | ~16s |
|
||||
| Weekly | Next 7d | 10 min | 54,000:1 | ~11s |
|
||||
| Monthly | Next 30d | 1 hr | 324,000:1 | ~8s |
|
||||
| Annual | Next 365d | 6 hr | 1,944,000:1 | ~16s |
|
||||
| 5-year | Next 1825d | 1 day | 7,776,000:1 | ~20s |
|
||||
| Daily | Next 24h | 24s | 2,160:1 | ~40s |
|
||||
| Weekly | Next 7d | ~3 min | 15,120:1 | ~40s |
|
||||
| Monthly | Next 30d | 12 min | 64,800:1 | ~40s |
|
||||
| Annual | Next 365d | ~2.5 hr | ~788,000:1 | ~40s |
|
||||
| 5-year | Next 1825d | 12 hr | ~3,942,000:1 | ~40s |
|
||||
- **Does-not:** trade (Traders/Marketplace do); make decisions for traders (it informs, they
|
||||
decide); enforce laws (Marketplace does); supervise behavior (Conductor/SAE do); skip ticks;
|
||||
run slower than 90:1.
|
||||
@@ -44,7 +44,10 @@ different runtime suited to its math.
|
||||
`tokenomics_macro`, `consensus_staking`, `market_microstructure` } (M3a–M3g).
|
||||
- `BoundedPrediction { value, lower_bound, upper_bound, confidence, time_horizon, sim_type, timestamp }`.
|
||||
Every output is bounded — no point estimates without uncertainty ranges.
|
||||
Example: `{ value: 7.2, lower_bound: 5.8, upper_bound: 8.9, confidence: 0.73,
|
||||
`confidence` ∈ [0.00, 10.00] — printed as `7.62/10.00`. Gain rates print as
|
||||
`lower - value - upper / 10.00` (e.g. `2.31 - 4.44 - 7.11 / 10.00 gain over next 30 days`);
|
||||
the denominator aids legibility — gain is not capped at 10.00.
|
||||
Example: `{ value: 7.2, lower_bound: 5.8, upper_bound: 8.9, confidence: 7.30,
|
||||
time_horizon: "4h", sim_type: "amm_liquidity" }`.
|
||||
- `status(sim_type?) -> { running, pop_count, last_calibration, data_freshness }` — health check.
|
||||
- `calibrate(sim_type, feed_data: [NormalizedDatum])` — Data Feeds (M2) pushes live data for
|
||||
@@ -62,8 +65,9 @@ different runtime suited to its math.
|
||||
unbounded point estimates. Uncertainty is a first-class value, not an afterthought.
|
||||
- **L3 (C5):** all sims are **tick-advanced and continuous** — fine-grained ticks (RTS-style).
|
||||
Base speed **90:1** (1s wall = 90s sim). Longer horizons run at higher velocity with coarser
|
||||
steps and update less frequently. Each horizon runs **in parallel** — they are concurrent,
|
||||
not sequential. No horizon runs slower than 90:1.
|
||||
steps and update less frequently. Each horizon completes its forecast window in **~40s wall
|
||||
time**. Each horizon runs **in parallel** — they are concurrent, not sequential. No horizon
|
||||
runs slower than 90:1.
|
||||
- **L4 (C4):** sims are **read-only from traders' perspective** — a query never mutates sim
|
||||
state. Calibration happens only from Data Feeds (M2).
|
||||
- **L5 (C4):** each sim type is **independent** — failure in one sim does not cascade to others.
|
||||
|
||||
@@ -16,10 +16,10 @@ execution C5 (industry standard since 2001). Jump-diffusion C5 (Merton 1976). Pa
|
||||
for crypto markets C1.
|
||||
|
||||
## 3. Language & location
|
||||
TBD · `src/economy/sims/statistical/`. Python (NumPy/SciPy), Julia, or R for numerical
|
||||
computing. Needs efficient matrix operations, SDE solvers, and distribution sampling. Fractional
|
||||
Brownian motion generation requires specialized libraries (e.g. `fbm` in Python, or spectral
|
||||
methods).
|
||||
TBD · `src/economy/sims/statistical/`. Julia, R, Fortran, or Octave for numerical computing.
|
||||
Needs efficient matrix operations, SDE solvers, and distribution sampling. Fractional Brownian
|
||||
motion generation uses spectral methods (Hosking 1984, Wood & Chan 1994) or Cholesky
|
||||
decomposition of the covariance matrix.
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** run Monte Carlo price simulations (GBM, Merton jump-diffusion, Heston stochastic
|
||||
@@ -52,11 +52,11 @@ methods).
|
||||
| Weekly–monthly | Jump-diffusion Monte Carlo, regime-conditional forecasts | Hourly roll |
|
||||
| Annual–5yr | SDE mean-reversion long-run $\theta$, macro regime priors | Daily roll |
|
||||
- Examples:
|
||||
`{ value: 1847.30, lower_bound: 1790.15, upper_bound: 1905.60, confidence: 0.95,
|
||||
`{ value: 1847.30, lower_bound: 1790.15, upper_bound: 1905.60, confidence: 9.50,
|
||||
time_horizon: "24h", sim_type: "statistical" }` — 95% CI on ETH price.
|
||||
`{ value: 0.72, lower_bound: 0.58, upper_bound: 0.89, confidence: 0.90,
|
||||
`{ value: 0.72, lower_bound: 0.58, upper_bound: 0.89, confidence: 9.00,
|
||||
time_horizon: "1h", sim_type: "statistical" }` — Heston instantaneous vol $\sqrt{\nu_t}$.
|
||||
`{ value: "bear", lower_bound: null, upper_bound: null, confidence: 0.83,
|
||||
`{ value: "bear", lower_bound: null, upper_bound: null, confidence: 8.30,
|
||||
time_horizon: "current", sim_type: "statistical" }` — HMM regime state.
|
||||
- **Prediction types:** `price_forecast`, `volatility_surface`, `var_calculation`,
|
||||
`correlation_matrix`, `regime_state`, `rough_vol_estimate`, `jump_intensity`.
|
||||
@@ -68,10 +68,12 @@ methods).
|
||||
|
||||
## 7. Invariants / laws
|
||||
- **L1 (C5):** bounds are **statistical confidence intervals** — derived from the model's
|
||||
distribution, not hand-picked. The confidence level (e.g. 0.95) is explicit in the output.
|
||||
- **L2 (C5):** **six time horizons run concurrently** — tick-level rough vol, hourly regime
|
||||
detection, daily Heston surface, weekly Monte Carlo, annual mean-reversion, and 5-year macro
|
||||
forecasts coexist; none blocks the others.
|
||||
distribution, not hand-picked. Three distinct metrics in every output: **confidence** (how sure
|
||||
the model is of this prediction), **correctness** (how accurate the model has been historically),
|
||||
and **certainty** (how stable the estimate is across perturbations). All on the 0.00–10.00 scale.
|
||||
- **L2 (C5):** **six time horizons run concurrently** — models span multiple horizons (e.g.
|
||||
Monte Carlo runs daily and annual, rough vol runs tick and hourly, Heston runs daily and
|
||||
weekly). All coexist; none blocks the others.
|
||||
- **L3 (C4):** model parameters are **re-estimated on each calibration** from live data — no
|
||||
stale parameters carried across regime changes. Regime transitions trigger immediate
|
||||
re-estimation of conditional parameters.
|
||||
|
||||
@@ -17,9 +17,9 @@ solvers C3). Crypto pump-and-dump ABM C3 (3-agent protocol validated on historic
|
||||
Pop behavioral models C1.
|
||||
|
||||
## 3. Language & location
|
||||
TBD · `src/economy/sims/sociological/`. Agent-based modeling frameworks (Mesa/Python, NetLogo,
|
||||
or custom). Needs efficient population iteration, strategy mutation, PDE solvers for MFG
|
||||
(HJB + Fokker-Planck), and bandit algorithms (UCB/Thompson).
|
||||
TBD · `src/economy/sims/sociological/`. Agent-based modeling frameworks (NetLogo, or custom).
|
||||
Needs efficient population iteration, strategy mutation, PDE solvers for MFG (HJB +
|
||||
Fokker-Planck), and bandit algorithms (UCB/Thompson). Julia, R, or Fortran.
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** simulate populations of behavioral archetypes competing in a market; apply
|
||||
@@ -59,14 +59,16 @@ or custom). Needs efficient population iteration, strategy mutation, PDE solvers
|
||||
| Annual | Long-run evolutionary stable strategies (ESS) | Monthly roll |
|
||||
| 5-year | MFG stationary equilibria, structural population shifts | Quarterly roll |
|
||||
- Examples:
|
||||
`{ value: 7.3, lower_bound: 5.0, upper_bound: 9.1, confidence: 0.68,
|
||||
`{ value: 7.3, lower_bound: 5.0, upper_bound: 9.1, confidence: 6.80,
|
||||
time_horizon: "12h", sim_type: "sociological" }` — herd-panic index (0–10).
|
||||
`{ value: 0.42, lower_bound: 0.31, upper_bound: 0.55, confidence: 0.72,
|
||||
`{ value: 0.42, lower_bound: 0.31, upper_bound: 0.55, confidence: 7.20,
|
||||
time_horizon: "1w", sim_type: "sociological" }` — fraction of pops in "contrarian" strategy.
|
||||
`{ value: "promotion", lower_bound: null, upper_bound: null, confidence: 0.61,
|
||||
`{ value: "promotion", lower_bound: null, upper_bound: null, confidence: 6.10,
|
||||
time_horizon: "current", sim_type: "sociological" }` — pump-and-dump phase detection.
|
||||
`{ value: 0.78, lower_bound: 0.65, upper_bound: 0.88, confidence: 0.70,
|
||||
`{ value: 0.78, lower_bound: 0.65, upper_bound: 0.88, confidence: 7.00,
|
||||
time_horizon: "30d", sim_type: "sociological" }` — MFG equilibrium stability index.
|
||||
Models span multiple horizons — e.g. replicator dynamics runs hourly through annual; MFG
|
||||
produces weekly equilibria and 5-year stationary states. The table shows primary assignments.
|
||||
- **Prediction types:** `sentiment_index`, `herd_threshold`, `strategy_distribution`,
|
||||
`cascade_probability`, `coordination_stability`, `opinion_cluster_count`,
|
||||
`pump_dump_phase`, `mfg_equilibrium_stability`, `narrative_regime`.
|
||||
|
||||
@@ -13,7 +13,8 @@ simulation parameterization C1.
|
||||
|
||||
## 3. Language & location
|
||||
TBD · `src/economy/sims/amm/`. Needs precise fixed-point or arbitrary-precision arithmetic for
|
||||
invariant calculations (Solidity-equivalent precision). Python, Rust, or Julia.
|
||||
invariant calculations. Solidity for on-chain-equivalent precision; Julia or Octave for
|
||||
analytical models.
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** simulate constant-product pools with fee parameter $\gamma$:
|
||||
@@ -27,9 +28,9 @@ invariant calculations (Solidity-equivalent precision). Python, Rust, or Julia.
|
||||
## 5. Interface contract
|
||||
- Implements `query(PredictionQuery) -> BoundedPrediction` per M3 hub.
|
||||
- **Output bounds:** IL ranges and pool return intervals.
|
||||
Example: `{ value: -0.034, lower_bound: -0.058, upper_bound: -0.012, confidence: 0.90,
|
||||
Example: `{ value: -0.034, lower_bound: -0.058, upper_bound: -0.012, confidence: 9.00,
|
||||
time_horizon: "7d", sim_type: "amm_liquidity" }` — projected impermanent loss for ETH/USDC pool.
|
||||
Example: `{ value: 0.082, lower_bound: 0.041, upper_bound: 0.127, confidence: 0.85,
|
||||
Example: `{ value: 0.082, lower_bound: 0.041, upper_bound: 0.127, confidence: 8.50,
|
||||
time_horizon: "30d", sim_type: "amm_liquidity" }` — net LP return (fees − IL).
|
||||
- **Time-horizon mapping** (all run concurrently, tick-advanced, 90:1 (1s wall = 90s sim)):
|
||||
| Horizon | Primary models | Update cadence |
|
||||
|
||||
@@ -19,9 +19,9 @@ optimization C3 (emerging — SMFRL solvers); Kolokoltsov adversarial C3 (non-li
|
||||
WENO discretization established but crypto application novel). Parameterization C1.
|
||||
|
||||
## 3. Language & location
|
||||
TBD · `src/economy/sims/mev/`. Needs combinatorial optimization (PuLP/OR-Tools for knapsack),
|
||||
TBD · `src/economy/sims/mev/`. Needs combinatorial optimization (OR-Tools for knapsack),
|
||||
continuous-time auction modeling, PDE solvers (WENO for shock-capturing in adversarial dynamics),
|
||||
and bilevel optimization (DSMFG). Python, Rust, or Julia.
|
||||
and bilevel optimization (DSMFG). Julia, Fortran, or C++.
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** simulate Priority Gas Auctions where multiple searcher bots compete for the same
|
||||
@@ -57,11 +57,11 @@ and bilevel optimization (DSMFG). Python, Rust, or Julia.
|
||||
| Annual | Kolokoltsov adversarial long-run dynamics | Monthly roll |
|
||||
| 5-year | Structural MEV regime shifts, protocol-level policy effects | Quarterly roll |
|
||||
- Examples:
|
||||
`{ value: 0.23, lower_bound: 0.11, upper_bound: 0.38, confidence: 0.80,
|
||||
`{ value: 0.23, lower_bound: 0.11, upper_bound: 0.38, confidence: 8.00,
|
||||
time_horizon: "next_block", sim_type: "mev_adversarial" }` — sandwich probability.
|
||||
`{ value: 14.7, lower_bound: 8.2, upper_bound: 22.5, confidence: 0.75,
|
||||
`{ value: 14.7, lower_bound: 8.2, upper_bound: 22.5, confidence: 7.50,
|
||||
time_horizon: "next_block", sim_type: "mev_adversarial" }` — optimal gas bid (gwei).
|
||||
`{ value: 0.034, lower_bound: 0.018, upper_bound: 0.052, confidence: 0.82,
|
||||
`{ value: 0.034, lower_bound: 0.018, upper_bound: 0.052, confidence: 8.20,
|
||||
time_horizon: "1h", sim_type: "mev_adversarial" }` — cross-chain arb profit (ETH).
|
||||
- **Prediction types:** `sandwich_probability`, `frontrun_risk`, `optimal_gas_bid`,
|
||||
`block_inclusion_probability`, `mev_exposure`, `cross_chain_arb_profit`,
|
||||
|
||||
@@ -21,7 +21,7 @@ composable yield optimization C4 (Yearn v3, Beefy, production-validated). Specif
|
||||
## 3. Language & location
|
||||
TBD · `src/economy/sims/tokenomics/`. Needs SDE solvers (Euler-Maruyama, Milstein),
|
||||
state-space estimation, and VAR (vector autoregression) for credit exposure impulse responses.
|
||||
Julia (DifferentialEquations.jl), Python (scipy), or Octave.
|
||||
Julia (DifferentialEquations.jl) or Octave.
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** simulate token state dynamics via the SDE framework:
|
||||
@@ -59,13 +59,13 @@ Julia (DifferentialEquations.jl), Python (scipy), or Octave.
|
||||
| Annual | Halving/burn policy impacts, inflation trajectory | Monthly roll |
|
||||
| 5-year | Token supply long-run equilibrium, protocol lifecycle | Quarterly roll |
|
||||
- Examples:
|
||||
`{ value: 2.1, lower_bound: 1.4, upper_bound: 3.2, confidence: 0.90,
|
||||
`{ value: 2.1, lower_bound: 1.4, upper_bound: 3.2, confidence: 9.00,
|
||||
time_horizon: "90d", sim_type: "tokenomics_macro" }` — annualized inflation rate (%).
|
||||
`{ value: 0.67, lower_bound: 0.58, upper_bound: 0.74, confidence: 0.85,
|
||||
`{ value: 0.67, lower_bound: 0.58, upper_bound: 0.74, confidence: 8.50,
|
||||
time_horizon: "30d", sim_type: "tokenomics_macro" }` — staking ratio.
|
||||
`{ value: 0.83, lower_bound: 0.78, upper_bound: 0.91, confidence: 0.88,
|
||||
`{ value: 0.83, lower_bound: 0.78, upper_bound: 0.91, confidence: 8.80,
|
||||
time_horizon: "1h", sim_type: "tokenomics_macro" }` — Aave ETH utilization rate.
|
||||
`{ value: 0.12, lower_bound: 0.04, upper_bound: 0.25, confidence: 0.72,
|
||||
`{ value: 0.12, lower_bound: 0.04, upper_bound: 0.25, confidence: 7.20,
|
||||
time_horizon: "7d", sim_type: "tokenomics_macro" }` — systemic contagion risk index.
|
||||
- **Prediction types:** `supply_trajectory`, `inflation_rate`, `staking_ratio`,
|
||||
`velocity_estimate`, `halving_impact`, `treasury_runway`, `utilization_rate`,
|
||||
|
||||
@@ -15,7 +15,7 @@ simulation parameterization C1.
|
||||
|
||||
## 3. Language & location
|
||||
TBD · `src/economy/sims/consensus/`. Needs Markov chain solvers and game-theoretic equilibrium
|
||||
computation. Python, Julia, or R.
|
||||
computation. Julia, R, or Fortran.
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** simulate validator populations where honesty evolves via **evolutionary game theory**
|
||||
@@ -34,10 +34,10 @@ computation. Python, Julia, or R.
|
||||
## 5. Interface contract
|
||||
- Implements `query(PredictionQuery) -> BoundedPrediction` per M3 hub.
|
||||
- **Output bounds:** equilibrium stability ranges and yield intervals.
|
||||
Example: `{ value: 0.89, lower_bound: 0.82, upper_bound: 0.94, confidence: 0.88,
|
||||
Example: `{ value: 0.89, lower_bound: 0.82, upper_bound: 0.94, confidence: 8.80,
|
||||
time_horizon: "7d", sim_type: "consensus_staking" }` — fraction of validators honest in
|
||||
equilibrium.
|
||||
Example: `{ value: 4.2, lower_bound: 3.6, upper_bound: 5.1, confidence: 0.82,
|
||||
Example: `{ value: 4.2, lower_bound: 3.6, upper_bound: 5.1, confidence: 8.20,
|
||||
time_horizon: "30d", sim_type: "consensus_staking" }` — annualized staking yield (%).
|
||||
- **Time-horizon mapping** (all run concurrently, tick-advanced, 90:1 (1s wall = 90s sim)):
|
||||
| Horizon | Primary models | Update cadence |
|
||||
|
||||
@@ -16,8 +16,8 @@ Kurz CMC thesis). DEX-specific microstructure C2 (emerging). Implementation C1.
|
||||
|
||||
## 3. Language & location
|
||||
TBD · `src/economy/sims/microstructure/`. Needs high-frequency data handling, event-driven
|
||||
simulation, and Riccati equation solvers for optimal execution trajectories. Rust, C++, or
|
||||
Python with optimized event loop.
|
||||
simulation, and Riccati equation solvers for optimal execution trajectories. C++, Fortran,
|
||||
or Julia.
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** simulate order flow across venues (DEXs and CEXs); model bid-ask spread dynamics as a
|
||||
@@ -46,11 +46,11 @@ Python with optimized event loop.
|
||||
| Annual | Microstructure regime (DEX vs CEX share evolution) | Monthly roll |
|
||||
| 5-year | Venue topology evolution, structural impact trends | Quarterly roll |
|
||||
- Examples:
|
||||
`{ value: 0.0034, lower_bound: 0.0018, upper_bound: 0.0052, confidence: 0.85,
|
||||
`{ value: 0.0034, lower_bound: 0.0018, upper_bound: 0.0052, confidence: 8.50,
|
||||
time_horizon: "next_trade", sim_type: "market_microstructure" }` — slippage (%) for 10 ETH.
|
||||
`{ value: 12400, lower_bound: 8200, upper_bound: 18600, confidence: 0.78,
|
||||
`{ value: 12400, lower_bound: 8200, upper_bound: 18600, confidence: 7.80,
|
||||
time_horizon: "1h", sim_type: "market_microstructure" }` — depth (USD) within 50bps.
|
||||
`{ value: [0.3, 0.3, 0.2, 0.1, 0.1], lower_bound: null, upper_bound: null, confidence: 0.80,
|
||||
`{ value: [0.3, 0.3, 0.2, 0.1, 0.1], lower_bound: null, upper_bound: null, confidence: 8.00,
|
||||
time_horizon: "30min", sim_type: "market_microstructure" }` — Almgren-Chriss optimal execution
|
||||
schedule (fraction per 6-min bucket for 100 ETH sell).
|
||||
- **Prediction types:** `slippage_estimate`, `spread_forecast`, `depth_profile`,
|
||||
|
||||
Reference in New Issue
Block a user