slippage-modeling

Installation
SKILL.md

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)
Related skills
Installs
50
GitHub Stars
20
First Seen
Mar 21, 2026