Gas Pricing
Gas and Fees
Fee Model Sonic uses a Base Fee + Priority Fee model similar to Ethereum's EIP-1559.
Fee Distribution Unlike Ethereum, the Base Fee is not burned. Instead, 90% of all transaction fees are sent to the FeeM treasury for developers and 10% are distributed to validators.
Gas Power Each validator has a "gas power" budget that refills over time, based on their stake. This prevents any single validator from congesting the network. If a validator runs out of gas power, they may temporarily be unable to emit events containing large transactions, resulting in a
Not enough gas power to emit event
warning.
Gas Estimation (eth_estimateGas
)
eth_estimateGas
)While eth_estimateGas
is fully supported, its estimates can sometimes be inaccurate for complex transactions whose gas usage depends on the current on-chain state.
The Problem The state of the chain can change between the time of gas estimation and the time of transaction execution. For contracts like a
UniswapV3Pool
, a change in the pool's state can alter the execution path and, consequently, the gas required.The Symptom This can lead to random
out of gas
transaction reversions.The Solution For transactions with state-dependent gas costs, it is best practice to add a buffer (e.g., 20-30%) to the estimated gas limit to ensure successful execution. Unused gas is refunded.
Frequently Asked Questions
Common Troubleshooting Tips
Hex Conversion Issues Ensure proper hex to decimal conversion (0xcce416600 = 55,000,000,000 wei, not 54,816,600,000)
Use Suggested Values Don't use raw block base fee; use RPC-suggested values that include buffers
Minimum Tip Is Fine Don't increase priority fee unless you specifically need priority during high load
Check Transaction Type Ensure you're setting the correct fields for Type 1 vs Type 2 transactions
Last updated