Lp Math
AMM liquidity provision mathematics including constant-product, concentrated liquidity, price impact, and LP share calculations
Install
/plugin marketplace add agiprolabs/claude-trading-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add agiprolabs/claude-trading-skills --skill lp-mathgit clone --depth 1 https://github.com/agiprolabs/claude-trading-skills.git /tmp/claude-trading-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-trading-skills/skills/lp-math ~/.claude/skills/lp-mathPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# LP Math — AMM Liquidity Provision Mathematics Automated Market Makers (AMMs) replace traditional orderbooks with liquidity pools. Instead of matching buyers and sellers, a mathematical formula determines prices based on reserve ratios. Liquidity providers (LPs) deposit both assets into a pool and earn fees from every trade. Understanding the math behind AMMs is essential for: - Evaluating whether providing liquidity is profitable after impermanent loss - Estimating price impact before executing large trades - Comparing capital efficiency across pool types (constant product vs concentrated) - Calculating expected fee revenue for a given pool position **Related skills**: See `impermanent-loss` for IL calculations, `yield-analysis` for LP yield modeling, `liquidity-analysis` for pool depth assessment. --- ## 1. Constant Product AMM (xy = k) The foundational AMM model used by Raydium V4 and most Solana DEXes. ### Core Invariant ``` x * y = k ``` Where: - `x` = reserve amount of token X (e.g., SOL) - `y` = reserve amount of token Y (e.g., USDC) - `k` = constant product (increases over time from fees) ### Spot Price ``` P = x / y (price of Y in terms of X) P = y / x (price of X in terms of Y) ``` For a pool with 100 SOL and 10,000 USDC: price of SOL = 10,000 / 100 = 100 USDC. ### Trade Execution When a trader swaps Δx of token X into the pool:
Details
- Skill name
lp-math- Repository
- agiprolabs/claude-trading-skills
- Path
skills/lp-math/SKILL.md- License
- MIT
- Repo updated
- 3 September 2026
FAQ
What does the Lp Math skill do?
AMM liquidity provision mathematics including constant-product, concentrated liquidity, price impact, and LP share calculations
How do I install the Lp Math skill?
Claude Code plugin: /plugin marketplace add agiprolabs/claude-trading-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Lp Math popular?
It lives in agiprolabs/claude-trading-skills, which has 564 GitHub stars and 113 forks.
Related skills
Backtrader
564agiprolabs/claude-trading-skills
Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators
Birdeye API
564agiprolabs/claude-trading-skills
Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity
Coingecko API
564agiprolabs/claude-trading-skills
Broad crypto market data from CoinGecko covering 13,000+ tokens. Global market stats, historical price data going back years, exchange volumes, trending tokens, and category filters. Best for macro analysis and long-term historical data.
Market Microstructure
564agiprolabs/claude-trading-skills
DEX orderflow analysis, trade classification, buyer/seller pressure, and microstructure signals for Solana tokens
Liquidity Analysis
564agiprolabs/claude-trading-skills
DEX liquidity depth assessment, slippage estimation, and pool composition analysis for Solana tokens
Ohlcv Processing
564agiprolabs/claude-trading-skills
Market data preparation including OHLCV resampling, gap handling, anomaly detection, normalization, and multi-source merging
Browse the most popular Claude skills, all other skills, or write your own with the skills generator.