← ClaudeAtlas

slippage-modelinglisted

Execution cost estimation, slippage curve modeling, and optimal trade sizing based on AMM liquidity depth
Serennity007/claude-trading-skills-67 · ★ 0 · AI & Automation · score 72
Install: claude install-skill Serennity007/claude-trading-skills-67
# Slippage Modeling Estimate execution costs, model slippage curves from AMM mechanics and empirical quotes, and determine optimal trade sizes that keep costs within acceptable thresholds. ## What Is Slippage? Slippage is the difference between the **expected price** at the time you decide to trade and the **actual execution price** you receive. On decentralized exchanges, slippage is deterministic and measurable — unlike CEX slippage, which depends on hidden order book dynamics. **Example**: You expect to buy a token at 0.001 SOL. Your trade executes at 0.00105 SOL. That 5% difference is slippage — it directly reduces your profit and increases your break-even threshold. ## Sources of Slippage ### 1. AMM Price Impact (Primary Source) Automated market makers use bonding curves that move price as liquidity is consumed. On a constant-product AMM (`x * y = k`): ``` price_impact = Δx / (x + Δx) ``` Where `x` is the reserve of the input token and `Δx` is your trade size. A 1 SOL trade against a pool with 100 SOL reserves produces ~1% price impact. Against 10 SOL reserves, it produces ~10%. See `references/slippage_math.md` for full derivations and CLMM adjustments. ### 2. DEX Fees Every swap incurs a fee taken from the trade: | DEX | Fee | Notes | |----------|-----------|--------------------------------| | Raydium | 0.25% | Standard AMM pools | | Orca | 0.30% | Whirlpool concentrated pools | | Meteora | 0.