尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Stop-loss stress test of one day of hourly ETH data against illustrative Aave V3 and Morpho parameters.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Live: summer-fi-risk-analysis.vercel.app
This is an independent portfolio case study. A small Python model replays 24 hourly ETH price and gas observations for 5 August 2024 against static stop-loss buffers. It uses illustrative Aave V3 and Morpho parameters. A Next.js page lets a reader change the market, entry LTV and buffer and see the outcome. The repository is not affiliated with Summer.fi, Aave or Morpho.
All numbers come from data/aug_5_crash_data.csv and reports/sweep_results.csv.
scripts/risk_model.py holds a DeFiRiskModel. At each hourly row it computes LTV as debt / (collateral x price). It checks the liquidation threshold first, then the stop-loss trigger (threshold minus buffer). Gas does not change LTV. It adds slippage (0.1% + gas/100 x 0.5%, capped at 5%) and a fixed 300,000-gas cost to the modeled exit value. Only a static strategy exists. web-showcase/src/app/riskModel.ts mirrors the model for the interactive page, and tests/test_ts_parity.py checks that both give the same status, trigger hour and exit values. notebooks/aug5_analysis.ipynb plots the data and the sweep, with its executed output committed.
Needs Python 3.14 (the version tested; pandas==3.1.0 needs 3.11 or newer) and Node 22.18 or newer (the parity test runs the TypeScript model with Node's built-in type stripping). No network or keys are needed after install.
python3 -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
python -m pytest tests # 13 tests passed on 2026-10-24
python scripts/risk_model.py --combined-sweep # rewrites reports/sweep_results.csv (identical to the committed file)
python scripts/risk_model.py --protocol AaveV3 --ltv 0.70 --buffer 0.05
jupyter nbconvert --to notebook --execute notebooks/aug5_analysis.ipynb --stdout > /dev/null
cd web-showcase
npm ci
npm run lint && npm run build
npm run dev
data/: the 24-row hourly price and gas CSV.scripts/: the Python risk model and command-line entry point, plus the Node helper the parity test calls.tests/: 13 pytest tests: the Python model, and its agreement with the TypeScript model.notebooks/: plots of the data and the sweep.reports/: the sweep CSV and a written backtest report.web-showcase/: the Next.js case-study page and docs viewer.reports/backtest_report_aug5.md: assumptions, sweep counts and limits.CONSULTING_REPORT.md: the case-study write-up and recommendation.PROJECT_OVERSIGHT.md: scope notes for the workstream.The CSV is described as a "supplied scenario". Its source is not recorded in this repository, and I have not checked it against on-chain or exchange data. Treat the prices and gas values as illustrative inputs, not as a market record.
tests/test_ts_parity.py compares it with the Python model on the 50-run sweep grid and four off-grid inputs. It does not prove the two agree on every input./docs.MIT, see LICENSE. It covers this project's code, not the supplied scenario data, whose source is uncited.
Part of Rahil Bhavan's projects.