How do you estimate gas for a Base deposit on Ethereum?
Estimate a Base deposit’s gas before sending by multiplying the Ethereum gas estimate by the base fee plus priority fee; ERC-20 approvals add a separate transaction.
The Blockchain Brief Desk4 min read
For an Ethereum-to-Base deposit, estimate the Ethereum gas units and multiply them by the base fee plus priority fee at inclusion; there is no separate Base fee to pay.
The Base bridge deposit is one Ethereum transaction, and the wallet or bridge interface estimates the gas for that deposit call. The Base bridge deposit flow tells you which transaction to inspect: the Ethereum call that submits the deposit, rather than a later action on Base.
Before you send, the wallet or bridge UI runs eth_estimateGas against the deposit call and returns an estimated gas-unit count. That count is the transaction’s estimated execution work. It is not a price in ETH, and it does not include a fixed fee charged by Base.
Use the estimate alongside the Ethereum fee quote shown by your wallet. Both the base fee and priority fee respond to Ethereum demand at send time, so the cost estimate can change between preparing and sending the transaction.
How do you turn the gas estimate into an ETH cost?
Multiply the estimated gas units by the sum of the base fee and priority fee, expressed in gwei, then convert the result from gwei to ETH. The calculation is: gas units × (base fee + priority fee).
Take a deposit estimated at 100,000 gas, with a total fee rate of 20 gwei. The calculation is 100,000 × 20 gwei, or 2,000,000 gwei, which equals 0.002 ETH. That is the estimated Ethereum transaction cost at that fee rate.
Under EIP-1559, the amount paid is based on gas used multiplied by the base fee plus priority fee at inclusion. The wallet’s max fee is a ceiling on the fee rate it is willing to pay, not the rate automatically charged. The estimate is therefore useful for budgeting, while the eventual charge depends on the gas used and the base fee when Ethereum includes the transaction.
The estimate can differ from the final charge because the transaction may use fewer gas units than estimated, or the base fee may change before inclusion. A priority fee is included in the rate calculation, while the max fee setting leaves room for the fee rate to rise up to the wallet’s stated limit.
Why can a deposit with a higher L2 gas limit cost more on Ethereum?
A deposit with a higher L2 gas limit can have a higher Ethereum gas estimate because the deposit’s Base execution is prepaid inside the Ethereum transaction. The OptimismPortal accounts for that L2 gas limit by burning extra Ethereum gas in the portal as part of the deposit.
This links the two sides of the transaction: the L2 gas limit specifies the gas budget for execution on Base, while the Ethereum transaction pays the cost of encoding and submitting that deposit through the OptimismPortal. Raising the L2 gas limit therefore raises the Ethereum work needed for the deposit and can raise the eth_estimateGas result.
For a simple ETH deposit, use the estimate returned for the deposit call and the current Ethereum fee rate. For a contract-call deposit with a larger L2 gas limit, expect the Ethereum estimate to reflect the additional portal gas burn. The estimate is specific to the call and its chosen L2 limit, so a figure from another deposit may not match.
An ERC-20 deposit also requires an approval transaction first when the token allowance is not already sufficient. Approval is a separate Ethereum transaction, so include its gas cost in the amount you plan to spend: estimate the approval and deposit separately, then add their estimated costs. The approval does not become part of the deposit transaction.
Related
Why did my deposit cost less than my wallet's max fee?
Your deposit cost less than the wallet’s max fee because the max fee is the highest per-unit rate the wallet permits, while EIP-1559 charges the base fee at inclusion plus the priority fee, multiplied by gas used. A max fee above that actual rate provides headroom; it is not itself the amount charged.
Do I need ETH on Base to receive a deposit?
You do not need ETH on Base to pay for the deposit transaction: the deposit is paid in ETH on Ethereum. The ETH cost calculated above covers that Ethereum transaction. Any later transaction on Base has its own gas requirement, but it is separate from the cost of sending the deposit.