Skip to main content

AMM Exit Liquidity & Slippage Calculator

On decentralized exchanges (Uniswap, PancakeSwap, Raydium), tokens with small liquidity pools suffer dramatic price impact on larger sell orders. In this recipe, you will learn how to use CrypTech’s sellability object to inspect simulated cashouts from $100 to $50,000 to determine if an exit order will execute cleanly or suffer catastrophic slippage.

Step 1: Install Axios


Step 2: Calculator Script (exit_calculator.ts)


Step 3: Output Preview

Running the script produces: