Wallet data3 min read

Network Fees in Wallet Transaction Reports

Track network execution fees separately from transferred value, preserve failed-transaction costs, and avoid charging every transfer event the full fee.

Editorial illustration accompanying network fees in wallet transaction reports.

Overview

When translating these concepts into an integration, keep the scope described by the normalized transactions api with the result. The examples in wallet transaction history and smart contract event logs show how the same distinction affects neighbouring data questions.

A transaction can produce many movement records but generally has one execution-cost context. Copying its full fee onto every event can multiply the apparent cost of the wallet activity.

Keep the fee at its evidence level

For an ordinary Ethereum execution receipt, gasUsed multiplied by effectiveGasPrice gives the execution gas cost. Other fee components or networks can require additional fields. Keep the fee asset and payer explicit. Do not assume that the wallet appearing in a token event is always the transaction sender or the party that ultimately bears the cost.

Worked example: three transfers, one fee

Transaction T emits three relevant token transfers and has an execution fee of 0.003 native units. A flattened export that repeats 0.003 on every row appears to total 0.009. Store a transaction-level fee record, or provide an explicit allocation rule whose allocated pieces sum back to the original fee.

Test alternative execution paths

Include reverted transactions, sponsored operations and transactions involving several watched wallets. A failed transaction can still have a fee even though its intended token movement did not happen. Preserve the calculation inputs and network-specific fee interpretation. Treat a missing effective gas price as missing evidence rather than silently substituting the submitted maximum fee.

A practical acceptance test

Create one receipt with three transfer events and one fee record. Sum the exported activity under its declared allocation rule and confirm the fee is charged once. Add a reverted transaction with no accepted token movement but a fee. The report should retain that cost without creating the intended transfer or multiplying it across unrelated rows.

Questions about the topic

Frequently asked questions

Is maximum fee always the fee paid?

No. Submitted caps and realised receipt costs are different values.

Should each event carry the entire transaction fee?

Not if downstream totals will sum those rows; use a separate record or declared allocation.

Standards & technical documentation

Further reading

{{TODO: author name}}

Practical explanations of blockchain data, software integration and the context behind a record.

About Indexbase
← Back to all articles

Build with better context.

Get an update when private beta opens.

Form setup in progress. Nothing entered here is sent or saved. {{TODO: endpoint}} See the full form and email alternative.