Capturing gas fees in practice: from receipt to journal
How to pull the real fee for every transaction, handle L2 data fees and failed transactions, and decide expense versus capitalisation.
Gas is small per transaction but large in aggregate, and it is the line most often missing from crypto ledgers. Every fee is two events at once: you spend a token, which is usually a disposal, and you incur a cost that must land somewhere in the accounts.
Get the fee from the receipt, not the estimate
On Ethereum, the fee is the gas actually used multiplied by the base fee plus the priority fee [1]. The base fee is burned and the priority fee goes to the validator; any excess between the maximum fee a user offered and what was actually charged is refunded [1]. So the gas limit and the maximum fee in a wallet's confirmation screen are not the cost. The cost is in the transaction receipt: gas used times the effective gas price.
- Gas used: 21,000 units
- Effective gas price: 12 gwei (10 gwei base fee + 2 gwei priority fee)
- Fee: 21,000 x 12 = 252,000 gwei = 0.000252 ETH
- Value at a 2,500 USD ETH price: 0.63 USD
Layer 2 networks charge two kinds of fee
Rollups charge for their own execution and for posting data to Ethereum, and they do not expose the split the same way. On Arbitrum, the parent-chain data cost is converted into child-chain gas units and added to the gas charged, and the receipt carries a gasUsedForL1 field showing that portion [2]. Fees are paid in ETH [2].
On OP Stack chains, the L1 data fee sits outside gasUsed entirely. It is deducted automatically from the sender, is not capped by the gas limit, and appears in the receipt as a separate l1Fee field [3]. Newer OP Stack chains can also charge an operator fee on top [3]. If you compute the fee as gas used times gas price on an OP Stack chain, you will understate it.
The practical rule: build a per-chain fee formula, test it against a sample of real receipts, and record which fields it used. Whether to split L1 and L2 fees into separate expense lines is a presentation choice; capturing the full amount is not optional.
Failed transactions still cost money
A reverted Ethereum transaction still pays for the gas consumed up to the point of failure [1]. On Solana, the fee is taken from the fee payer before execution and is charged whether the transaction succeeds or fails [4]. Solana charges 5,000 lamports per signature as a base fee, half of which is burned, plus any optional priority fee [4]. Failed transactions therefore belong in the ledger as fee-only events, with no asset acquired or disposed other than the fee token. Teams that filter for successful transactions only will miss them.
Who paid: fee payer versus owner
The wallet whose assets moved is not always the wallet that paid. On Solana, the fee payer is the first signer, which can be a different account from the one transferring tokens [4]. Under ERC-4337 account abstraction, a paymaster contract can agree to pay gas instead of the sending account, funding it from its own deposit [5]. A company that sponsors gas for users through a paymaster incurs the cost even though the user's account shows the activity. Map each fee to the entity whose assets paid it.
Tax: the fee is a disposal and a cost
In the US, the final broker regulations define digital asset transaction costs to include transaction fees paid in cash or property, and state that using digital assets to pay those costs is itself a disposition [6]. For an exchange of one digital asset for another, the final rules allocate the transaction costs entirely to the asset disposed of, replacing a proposed 50/50 split [6]. In the UK, HMRC treats fees for getting a transaction onto the ledger as allowable costs, and accepts a 50/50 split between the disposed and acquired tokens on a token-to-token exchange as just and reasonable [7]. The two jurisdictions therefore differ on the same swap.
Books: expense or capitalise
For financial reporting, entities generally set a policy: fees on standalone operations, transfers and failed transactions are expensed, while fees directly attributable to acquiring an asset may be capitalised into its cost where the entity's framework and policy allow. Treatment of fees on disposals, reducing proceeds or expensing, is also a policy choice. Whatever the choice, the spent token must be relieved from the books at its carrying amount, with any difference to its fair value recognised as a gain or loss.
| Account | Debit | Credit |
|---|---|---|
| Operational gas paid in ETH, expensed 0.002 ETH at 2,500 USD = 5.00 fair value; carrying amount 0.002 x 1,800 = 3.60 | ||
| Gas and network fees expense | 5.00 | |
| Digital assets — ETH | 3.60 | |
| Gain on disposal of digital assets | 1.40 | |
What to do
- Pull fees from receipts for every transaction, including failed ones, and reconcile a sample to the chain.
- Write per-chain fee formulas that include L1 data fees and operator fees where they exist.
- Attribute each fee to the account that actually paid, including paymaster-sponsored transactions.
- Price the fee token at the transaction timestamp and relieve its carrying amount or tax basis.
- Document your expense versus capitalisation policy, and note where US and UK tax allocation of swap fees diverge.
Sources
- Ethereum gas and fees: technical overview (ethereum.org)
- Gas and fees (Arbitrum Docs (Offchain Labs))
- Transaction fees on OP Mainnet (Optimism Docs)
- Fee Structure (Solana Docs)
- ERC-4337: Account Abstraction Using Alt Mempool (Ethereum Improvement Proposals)
- Gross Proceeds and Basis Reporting by Brokers and Determination of Amount Realized and Basis for Digital Asset Transactions (T.D. 10000), 89 FR 56480 (Federal Register / GovInfo)
- CRYPTO22150 - Cryptoassets for individuals: Capital Gains Tax: allowable costs (HMRC)
General information for finance teams, current as of publication. Not legal, tax or accounting advice.