Skip to content
GetProfitable
Search
Dictionary

Failed transaction

A transaction that was included in a block but did not complete; the state change is undone while the gas spent is not refunded.

Reverts happen for ordinary reasons: slippage beyond your tolerance, an insufficient token-approval, a mint that sold out, a gas-limit set too low, or a contract's own safety check firing.

Failing is often the system working correctly. A swap that reverts because price moved past your slippage-tolerance protected you from a bad fill; paying a few dollars in gas for that protection is cheap.

What matters is diagnosis. Open the txid on a block-explorer and read the revert reason before retrying, because blindly resubmitting with more gas repeats the same failure and the same cost.

Related: gas-limit, txid, slippage-tolerance, token-approval

See it drawn

Original diagrams for the ideas on this page. Illustrative, not real market data.

Slippage on a market orderA buy order clears four price levels, so the average price paid is worse than the price first quoted.Buy 1,000 shares at marketpricesell orders resting (bar length = size)20.04300 shares20.03200 shares20.01200 shares20.00300 sharesnothing resting at 20.02order sweeps up the bookaverage fill 20.02SLIPPAGE0.02 a share$20.00 in totalintended 20.00Each level fills at its own price; the average is what you really paid.
Slippage on a market order. You click at 20.00, but only 300 shares are resting there, so the rest of the order fills at 20.01, 20.03 and 20.04. The average price paid is 20.02, and that two-cent gap is slippage.

Educational only, not advice. Spotted an error? Post in Site Feedback.