sonnyonsol.xyz

How to Find Why a Reverted Transaction Failed When No Reason Shows

You see "Failed" on Etherscan or Polygonscan. The reason box is empty. Your first instinct might be fear. Don't panic. Lost funds are almost never the issue.

When a transaction reverts, your assets remain in your wallet. The gas you paid is gone. That's it. The failure message is missing because the error occurred inside a smart contract that didn't emit a clear reason string.

Here's the detective workflow.

Step 1: check gas consumed

Open the transaction details. Look at "Gas Used By Transaction." Compare it to "Gas Limit."

If gas used equals gas limit, your transaction ran out of gas mid-execution. This is an out-of-gas (OOG) error. The solution is straightforward: increase your gas limit on retry. Use a value 20-30% above what your wallet estimates.

If gas used is far below the limit, the contract itself rejected something. That's where the real trail begins.

Step 2: examine internal transactions

On Etherscan or Polygonscan, find the "Internal Txns" tab. Click it. This shows calls that your transaction made to other contracts.

Look for any internal transaction with a status of "Failed" or "0." That's the exact call that reverted. The parent transaction failed because a child contract said no.

For example, on Polygonscan, a Uniswap swap might show an internal call to the token contract. If that token contract reverted, the swap failed. You now know which contract refused and can inspect its logic.

Step 3: Use the Trace View

The trace view (labeled "Trace" on Etherscan, "Debug & Trace" on Polygonscan) gives you the full call stack.

Find the trace. Look for the deepest failed call. Each line shows the opcode at the moment of failure. The most common culprit is REVERT. That opcode means the contract explicitly rejected the call with a custom error.

Some contracts include a reason string in the return data. The trace view may show it as hex. Copy that hex data.

Step 4: look up custom error selectors

Modern Solidity contracts use custom errors rather than strings. The error selector is the first four bytes of the revert data. You can look it up in a 4byte directory.

Go to a site like openchain.xyz or 4byte.directory. Paste those four bytes. The directory returns the error signature. "TransferFromFailed." "InsufficientAllowance." "ExceedsBalance." Now you know exactly what condition was violated.

If the revert data is longer, it may include parameters. Some directories let you decode those too.

Step 5: consider common EVM failure patterns

No reason can appear for several recurring reasons:

Special Case: Polygon

Polygonscan sometimes hides revert reasons in a feature called "More Details." Scroll down the transaction page. If "More Details" appears, click it. The reason often shows there.

What not to assume

Do not assume the contract is malicious. Legitimate contracts revert for legitimate reasons: expired orders, low liquidity, or failed validation checks. The revert protects you from a bad state.

Do not assume you can force the transaction through. Mining a replacement with higher gas won't fix a contract-level revert. Fix the condition that caused it.

The Workflow Summary

  1. Check gas used vs gas limit.
  2. Find the specific internal call that failed.
  3. Use the trace to capture revert data.
  4. Decode the error selector on a 4byte directory.
  5. Fix the underlying condition (allowance, slippage, timing).

One last thing. If the transaction says "Success" but nothing happened, that's a different problem entirely. Reverted transactions always show a clear failure state. The ambiguity is only in the reason, not the outcome.

Your funds are safe. Now go decode that error.

Not financial advice. sonnyonsol.xyz publishes market data and general information about staring robot. Crypto assets are volatile and you can lose everything you put in. Nothing here is a recommendation to buy, sell or hold, and we make no price predictions.

Prices are sourced from third parties and may be delayed or wrong. Verify anything you intend to act on against a primary source.

Back to block explorers