Saylor InnovationsSAYLOR INNOVATIONS

Home / Guides / On-chain & DeFi

DEX Fee, Slippage and Break-Even Guide

On-chain & DeFi intermediate 6 min read Free to read · $0.01 via agent API Updated 2026-08-22

A procedure for calculating the true break-even price move on a DEX trade: defining consistent cash-flow units, modeling entry execution (route, fees, price impact, slippage, failed attempts) separately from a size-dependent exit ladder, solving for the exact break-even percentage that covers both legs, setting execution guardrails, and reconciling the realized wallet result against the model — because chart price movement alone doesn't account for round-trip cost.

A trade can be green on the chart and red on the wallet. This guide builds a real round-trip cost model — protocol fees, price impact, slippage, priority fees, failed transactions, and exit depth — so you know the actual price move required before you're actually profitable.

Free to read here. AI agents can also fetch this guide directly over x402 for $0.01 — no account, structured JSON delivery.

Agent API →
Interactive resolver

What are you seeing?

Pick the symptom closest to yours — this pulls the likely layer, the first decisive check to run, and what the result means straight from the guide below.

Pick a symptom above to see the match.

The result you are building

A transparent round-trip cost model and break-even return showing entry/exit price impact, protocol/platform fees, slippage, priority/network fees, token taxes, failed attempts, and realistic exit depth under multiple scenarios.

Use this guide when: deciding position size, auditing why a green price move still lost money, or comparing routes/DEXs or bot profitability.

Do not use it as a substitute for: treating slippage tolerance as a fee (it's a worst-acceptable execution bound; actual slippage/price impact is measured separately), or using headline market price for an exit larger than the available depth.

Before you change anything, collect: trade side/size/token decimals and entry/exit quote routes/times; all percentage and fixed fees plus priority/network costs in one currency; expected vs. actual amounts and any failed-transaction costs; pool depth/price impact and token transfer fee/tax/hook behavior.

Stop the trade model when the sell route fails, token transfer behavior is unknown, the quote is stale, or break-even already exceeds the planned risk/target before you've even accounted for profit.

Understand the system before fixing it

  • Break-even is multiplicative, not additive. Entry costs reduce the quantity you actually acquire, and exit costs reduce proceeds — casually adding fee percentages together understates the required move.
  • Price impact depends on trade size. The marginal pool price is not the executable average price for your order.
  • Failed attempts are real cost. Network/priority fees and the opportunity/slippage cost from delay both belong in the realized result, not a rounding error.

Evidence-to-decision map

EvidenceLikely layerFirst decisive checkWhat the result means
Quote output far below spotPrice impact/routeCompare a size ladder against pool depthReduce size, split only if the total outcome improves, or skip the trade
Actual received below quote/minSlippage/MEV/stateCheck transaction/route/timing and min-receivedDon't automatically widen slippage — refresh and assess manipulation/liquidity
Sell receives less due to taxToken behaviorSimulate/tiny round trip and check transfer feeInclude both directions in the model, or stop
PnL green before fees, net redCost modelReconcile wallet cash flows against all feesThe target/position is too small or turnover too high

Step-by-step procedure

01. Define cash-flow units. Mixing SOL, token, and USD creates false PnL. Choose one base reporting currency and observed prices/time; list initial wallet cash, acquired quantity, final proceeds, and every fee separately. Amounts and decimals should reconcile to the wallet/transaction.

02. Model entry execution. Quote price differs from average fill. Record input, expected output, route, LP fee, platform fee, price impact, slippage minimum, priority/network fee, and any failed attempts. Compute effective entry cost per token from total spent divided by actual received — use the confirmed transaction, not the quote, for the realized model.

03. Model the exit size ladder. One small quote doesn't price a full position. Quote 25/50/100% (or your planned tranches) at current depth, including transfer taxes/hooks, route fees, impact, and network cost. Full-exit proceeds may be nonlinear or effectively impossible at size — use the conservative scenario.

04. Calculate break-even. The target must cover both legs. Solve for the exit gross price/proceeds such that net exit proceeds equal total entry cash outflow including failed costs, then compute the required percentage move over your effective entry. Show best/base/worst assumptions and fixed-fee sensitivity, and keep the formula and inputs for reuse.

05. Set execution guardrails. A profitable model can still fail at execution. Set a max impact/slippage/priority-fee/quote-age, a minimum liquidity threshold, a sell simulation or tiny test, a max-attempts limit, and abort thresholds — the guardrails should block a trade the moment expected net no longer clears margin. Don't chase fills.

06. Reconcile the realized result. Charts ignore transfers, fees, and failures. After exit, sum actual wallet cash flows and confirmed fees, inventory any dust/value/airdrops/rebates separately, and compare the model against the actual result by cause. Never claim profit without a full cash-flow reconciliation.

Worked example

Starting problem: a $100 trade rises 5% on the chart but closes at a loss.

Evidence collected: entry and exit pool/platform costs total about 2%; price impact is 1.2% on entry and 1.5% on exit; priority/network/failed attempts cost $1.40; the displayed chart uses spot price, not actual average fills.

Decision: the required break-even is above 5% for this size and depth/cost stack — the trade was never going to be profitable at that move.

Actions taken: calculated effective entry and full-exit net proceeds from the actual transactions; built a size ladder and a minimum-net-profit guard; reduced turnover/size, or skipped pools where the full round-trip cost would consume the target.

Proof of completion: the model and realized cash flow reconcile; trades are only entered when the conservative expected move exceeds break-even plus a margin.

Why this matters: winning direction is not the same as profitable execution.

Verify, recover, and hand off

A cost model is complete only when: token decimals and all cash flows reconcile; entry/exit quotes use a realistic size and fresh routes; every percentage/fixed/failed fee is counted exactly once; the break-even formula and scenarios are reproducible; sell/tax/hook/depth risks are actually tested, not assumed; and the realized result comes from wallet transactions, not the chart alone.

If break-even comes out negative or absurd, that's a sign/unit/decimal/double-count error — reconcile raw amounts and units stepwise. If a quote changes instantly, the pool is shallow/volatile or there's competing flow — shorten the quote age or reduce size rather than widening slippage, which only increases risk. If you can't sell at all, stop and investigate the token/program/account/liquidity restriction directly. If a bot reports profit but the wallet balance drops, the PnL calculation is omitting fees, transfers, or inventory marks — do the cash-flow and inventory reconciliation.

Reusable handoff record: entry/exit cash-flow and fee inventory; size-dependent quote/impact ladder; break-even and best/base/worst scenarios; execution guardrails and stop rules; realized wallet reconciliation and model deviation.

For agents

An agent executing or evaluating trades should run this break-even calculation *before* committing capital, not after — the guardrails in step 05 (max impact, quote age, minimum liquidity, sell simulation) are exactly the checks that should gate an automated trade, not just inform a human's judgment call after the fact.

Official references: https://docs.orca.so/liquidity/concepts/impermanent-loss · https://solana.com/docs/core/fees

*This is educational technical and risk-analysis information, not financial, investment, legal, or tax advice. Blockchain transactions can be irreversible and no checklist can guarantee safety or profit.*