slippage-modeling

Model execution costs for Solana DEX trades including price impact and fees.

266|54|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/agiprolabs/claude-trading-skills --skill slippage-modeling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: slippage-modeling
Source: https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/slippage-modeling
Command: npx skills add https://github.com/agiprolabs/claude-trading-skills --skill slippage-modeling

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpx, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps traders accurately estimate the true cost of executing trades on decentralized exchanges, including price impact, fees, and MEV, to make informed decisions about trade size and strategy.

Core Features & Use Cases

  • Slippage Estimation: Calculate price impact based on trade size and AMM liquidity.
  • Cost Modeling: Aggregate all execution costs (fees, priority fees, MEV) into a total cost.
  • Optimal Sizing: Determine the maximum trade size for a given slippage tolerance and recommend multi-tranche execution for large orders.
  • Use Case: Before executing a large buy order for a mid-cap token, use this Skill to understand the total cost in SOL, determine the optimal number of tranches to minimize slippage, and calculate the minimum price movement required to break even.

Quick Start

Estimate the execution cost for a 5 SOL buy trade of the token with mint address 'YOUR_TOKEN_MINT_ADDRESS'.

Frequently Asked Questions about slippage-modeling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate DEX slippage and price impact for large trades on Solana?

To calculate DEX slippage on Solana, you model price impact by evaluating trade size against AMM pool liquidity. This aggregates swap fees, priority fees, and MEV costs to estimate total execution cost in SOL.

What is the best way to minimize execution cost when buying mid-cap tokens on a DEX?

The best way to minimize execution cost on a DEX is to use optimal trade sizing and multi-tranche execution. Splitting large orders into smaller tranches reduces price impact and aggregate slippage.

How do I determine the optimal trade size for a given slippage tolerance on Solana AMMs?

You determine the optimal trade size by modeling AMM liquidity and calculating the exact price impact for your order. The skill recommends the maximum trade size that stays within your specified slippage tolerance.

Does this slippage modeling approach support TWAP execution strategies for DeFi trades?

Yes, this slippage modeling approach supports TWAP execution strategies for DeFi trades. It helps calculate break-even points and recommends multi-tranche execution to optimize large orders over time.

Can I estimate MEV costs and priority fees for a swap before executing the transaction?

Yes, you can estimate MEV costs and priority fees for a swap before execution. The skill quantifies these network conditions alongside swap fees to provide a complete cost modeling breakdown.

How do I calculate the minimum price movement required to break even on a roundtrip DEX trade?

You calculate the break-even minimum price movement by modeling the total execution cost of a roundtrip trade. This includes all slippage, fees, and MEV costs to determine the exact price appreciation needed for profitability.