Savings on Optimism
Transaction Cost on Ethereum (Today's Prices)
See More Transaction Types
- Buy an NFT on: OpenSea (Seaport) | OpenSea (Wyvern) | Rarible | Foundation | Gem | GenieSwap
- Make a DEX Trade on: Sushiswap | Uniswap v3 | Balancer
- Trade on a DEX Aggregator: 0x/Matcha | 1inch | Metamask
- Make a deposit on: Aave | Compound | Yearn | Alchemix v2
- Mint Stablecoins: DAI (Maker) | sUSD (Synthetix)
- Vote On-Chain in a DAO: Compound (Gov Bravo) | Gitcoin (Gov Alpha)
- Create a Multi-Sig: Gnosis Safe v1.3.0
Gas Prices On Optimism you only pay L1 Gas Prices for Calldata gas.
L1 Gas Used: On Ethereum your entire transaction gets posted to L1, whereas on Optimism only the Calldata uses L1 gas.
Cost Contributors - For the Example Transaction Above
Transactions on Layer 2s have different fee models than Layer 1s. Optimism transaction fees are made up of: 1) Rollup Costs: The cost of “rolling up” transactions into batches and submitting them to Ethereum (L1), and 2) L2 Execution Costs: The cost to run the transaction on Optimism (L2).
Optimism Transaction Fee = [ Fee Scalar * L1 Gas Price * (Calldata + Fixed Overhead) ] + [ L2 Gas Price * L2 Gas Used ]
Rather than paying L1 Ethereum gas prices for your entire transaction execution, on Optimism you only pay L1 gas prices for a small portion that needs to be submitted to L1 in a transaction batch (L1 Gas Used). Transaction execution happens on Optimism (L2). Optimism uses the same amount of gas as an equivalent transaction would use if on Ethereum (Gas Used if on Ethereum); however, the standard cost for gas on Optimism is only 0.001 gwei, many times cheaper than Layer 1. See 'Additional Resources' at the bottom to dive-deeper in to L2 Transaction Costs.
Cost for the same transaction on Optimism
Zero and Non-Zero Bytes: The current gas cost for a "zero byte" (i.e. 00) is 4 gas, and the cost for a non-zero byte is 16 gas.
Calldata cost and rollup fee reduction is the subject of a few draft EIPs:
- EIP-4488 seeks to reduce the gas cost parameters to 3 gas for each byte. This would reduce calldata costs for rollups like Optimism by ~3-5x
- EIP-4844 (Proto-Danksharding) (not to be confused) introduces a new kind of transaction type to ethereum which accepts "blobs" of data to be persisted in the beacon-node for a short period of time.
Optimism - Transaction Fee Savings Calculator 🔴✨
Take any L1 Ethereum transaction hash (i.e. from Etherscan), enter it in to the 'Transaction Hash' field above, then click 'Apply' to see what an equivalent transaction would cost on L2 Optimism (if the app is deployed).
- Dune has a small block delay, so enter transactions > 20 minutes old.
- Savings based on Avg L1 Gas Price and ETH price in the last hour.
- Not all L1 apps listed are deployed on OP yet - see a list what's live here.
Learn more about Optimism at optimism.io
Additional Resources
For more on gas costs and calculations see:
- Documentation: How Optimism Works?
- OP Blog Post: The Road to Sub-dollar Transactions Part 1: Slashing Fees by 30%
- OP Blog Post: The Road to Sub-dollar Transactions, Part 2: Compression Edition
- Dashboard: Transaction Fees for Popular Transaction Types - Last 24 Hours
- Dashboard: Transaction Cost Contributors and L1 Batches
For Data Analysts and Dune Wizards 🧙♂️
This dashboard is just one tool to help translate gas fees for Ethereum transactions to Optimism's fee model. There are so many more rabbit holes than anyone can go down!
To continue the discussion, join our analytics community in the Optimism Discord! To access the #analytics channel, choose the "developer" role in the Discord.