DeFi Yield, Carry & Borrow Kink Stress Tester

    1

    Quantitative stress-testing and ROE auditing for leveraged stablecoin carry loops across major DeFi protocols.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    DeFi Yield, Carry & Borrow Kink Stress Tester

    Example session with this skill installed

    Analyze a 5x leveraged sUSDS/USDC carry loop on Morpho Blue. I'm deploying $500,000 equity. Assume base Sky sUSDS supply yield is 11.5% and pre-trade USDC borrow APY is 7.2%. The target Morpho market has $25M total supply assets and $20.5M current borrows (82% utilization, 91.5% LLTV). Check post-trade borrow rate kink slippage across the 90% AdaptiveCurveIRM, calculate net ROE, and determine my liquidation buffer.

    • Read your context and instructions
    • Compiled the defi yield carry

    1. Executive Verdict: CAUTION (KINK BOUNDARY REACHED)

    The proposed 5x leveraged carry loop on Morpho Blue lands directly on the 90.0% AdaptiveCurveIRM Kink. While the initial carry spread is positive, your $2.0M borrow consumes 100% of the remaining pre-kink capacity. Any subsequent borrower will push pool utilization into the steep curve regime where borrow rates scale up to 4x.


    2. Strategy Analysis Scorecard

    MetricPre-TradePost-Trade (Simulated)Delta / Impact
    Strategy Setup5.0x Leveraged sUSDS / USDC—$500k Equity -> $2.5M Collateral
    Total Borrowed Debt (D)—$2,000,000 USDC(L - 1) * $500k
    Base Sky sUSDS Yield11.50%11.50%Continuous RAY compounding
    Morpho USDC Borrow APY7.20%7.20%At 90.00% target utilization
    Net Leveraged ROE—28.70%r_supply + (L - 1) * (r_supply - r_borrow)
    Breakeven Borrow Rate—14.38%(L * r_supply) / (L - 1) [Buffer: +7.18%]

    3. Kink & Liquidity Stress Test

    • Pool Utilization (U):
      U_before = $20.50M / $25.00M = 82.00%
      U_after = ($20.50M + $2.00M) / $25.00M = 90.00%

    • Distance to Kink: 0.00% (The $2.00M borrow exactly exhausts the 90.0% target utilization threshold).

    • Max Safe Deployment: $0.00 remaining before entering the post-kink exponential penalty zone.

    • Post-Kink Sensitivity: An additional $250k borrow by another looper pushes utilization to 91.0%, spiking borrow APY from 7.20% to ~9.36% and compressing net ROE from 28.70% to 20.06%.


    4. Liquidation & Depeg Margin of Safety

    • Market LLTV: 91.50%

    • Loop Position LTV (L = 5.0x):
      LTV_0 = (L - 1) / L = 4 / 5 = 80.00%

    • Liquidation Drawdown Buffer:
      Drawdown_liq = 1 - (LTV_0 / LLTV) = 1 - (0.8000 / 0.9150) = 12.57%
      (The position can withstand a 12.57% price depeg of sUSDS relative to USDC before liquidation is triggered).


    Recommended Execution Guardrails

    1. Reduce Borrow Size or Stagger Entry: Consider an initial 4x loop ($1.5M borrow) to leave a $500k cushion (2.0% utilization margin) below the 90% kink.
    2. Automate Continuous State Monitoring: Wire defi-quant-mcp-server into your agent's execution loop (simulate_morpho_blue_kink_slippage) to poll pool utilization before each rebalance.
    3. Cross-Check Fluid & Euler V2: Query unpack_fluid_liquidity_layer_state to verify if Fluid's liquidity layer provides lower borrow rate slippage for this $2M deployment.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Stablecoin yield strategies often collapse when capital deployment pushes borrow utilization past an interest rate model (IRM) kink. This skill equips AI coding agents with a deterministic quantitative framework to audit leveraged carry loops, stress-test borrow rate kink slippage, and calculate exact liquidation buffers across Morpho Blue, Ethena, Fluid, Sky, Euler V2, and Pendle V2.

    What it does

    • Leveraged ROE & Carry Radar: Computes net return on equity (1x–10x) and positive carry buffers for stablecoin loops across Morpho Blue, Ethena, Fluid, Sky, and Euler V2.
    • Kink Stress-Testing: Simulates how specific borrow sizes shift pool utilization across the 90% AdaptiveCurveIRM kink and drive post-trade borrow rate spikes.
    • Breakeven Rate Analysis: Calculates the exact borrow threshold where net carry drops to zero, establishing pre-trade safety margins.
    • Yield Dilution & Epoch Vesting: Models Ethena sUSDe 8-hour linear reward vesting decay and whale deposit dilution alongside Sky sUSDS continuous RAY compounding.
    • Euler V2 & Fluid State Audits: Inspects Euler V2 uint16 compact supply/borrow caps, EVC sub-account bitmaps, and unpacks Fluid 256-bit BigMath storage slots.
    • Pendle Curve & TWAP Auditing: Compares Spot Implied APY against the 15-minute geometric PT Oracle TWAP to quantify logit curve trade slippage.

    How it works

    1. Telemetry Check: Detects whether defi-quant-mcp-server tools are loaded in the agent environment.
    2. Deterministic Modeling: If MCP tools are absent, computes baseline carry spreads, kink jumps, and liquidation drawdown buffers using local mathematical formulas.
    3. 4-Stage Stress Protocol: Evaluates carry buffers, IRM kink distance, epoch vesting decay, and oracle TWAP divergence in sequence.
    4. Structured Scorecard: Outputs a deployment verdict (DEPLOY, CAUTION, or REJECT) alongside clear carry and leverage matrices.

    Supported Protocols

    • Morpho Blue (AdaptiveCurveIRM 90% kink utilization)
    • Ethena (sUSDe 8-hour linear epoch vesting)
    • Fluid Protocol (Liquidity Layer 56|8 BigMath state)
    • Sky Protocol (sUSDS continuous RAY compounding)
    • Euler V2 (EVK vault caps and EVC sub-accounts)
    • Pendle V2 (MarketState logit curve AMM & PT Oracle TWAP)

    Why this beats standard prompting

    Generic LLMs cannot compute multi-step financial math without hallucinating exponential curves or compounding rates. This skill enforces deterministic equations for post-trade borrow slippage, capital capacity, and liquidation margins, preventing positions that look profitable on paper from failing during execution.

    Example Use Cases

    • Model a 5x leveraged sUSDe/USDC loop on Morpho Blue to calculate net ROE and the liquidation price drawdown threshold.
    • Stress-test how an additional $2M USDC borrow impacts Fluid Protocol's liquidity layer and shifts borrow APR.
    • Audit Ethena's unvested USDe epoch reward pool and simulate APY dilution from a $25M whale deposit.
    • Compare fixed-yield PT-sUSDe on Pendle V2 against variable Euler V2 USDC borrow costs before locking capital.

    Prerequisites & Notes

    • Runs natively inside Claude Code, Cursor, Windsurf, and other MCP-compatible environments.
    • Operates offline using standard protocol formulas, or pairs with the open-source defi-quant-mcp-server (npx defi-quant-mcp-server) for automated on-chain RPC reads.
    • Analytical and pre-trade simulation only; does not execute transactions or require private keys.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Web3 & Crypto.

    • Simulation & Analytics Scope: Designed exclusively for pre-trade modeling, mathematical stress-testing, and risk scoring. Does not sign transactions, hold private keys, or manage wallet custody.
    • Telemetry Modes: Executes complete mathematical leverage, kink slippage, and liquidation audits offline via bundled formulas; live on-chain contract state reads optionally pair with npx defi-quant-mcp-server.
    • Strategy Focus: Optimized for yield-bearing carry assets (sUSDe, sUSDS, PT tokens) and stablecoin borrow markets; liquidation buffer math models collateral depeg and asset drawdown risks, but does not provide dynamic impermanent loss modeling for volatile constant-product AMM pools (e.g., Uniswap v2/v3 xy=k).

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 11 days ago

    • Free with an Agensi account

    Software
    Defi Quant MCPNode.js

    Permissions

    No special permissions declared or detected

    Listed11 days ago

    What's inside

    Frequently Asked Questions

    It audits "kink risk," where capital deployment pushes pool utilization past an interest rate model (IRM) threshold (such as Morpho Blue's 90% kink), triggering steep borrow rate scaling. The skill computes post-trade borrow APR, net leveraged ROE, and liquidation drawdown headroom so you know whether a position remains profitable before executing.

    No. The skill is self-contained and includes offline deterministic mathematical formulas (references/formulas.md) to calculate leverage spreads, breakeven rates, and liquidation buffers. For automated, real-time on-chain RPC reads across all 6 protocols, it pairs seamlessly with the open-source defi-quant-mcp-server via npx.

    Yes. It models protocol-specific mechanics, including Ethena sUSDe 8-hour linear reward vesting epochs, whale deposit dilution, Sky sUSDS continuous RAY compounding, and Pendle V2 Spot Implied APY vs. 15-minute PT Oracle TWAP divergence to prevent logit curve slippage.

    You receive an executive deployment verdict (DEPLOY, CAUTION, or REJECT) alongside a structured risk scorecard: net leveraged ROE across 1x–10x, pre- vs. post-trade borrow APYs, exact distance to the 90% utilization kink, max safe capital deployment, and the collateral price drawdown percentage required to trigger liquidation.

    It supports Morpho Blue (AdaptiveCurveIRM), Ethena (sUSDe), Fluid Protocol (Liquidity Layer BigMath), Sky Protocol (sUSDS), Euler V2 (EVK vault caps and EVC sub-accounts), and Pendle V2 (MarketState logit curve AMM).

    New in Web3 & Crypto

    Free