docs: document flat per-transaction gas cost - #240
Draft
claude[bot] wants to merge 5 commits into
Draft
Conversation
claude
Bot
force-pushed
the
docs/gas-costs
branch
from
August 25, 2026 11:46
4fff7b4 to
35182a4
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFS56yZWWCu1wSa3jjzFjZ
Precompile pages now state only gas costs in gas units; the fixed 1 gwei price and fee RPC details live solely in the Getting Started Gas section. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFS56yZWWCu1wSa3jjzFjZ
Gas is no longer documented as a flat 21,000 per transaction: simple transfers stay at 21,000 gas, and each precompile page now lists its per-operation costs (orderbook 40k/30k/25k, bridge withdraw 50k, auction submitBid 25k, recovery recover 100k). Pricing (1 gwei, fee RPCs) is unchanged and stays on the Getting Started page. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFS56yZWWCu1wSa3jjzFjZ
Per-operation gas costs are not part of the network: transactions are charged a flat 21,000 gas each. Roll the docs back to flat per-transaction pricing and drop the per-operation cost tables from the precompile pages. The still-true exceptions stay documented: orderbook `submitBatch` costs 21,000 gas per order in the batch (minimum 1), orderbook `delegated` calls are gas-exempt, bridge deposits are credited by the network and cost the user nothing, and a chained recovery pays an additional 21,000 gas per intermediate account. Pricing (fixed 1 gwei, the fee RPCs) is unchanged and stays on the Getting Started page; the precompile pages state gas units only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFS56yZWWCu1wSa3jjzFjZ
Re-checked the gas numbers against the current node behaviour and three
claims had drifted:
- Bridge `withdraw` is gas-exempt, not charged a flat 21,000. The page
already said so under Withdrawing, so the Gas section contradicted it
two screens later. `processDeposits` is likewise exempt for the relayer
that submits it, which makes the whole bridge precompile free to the
user rather than flat-rated.
- A `recover` call is flat 21,000 regardless of the length of the
transaction chain being finalized. There is no per-intermediate-account
surcharge; the chain length affects which certificates are verified,
not what is charged.
- Getting Started derived a wei figure ("so a typical transaction costs
21,000 gwei") from the price and the gas. The metering and the
advertised price are both accurate, but the derived total is not
something the docs should assert, so the arithmetic is dropped and the
wording says the transaction is metered at 21,000 gas.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LFS56yZWWCu1wSa3jjzFjZ
claude
Bot
force-pushed
the
docs/gas-costs
branch
from
August 26, 2026 13:59
35182a4 to
d6eeed3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Shresth Agrawal · Slack thread
Before
The docs never state the gas price, and no precompile page says what its calls cost in gas.
After
eth_gasPrice,baseFeePerGasin blocks andeth_feeHistory);eth_estimateGasworks as-is; there is no priority fee or tip (eth_maxPriorityFeePerGasis always0, andeth_feeHistoryrewards are all zero).submitBatchcosts 21,000 gas × the number of orders in the batch (minimum 1), charged as if each inner order were submitted standalone;delegatedcalls are gas-exempt.withdrawis gas-exempt, andprocessDepositsis exempt for the relayer that submits it, so incoming deposits are credited by the network for free.recoveris flat 21,000 gas regardless of how long the transaction chain being finalized is; there is no per-account surcharge.Rebased onto
main. The optimistic-auctions precompile page was removed frommainby #278, so this branch no longer touches it.Rebased again onto
mainafter #283 rewrote the bridge and orderbook pages: the gas sections are re-applied on top of that prose rather than over the text it replaced. Re-checking the numbers while doing so turned up three claims that no longer held — bridgewithdrawis gas-exempt rather than flat-rated,recoverhas no per-account surcharge, and the Getting Started section no longer derives a wei total from the price — so those are corrected here instead of shipping stale.Files touched
doc/api-reference/README.mddoc/api-reference/applications-precompiles/README.mddoc/api-reference/applications-precompiles/orderbook.mddoc/api-reference/applications-precompiles/bridge.mddoc/api-reference/applications-precompiles/recovery.md🤖 Generated with Claude Code
https://claude.ai/code/session_01LFS56yZWWCu1wSa3jjzFjZ
Generated by Claude Code