Slippage Modeling

Execution cost estimation, slippage curve modeling, and optimal trade sizing based on AMM liquidity depth

564 stars 113 forksAI, LLMs & Agents Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add agiprolabs/claude-trading-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add agiprolabs/claude-trading-skills --skill slippage-modeling
Manual install
git 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/slippage-modeling ~/.claude/skills/slippage-modeling

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the 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)
```

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   |
Read the full skill on GitHub

Details

Skill name
slippage-modeling
Path
skills/slippage-modeling/SKILL.md
License
MIT
Repo updated
3 September 2026

FAQ

What does the Slippage Modeling skill do?

Execution cost estimation, slippage curve modeling, and optimal trade sizing based on AMM liquidity depth

How do I install the Slippage Modeling 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 Slippage Modeling popular?

It lives in agiprolabs/claude-trading-skills, which has 564 GitHub stars and 113 forks.

Related skills

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.