
Crypto-DeFi Calc
DeFi Calc computes key DeFi and crypto metrics: impermanent loss for liquidity pools, APY/APR conversions, token vesting schedules, staking rewards, gas estimation, portfolio P&L tracking, and DCA simulations. Crypto developers, traders, and quantitative analysts use it to model risks and returns in blockchain apps. Real-world uses include optimizing liquidity provision and forecasting investment outcomes.
Overview
DeFi Calc is an MCP server that handles precise mathematical computations for DeFi and cryptocurrency protocols. It processes formulas for common financial scenarios in blockchain environments, enabling programmatic access to metrics like impermanent loss and DCA returns without manual spreadsheets.
Key Capabilities
- impermanent_loss: Computes price-based impermanent loss in automated market makers (AMMs) given pool ratios and token prices.
- apy_apr_conversion: Converts between annual percentage yield (APY) and annual percentage rate (APR), accounting for compounding.
- token_vesting: Models linear or cliff-based token vesting schedules, outputting unlock amounts over time.
- staking_rewards: Calculates rewards from staking, including compounding and inflation adjustments.
- gas_estimation: Estimates Ethereum or EVM-chain gas costs for transactions based on calldata and network conditions.
- portfolio_pnl: Tracks profit and loss for crypto portfolios using historical prices and holdings.
- dca_simulation: Simulates dollar-cost averaging strategies, projecting returns under varying price paths.
Use Cases
- A DeFi developer queries impermanent_loss to integrate risk warnings into a liquidity dashboard, comparing pool performance across Uniswap v3 ranges.
- A trader runs dca_simulation and staking_rewards to evaluate long-term yield farming strategies on Aave or Compound.
- Protocol builders use gas_estimation and apy_apr_conversion for frontend cost displays and yield comparisons.
- Analysts apply portfolio_pnl and token_vesting to audit advisor allocations in venture token sales.
Who This Is For
Target users include blockchain developers building DeFi UIs, quantitative traders scripting strategies, crypto portfolio managers, and protocol engineers needing embedded financial math. It suits teams working with EVM chains who require reliable, API-accessible calculations.