DeFi Quant Execution MCP
Exact Uniswap v3 Q64.96 tick math, MEV sandwich risk simulation, flashloan arbitrage profit modeling, and Base blob gas estimation.
Part of the WHAM ENGINE fleet of deterministic AI agent micro-services with automated Base L2 HTTP 402 (x402) USDC micropayments.
Tools Included in this Suite (5 Tools)
uniswap_v3_tick_math_precise: Arbitrary-precision Q64.96 fixed-point math calculator for Uniswap v3 square root price $(\sqrt{P})$, tick-to-price conversion, and exact liquidity fee compounding.
mev_sandwich_risk_simulator: Simulates pending swaps against Uniswap v3/v4 tick liquidity to compute exact MEV sandwich vulnerability, maximum extractable value, and safe slippage limits.
compute_uniswap_v3_quote: Calculates exact sqrtPriceX96 tick mathematics, price impact, and swap output amounts for concentrated liquidity pools on Base.
flashloan_arbitrage_profit_calculator: Calculates net arbitrage profit for multi-hop flashloans across Base L2 DEXes, factoring pool fee tiers, price impact, loan premium (0.09%), and gas burnt.
base_l2_blob_gas_price_projector: Evaluates EIP-4844 blob gas fee dynamics and Base L2 sequencing costs, projecting optimal block inclusion timing for transaction batch settlement.
Recommended Workflow
A trading agent identifies a potential arbitrage opportunity -> computes exact Q64.96 tick math across Uniswap v3 pools -> simulates MEV sandwich vulnerability -> projects Base L2 blob gas fees -> confirms net profitability before executing.
Quickstart Configuration
Add this server to your claude_desktop_config.json:
{
"mcpServers": {
"defi-quant-execution-mcp": {
"command": "npx",
"args": ["-y", "@whambammy/defi-quant-execution-mcp"],
"env": {
"PAYMENT_WALLET": "0x9793E7269b3301893318dEa8338576Ba612F39B3",
"BASE_RPC_URL": "https://mainnet.base.org"
}
}
}
}
Or connect the skill directly via Smithery:
smithery skill add whambammy/defi-quant-execution-mcp