Individual skill
lp-math
AMM liquidity provision mathematics including constant-product, concentrated liquidity, price impact, and LP share calculations
skills/lp-math/SKILL.md
Source commit 981e1d736cdc02bdc1c55c74ec9224e956414706
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Local scripts
- Last checked
- Nov 10, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 521
- Repository last updated
- Sep 3, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesSKILL.mdcore · 10,035 bytesreferences/amm_formulas.mddoc · 6,326 bytesreferences/pool_mechanics.mddoc · 6,417 bytesscripts/amm_calculator.pyruns · 20,504 bytesscripts/clmm_calculator.pyruns · 22,554 bytes
Read excerpt
# 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.
---