What is transaction receipt?
The record a chain produces after executing a transaction, holding whether it succeeded, how much gas it used, and the logs it emitted.
Not yet verifiedHow we verify
3 min read
In this entry
The record a chain produces after executing a transaction, holding whether it succeeded, how much gas it used, and the logs it emitted.
The receipt exists because inclusion and success are different things on a chain that runs code. A Bitcoin transaction either happens or does not. An Ethereum transaction can be mined into a block, charged to your account, and still have reverted partway through, leaving your balances untouched and your fee spent.
That is the point people miss. Seeing a transaction on an explorer is not confirmation that it worked. The receipt is what says so.
How it works
When a node executes a transaction it produces a receipt alongside the state change. The Ethereum Yellow Paper defines the receipt as carrying a status code, the cumulative gas used in the block up to that point, a bloom filter over the logs, and the log entries themselves.
The status field is the one that matters day to day. It is 1 for success and 0 for a revert, a form introduced by EIP-658 so that clients could distinguish a failure from a transaction that simply consumed all its gas. Explorers read that field and draw the red failed marker you see.
The logs are the other half. Contracts emit events during execution, and those events land in the receipt rather than in contract storage, because storage is expensive and logs are not readable by contracts. Every balance history, portfolio tracker, and tax report built from on-chain data is ultimately reading logs out of receipts through an indexer.
Receipts are hashed into a root committed in the block header, which is what lets a light client verify a receipt without holding the whole chain.
Example
Illustrative. You submit a swap with a gas limit of 200,000 and a total fee of around $3. The pool moves against you before your transaction is mined, the contract's minimum-output check fails, and execution reverts.
The transaction is in the block. The receipt shows status 0, gas used of perhaps 45,000 out of the 200,000 you authorized, and no transfer logs. You are charged for the 45,000 units actually consumed, so roughly $0.70 rather than the full $3, and your tokens never left your wallet. Unused gas is refunded automatically, but the work performed before the revert is not.
Why it matters when you buy
The moment this bites is your first on-chain purchase after moving off an exchange. A failed swap costs a fee and produces nothing, and if you retry blindly you can pay several times before noticing the revert. Fees and typical costs by network are on the chain pages, and the guide on gas fees explains what you are paying for.
Related terms
- event log: the emitted records receipts carry
- block explorer: where receipts are displayed
- gas: what the receipt reports consuming
- transaction simulation: previewing the outcome before signing
- indexer: what reads logs into usable history
- transaction id: how you look the receipt up
Questions
Why was I charged for a transaction that failed?
Because validators performed the computation up to the point of failure and are paid for that work. The protocol refunds the gas you authorized but did not use, not the gas already spent.
How do I find out why a transaction reverted?
Most explorers show a revert reason string when the contract provides one, such as a slippage check failing. Where none is given, simulating the same call against current state usually reproduces the error with more detail.
Does a receipt exist on Bitcoin?
No, and it is not needed. Bitcoin transactions do not execute general programs, so a transaction included in a block has done exactly what it says. The equivalent question there is only how many confirmations it has.