FCM cost estimate framework — 2022 bear market#1
Open
0xLisanAlGaib wants to merge 5 commits into
Open
Conversation
Made-with: Cursor
…High Tide vs AAVE` • exploration based on `main` commit `ba544b11514139737cfc594eae6ef1113faa43e3` Simulation edits • File `sim_tests/archive_tests/balanced_scenario_monte_carlo.py` - broken Import stub removed - btc_final_price restored from $90_000.0 (broken end value) → 76_342.50 (−23.66%, scenario in primer) - simulation order flipped (lines 425–431): makes Aave result deterministic independent of High Tide's internal PRNG usage; flipped order improves match with primer results. Existing comments indicate that this might have been the intended order anyway. • File 2: `tidal_protocol_sim/agents/aave_agent.py`: bypass scaling bug in MOET:BTC pool ; Fix: liquidator provides debt repayment directly as in real-world aave Further reading • sims-review_commit-da4cbf9/DISCREPANCY-ANALYSIS_balanced_scenario_monte_carlo.md • sims-review_commit-ba544b1/PRIMER-COMPATIBLE_balanced_scenario_monte_carlo.md
… floating-point shortcut (commit `48a9ff2`) eliminated real AMM friction, making HT rebalancing costs artificially zero
- Add HC/SR/ER transaction counters and per-event rebalance log to HighTideAgent - Add hourly HF history recording at every health-check slot - Add FCM operational params to FullYearSimConfig (check frequency, max cycles, disable deleveraging) - Add run_cost_estimate_2022.py: single-agent 2022 simulation with FlowCreditMarket.cdc thresholds (ER 1.5 / SR 1.1 / target 1.3) - Add plot_cost_estimate_report.py: two figures (BTC+HF dashboard with continuous HF line and rebalance arrows; event analytics with transition bar chart and broken y-axis HF distribution) - Add generate_cost_table.py: cost estimate table with symbolic placeholders (c_hc, c_sr, c_er) - Add COST_ESTIMATE.md: full framework documentation including simulation results (8,748 HC / 8 SR / 3 ER, 0 liquidations) Results: 8,748 × c_hc + 8 × c_sr + 3 × c_er over 365 days, 100% survival
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HighTideAgent, using FlowCreditMarket.cdc thresholds (ER trigger 1.5 / SR trigger 1.1 / target HF 1.3)COST_ESTIMATE.mddocumenting the framework, methodology, and resultsResults
Cost formula:
8,748 × c_hc + 8 × c_sr + 3 × c_er0 liquidations. 100% survival. Final HF 1.228.
How to run
Test plan
run_cost_estimate_2022.pyand verify 0 liquidations, N_total ≤ 8,760plot_cost_estimate_report.pyand verify both figures generate without errorgenerate_cost_table.pyand verify CSV and PNG are written to results folder