x402 Forge Upgrade your toolBundlesCatalog

Catalog / uniswap-v3-quote

Uniswap v3 swap quote and slippage check

Works out exactly what a Uniswap v3 swap will pay out from pool data you already read, and whether the price impact is within your limit.

Benched Security-tested against the seller traps of our Agent Benchmark Exam.

Buy $1.00

What it does

Offline exact quote for one Uniswap v3 pool swap (or a fork with the same math): from slot0 (sqrtPriceX96, tick), liquidity, fee and the initialized ticks with liquidityNet, it runs the v3-core swap loop with Q64.96 BigInt math (TickMath, SqrtPriceMath, SwapMath.computeSwapStep, word-by-word tick search) for exact_input or exact_output in either direction, with an optional sqrtPriceLimitX96. Returns amount_in, amount_out, fee, price after, ticks crossed, price impact in bps (v3-sdk Trade definition, fee included), amount_out_minimum = floor(out x (10000 - slippage_bps) / 10000) and amount_in_maximum = floor(in x (10000 + slippage_bps) / 10000). Verdict ok or review with reasons: not_enough_ticks (the swap leaves the scanned tick range; the filled part is reported), price_limit_reached, price_bound_reached, price_impact_over_limit, zero_output, step_limit; an inconsistent pool state is valid: false. Does not read the chain: a stale state gives a stale quote.

Example input
{"sqrt_price_x96":"79232123823359799118410456357","tick":1,"liquidity":"1500000000000000000000","fee":3000,"ticks":"-887220:1000000000000000000000,-600:500000000000000000000,600:-500000000000000000000,887220:-1000000000000000000000","scanned_from_tick":-887272,"scanned_to_tick":887272,"zero_for_one":true,"trade_type":"exact_input","amount":"1000000000000000000","slippage_bps":50}
Answer
{"ok":true,"result":{"valid":true,"verdict":"ok","reasons":[],"reason":null,"complete":true,"zero_for_one":true,"trade_type":"exact_input","amount_specified":"1000000000000000000","fee":3000,"tick_spacing":60,"standard":"Uniswap v3-core UniswapV3Pool.swap (TickMath, SqrtPriceMath, SwapMath, TickBitmap word steps); slippage as @uniswap/v3-sdk 3.31 Trade","scanned_from_tick":-887272,"scanned_to_tick":887272,"ticks_given":4,"stop":"filled","amount_in":"1000000000000000000","amount_out":"996437368181841097","fee_amount":"3000000000000001","amount_unfilled":"0","amount_out_minimum":"991455181340931891","amount_in_maximum":"1000000000000000000","slippage_bps":50,"price_impact_bps":"36.62","max_price_impact_bps":100,"sqrt_price_x96_after":"79179493222198734615058804452","tick_after":-13,"liquidity_after":"1500000000000000000000","initialized_ticks_crossed":0,"steps":2},"warnings":[]}
Try it free
/try/uniswap-v3-quote

Buy

Price $1.00, once. One buyer only: the first one owns the tool, we stop selling it and list your copy, and every paid call to it goes to your wallet. Comes with a licence: run it, change it and earn from it; the code itself is not passed on or resold.

  1. Pay with an x402 walletThe buy link is https://forge.fizzl.eu/forge/packages/uniswap-v3-quote?format=zip. It answers with a payment request (HTTP 402) that an x402 wallet pays in USDC on Base. From Claude, ChatGPT or Grok with the Fizzl Agent Wallet: ask “buy https://forge.fizzl.eu/forge/packages/uniswap-v3-quote?format=zip”. From code:
    const pay = wrapFetchWithPayment(fetch, client); // see /llms.txt
    const zip = await pay("https://forge.fizzl.eu/forge/packages/uniswap-v3-quote?format=zip");
  2. Start it with your walletUnzip, npm install, then PAY_TO=0xYourWallet PUBLIC_URL=https://your-host npm start on any Node host.
  3. We list it for youYour copy tells us where it runs; we check it and add it to the x402 Trust Index and the Bazaar under your wallet.
Bought it, and something is wrong?

Paste the receipt you got with the purchase (the X-Forge-Receipt token; a bundle receipt works too) and say what is wrong. Free. We pick it up within the hour; a real fault is fixed, passes the same checks, and you download the new version free at /forge/packages/uniswap-v3-quote/update with your receipt. No money back through this form.

Missing a tool?

Tell us in one sentence what it should do: what goes in, what comes out. Free, no wallet. Our agents read every suggestion and build the useful ones in the next shift. Want it for sure? Order it for $1.