PancakeSwap V2-style pairs compute the output with getAmountOut from reserve0, reserve1 and the pool fee, then transfer and re-check the invariant. That second check is why a pool that moved between your quote and your execution fails with the K error instead of filling at a worse price. The router refuses the fill rather than accept reserves that no longer satisfy the constant-product relation. V3-style concentrated pools do the same job differently: the router checks amountOutMinimum against the tick-crossing swap math, so the floor is enforced at the price range your trade actually traverses.
Verification is a two-minute read on BscScan. Open the failed transaction, expand Input Data, and find the minAmountOut argument inside the swapExactTokensForTokens call. Then open a sibling transaction that succeeded in the same pool and read amountOut from its Swap event. The gap between the two is your realized slippage, measured rather than assumed. A status of 0x0 with a revert reason on the PancakeRouter call tells you the floor did its job; the question is whether you set the floor from data.
The edge case that breaks this read is a proxy or aggregator hop. When your swap routes through more than one pair, the outer call's minAmountOut is often the aggregate floor, and the per-hop minimums live in a nested struct or a separate multicall segment. Decode the inner call, not just the top-level function selector, or you will compare your floor against the wrong integer. If the transaction was dropped before inclusion rather than reverted, there is no receipt at all, and the only evidence is the absence of a hash on BscScan plus the pending nonce in your wallet.
A tight floor converts ordinary pool drift into a hard failure. Any front-run, any large pending swap ordered ahead of yours in the same block, or a sandwich bot's buy pushes the realized output under minAmountOut, and the router reverts. Gas is spent and nothing fills. On a thin pair the reserve ratio moves enough from a single trade that a floor set near the quote is close to a coin flip.
The failure is deterministic given block ordering, not random. That is why the identical swap succeeds one block later with no change to your settings. Traders who retry at a wider number without measuring depth are guessing twice.
Reconstruct the failure from the pair contract's. Events tab. Pull the Sync event for the block before your failed transaction and read reserve0 and reserve1. Run getAmountOut with your input size against those reserves and compare the result to the minAmountOut in your input data. If the computed output sits below the floor, the revert is fully explained, and the fix is a floor derived from those reserves, not a smaller number chosen by feel.
Decision rule: if getAmountOut against the prior block's reserves lands within a few percent of your floor, widen the floor to cover the measured drift or split the order. If the computed output sits far above the floor, the revert came from something else, and you should check the allowance and the token's transfer behavior before touching slippage. A token with a transfer tax or a blacklist check can revert for reasons that have nothing to do with price, and widening the floor will not fix it.
A wide floor is a maximum acceptable loss, and searchers read it off the pending transaction. A sandwich bot buys ahead of your swap, lets your order move the price, then sells behind it, capturing up to your tolerance. The wider the floor, the larger the extractable amount, so the market prices loose slippage and you pay that price. The correct protection is a floor computed from measured depth and the pool fee tier, never a habit carried over from another pair.
Measure the capture from the receipt itself. Compare the Swap event's amountOut against the output you would have received at the pre-transaction reserves from Sync. Subtract the pool fee, and the remainder is what the searcher took. The bot's buy and sell usually appear as separate. Swap events in the same block, frequently from the same address, which makes the pattern visible once you know to look for it.
The failure mode is quiet. A Swap event with amountOut sitting near your floor reads as normal slippage to most traders, so extraction gets logged as market movement and the next trade repeats the same wide setting.
Timing matters as much as width. A transaction that sits in the mempool across several blocks gives searchers a longer window to position around it, so a floor that is safe at fast inclusion is exposed at slow inclusion. If your wallet lets you set a gas price, paying enough to land in the next block shrinks the window the floor has to survive. The cost is the gas itself, which you pay whether the swap fills or reverts.
Read the reserves first, then compute. Call getReserves on the pair contract through an RPC eth_call, or read reserve0 and reserve1 from the latest. Sync event on BscScan. Apply the constant-product formula with the pool fee tier shown on the pool page, and set minAmountOut just below the expected output minus price impact, plus a small buffer for block drift. The buffer exists because your transaction competes with everything else in its block, not because the pool is unpredictable.
On YESswap the swap routes through DEX aggregation, so the effective depth is the best route's reserves rather than a single pair's. The site is reachable from mainland. China without a VPN, and signing happens in your wallet, so the slippage field you set is exactly what the router receives. Confirm the router address in the wallet prompt before signing. The YES token contract on BNB. Smart Chain is 0xc22955b28e092060bc5d1e1f3b9d4dcd81091111 and the fee router is 0x0c9a2351e6e982b16559a68767003e7f4d02fb0d; any other address in a prompt is a reason to stop.
Two RPC endpoints can disagree on the reserves you read, and the disagreement is usually lag, not fraud. One node may be a block behind, so getReserves returns a stale pair state and your computed floor is wrong by exactly the drift of that block. Query the same pair on a second endpoint and compare blockNumber from eth_blockNumber alongside the reserves. If the block heights differ, trust the higher one and recompute. If the heights match but the reserves differ, stop and treat the pool as unreliable until you can reconcile it against the Sync event on BscScan.
The receipt is ground truth. The Swap event carries amount0In, amount1In, amount0Out and amount1Out; the ERC-20. Transfer logs show what left your wallet and what arrived at your address. Realized slippage is the difference between your quoted output at the pre-transaction reserves and the amountOut in the event, expressed against that quote. If the gap sits near your floor, the pool moved against you inside the block. If the gap is far below the floor, you set the floor too loose and paid for the room you left.
Decode in order. Open the transaction on BscScan, go to Logs, and decode the Swap event emitted by the pair address. Compare amountOut to the minAmountOut argument you supplied. Then read the Transfer log for the token you received and confirm the net amount credited to your address matches the Swap event minus any routed hops.
One more check closes the loop. If the transaction reverted, the receipt shows status 0x0 and the gas is gone, because the revert happens after inclusion. Decoding a failed swap is still useful: the input data holds the floor you set, and the Sync event for that block holds the reserves that beat it.
Decision rule: if the receipt shows amountOut within a hair of minAmountOut, your next trade on that pair should use a floor computed from fresh reserves rather than the same percentage. If amountOut came in well above the floor and the pool did not move, the floor was wider than the trade required, and you left extraction room on the table. Every claim above is checkable on BscScan for 0xc22955b28e092060bc5d1e1f3b9d4dcd81091111 on BNB. Smart Chain (chain id 56); treat https://yesswap. vip and @web3yesswap as the only official channels.
Open YESswapThe revert executes after the transaction is included, so the gas is spent and the receipt shows status 0x0.
Safety depends on the pair's reserves and your trade size relative to them; on a thin pair a single pending swap can move the price past that floor.
The post-swap invariant check failed because reserves moved between quote and execution, so the router refused to fill below your floor.
A zero floor reverts on any drift, so the swap almost never lands.
Verify 0xc22955b28e092060bc5d1e1f3b9d4dcd81091111 and 0x0c9a2351e6e982b16559a68767003e7f4d02fb0d on BscScan before trading.
Every card below opens the live product with your own wallet — no signup, no custody.
Everything above is one page away: swap tokens on bsc.