DeFi Quant Yield & Risk Engine

io.github.Pyrochem由 GitHub 帳號 Pyrochem 發布v1.0.6更新於 Nov 6, 2026

Quantitative DeFi carry ROE, borrow kink slippage & risk simulation across 6 protocols.

已驗證STDIO僅桌面金融資料與分析

概覽

AI 產生的概覽

本機 MCP 伺服器,提供 7 個 DeFi 量化工具,用於穩定幣收益、槓桿 carry 的 ROE,以及跨 6 個協議的交易前借貸與兌換滑價模擬。

可以做什麼
  • 掃描穩定幣收益,比較 sUSDe 與 sUSDS 報酬與最低 USDC 借貸利率,並計算槓桿循環 ROE 與損益兩平利差
  • 模擬 Morpho Blue 借貸 APY 在 90% AdaptiveCurveIRM 轉折點的滑價與交易後使用率
  • 建模 Ethena sUSDe 8 小時 epoch 的線性釋出與大額存入造成的 APY 稀釋
  • 解析 Fluid LiquidityLayer 的位元打包儲存槽並計算交易後利率影響
  • 計算 Sky sUSDS 的每秒連續複利及相對 Morpho 借貸成本的槓桿 carry
  • 稽核 Euler V2 金庫上限與 EVC 子帳戶,並分析 Pendle V2 logit 曲線、TWAP 與 PT 兌換滑價
適用情境
適合讓助理回答穩定幣 carry、循環槓桿、借貸利率轉折點滑價、epoch 稀釋或固定收益偏離等量化 DeFi 問題,且需要交易後的模擬數值而非靜態快照時使用。
執行需求
透過 npx 以 stdio 在本機執行(需 Node.js)。需在 RAPIDAPI_KEY 環境變數提供 RapidAPI 金鑰以取得鏈上 RPC 即時資料;README 另設有 RAPIDAPI_HOST 變數。文中提到 RapidAPI 有每月 50 次請求的免費額度。僅支援桌面用戶端設定。
安裝前請注意
需要第三方 RapidAPI 金鑰,鏈上查詢會傳送至該託管 API,用量受其配額限制。模擬結果僅為交易前估算而非保證;伺服器本身不執行交易,但依其收益或滑價數據操作仍有財務風險。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 DeFi Quant Yield & Risk Engine,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

DeFi Quant MCP Server (defi-quant-mcp-server)

This repository contains the official open-source Model Context Protocol (MCP) server implementation for the DeFi Quant suite. Built with @modelcontextprotocol/sdk and Zod schema validation, it exposes 7 native DeFi yield, leveraged carry, and pre-trade risk simulation tools directly to AI agents (Claude Desktop, Cursor, Windsurf, and autonomous trading agents).

Unlike read-only DeFi wrappers that only return static historical snapshots, this MCP server performs pre-execution smart contract state simulations across Morpho Blue, Ethena (sUSDe), Fluid Protocol, Sky Protocol (sUSDS), Euler V2 (EVK/EVC), and Pendle V2.


Example AI Prompts This Server Solves

Once connected to Claude Desktop or Cursor, your AI agent can autonomously answer complex quantitative DeFi questions:

  • Cross-Protocol Yield & Looping: "Where is the highest leveraged stablecoin carry right now between Ethena sUSDe and Sky sUSDS, and is it cheaper to borrow USDC on Morpho Blue, Fluid, or Euler V2 at 5x leverage?"
  • Morpho Blue Kink Slippage: "What happens to the borrow APY on the Morpho wstETH/USDC market if I borrow an extra $2,000,000? Does it push utilization past the 90% AdaptiveCurveIRM kink?"
  • Ethena Epoch Dilution: "How much unvested USDe is left in Ethena's current 8-hour epoch, and how much will the sUSDe APY drop if a whale deposits $25M right now?"
  • Fluid Bit-Packed State: "Unpack the Fluid LiquidityLayer 256-bit storage slot for USDC and calculate post-trade utilization after a $2M borrow."
  • Pendle V2 Fixed Yield & TWAP Divergence: "Compare Pendle's Spot Implied Fixed APY against the 15-minute PT Oracle TWAP, and simulate the implied yield slippage on a $1M PT swap."
  • Euler V2 Vault & Sub-Account Audits: "Decode the uint16 supply/borrow caps on the Euler V2 Prime USDC vault and check active EVC sub-account bitmaps."

Native MCP Tools Included (7 Tools)

  1. scan_stablecoin_yield_arbitrage_radar — Compares live stablecoin yields (sUSDe, sUSDS) against the cheapest USDC borrow rates (Morpho Blue, Fluid, Euler V2) and calculates net leveraged loop ROE and breakeven borrow spreads.
  2. simulate_morpho_blue_kink_slippage — Reads live Morpho Blue market state (borrowShares, totalSupplyAssets) and simulates post-trade borrow APY slippage across the 90% AdaptiveCurveIRM kink.
  3. simulate_ethena_susde_vesting_dilution — Queries Ethena getUnvestedAmount() linear 8-hour epoch decay and models post-deposit APY dilution.
  4. unpack_fluid_liquidity_layer_state — Unpacks Fluid Protocol's 56|8 BigMath bit-packed storage slots into human-readable supply/borrow liquidity, utilization, and post-trade rate impact.
  5. simulate_sky_susds_leveraged_carry — Computes continuous RAY ($10^{27}$) per-second ssr/chi compounding for Sky sUSDS against Morpho USDC borrow costs.
  6. audit_euler_v2_vault_and_evc_subaccounts — Decodes Euler V2 compact floating-point mantissa/exponent caps, simulates IRM kink slippage, and scans EVC 256-bit XOR sub-accounts (0..3).
  7. analyze_pendle_v2_logit_curve_and_twap — Reads Pendle V2 MarketState logit curve parameters (scalarRoot, lnFeeRateRoot), compares Spot Implied APY vs. PT Oracle TWAP, and simulates PT swap slippage.

Quick Start (Claude Desktop / Cursor Configuration)

  1. Grab a free API key from the DeFi Quant Multi-Protocol Yield & Risk API on RapidAPI (includes a Free $0/mo Basic Tier with 50 requests/month).
  2. Add the following block to your claude_desktop_config.json or .cursor/mcp.json:
json
{  "mcpServers": {    "defi-quant": {      "command": "npx",      "args": ["-y", "defi-quant-mcp-server"],      "env": {        "RAPIDAPI_KEY": "YOUR_RAPIDAPI_KEY",        "RAPIDAPI_HOST": "defi-quant-multi-protocol-yield-risk-api.p.rapidapi.com"      }    }  }}

來源:README.md,提交 6e43a48

工具

7

scan_stablecoin_yield_arbitrage_radar

Use this tool when a user asks where to find the best DeFi stablecoin yield, how to loop stablecoins for leveraged carry, or wants to compare Ethena sUSDe and Sky sUSDS yields against the cheapest USDC borrow rates across Morpho Blue, Fluid, and Euler V2.

輸入參數leverage

simulate_morpho_blue_kink_slippage

Use this tool when a user wants to check Morpho Blue borrow rates, market utilization, or simulate how a large borrow or loop position will impact the 90% AdaptiveCurveIRM kink and push up post-trade borrow APY.

輸入參數marketIdsimBorrowDelta

simulate_ethena_susde_vesting_dilution

Use this tool when a user asks about Ethena sUSDe real-time APY, 8-hour epoch reward vesting (`getUnvestedAmount`), or how a large whale deposit into the sUSDe staking contract will dilute the current yield.

輸入參數simDepositUSDe

unpack_fluid_liquidity_layer_state

Use this tool when a user asks about Fluid Protocol USDC borrow/supply rates, needs to decode Fluid's 256-bit BigMath storage slots (`exchangePricesAndConfig`), or wants to simulate post-trade utilization on Fluid.

輸入參數tokenAddresssimBorrowDelta

simulate_sky_susds_leveraged_carry

Use this tool when a user asks about Sky Protocol (MakerDAO) sUSDS savings rate, continuous per-second RAY compounding (`ssr` and `chi`), or wants to calculate leveraged sUSDS/USDC loop ROE and breakeven borrow rates on Morpho.

輸入參數leverageborrowRateOverride

audit_euler_v2_vault_and_evc_subaccounts

Use this tool when a user wants to audit an Euler V2 (EVK) vault, decode uint16 compact floating-point supply/borrow caps, simulate Euler IRM borrow kink slippage, or inspect Ethereum Vault Connector (EVC) 256-bit XOR sub-account bitmaps.

輸入參數vaultAddressaccountAddresssimBorrowDelta

analyze_pendle_v2_logit_curve_and_twap

Use this tool when a user asks about Pendle V2 fixed yields (PT/YT), wants to compare Spot Implied APY against the 15-minute geometric PT Oracle TWAP, or needs to simulate how a large PT trade impacts the logit AMM curve (`scalarRoot`, `lnFeeRateRoot`).

輸入參數marketAddresssimPtTradeSize

版本歷史

2
  1. v1.0.6最新Nov 6, 2026
  2. v1.0.3Nov 5, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分