Memecoin trading 2 min read
Use an ETH explorer to read a failed token swap
Distinguish a pending hash, a failed mined receipt and a successful execution, then check the actual gas paid.
View the worked illustrationClose illustration
Scroll the illustration to inspect the details.
A transaction hash identifies the transaction. By itself it does not prove inclusion or successful execution. On Ethereum, start with the correct network and hash. A mined transaction has a receipt with a block reference and execution status. A pending transaction has no mined receipt yet. A missing hash on one explorer can also mean the wrong network or an unobserved transaction.
Read status and the amount paid for execution
For a modern Ethereum receipt, status 0x0 means execution failed and status 0x1 means it succeeded. A failed on-chain swap can still consume gas. For a simple illustration, 50,000 gas used at an effective gas price of 20 gwei costs 1,000,000 gwei, or 0.001 ETH. Use gas used and effective gas price for the receipt, rather than multiplying the transaction’s maximum gas limit by its maximum advertised fee.
A failure normally reverts the state changes attempted by that transaction. An earlier successful approval is a separate transaction and can remain in force. Conversely, a successful approval does not prove that the following swap completed or delivered the token you expected.
Verify the result appropriate to your question
For a successful transaction, identify the called contract, the relevant token addresses and the actual balance changes or transfer logs. Block inclusion and later finality are different observations. Check the transaction stage before comparing a wallet’s balance with an exchange statement.
Use the approval and transfer example if the successful receipt was for an approval, not the intended swap.
JSON-RPC API · Transactions · Ethereum gas and fees: technical overview
Read next
More from this space
-
2 min read
US memecoin swap records when no cash changes hands
Reconstruct a US investor’s example token-for-token disposition using dollar basis, value received and transaction records.
-
2 min read
Token deposit minimum or missing confirmations?
Use the exchange’s network-specific minimum and required confirmations to interpret an uncredited deposit.
-
2 min read
A hidden or unsolicited token in Phantom: what changed?
Separate a wallet’s visibility warning from token ownership and a verified or realizable dollar value.