EVM 101 — XRPL-EVM Sidechain · Lesson 2 of 5

EIP-1559 gas in plain English

4 min · read

The XRPL-EVM sidechain uses Ethereum's EIP-1559 fee model — the same model Ethereum L1 has used since August 2021. Two prices, one fee, predictable economics.

The two prices

Every transaction declares two numbers:

  • base fee — set by the network, burned (or in XRPL-EVM's case, recycled). Adjusts up or down ~12.5% per block based on demand.
  • priority tip — paid to the validator who includes your tx. Your incentive for them to pick yours over a competing one.

Your total gas cost is: gas_used × (base_fee + priority_tip).

The wallet caps the total at a max fee per gas so that if the base fee spikes between your sign and inclusion, you're not surprised.

What "max fee" means

When you sign a transaction, you authorise up to max_fee_per_gas to be charged per unit of gas. The network charges the actual rate at inclusion time, which is always base_fee + tip (capped at your max). The difference is refunded.

Example: - You sign with max_fee_per_gas = 50 gwei and tip = 1 gwei - Block base fee at inclusion is 20 gwei - You pay 20 + 1 = 21 gwei per gas unit - 29 gwei × your gas units is refunded back to you

This is dramatically friendlier than the pre-EIP-1559 model where you guessed a fixed gas price and either overpaid or got stuck pending.

How the Gopnik wallet picks defaults

For the XRPL-EVM sidechain (typical base fee ~2-5 gwei):

  • priority_tip = 1 gwei (sufficient on a low-traffic sidechain)
  • max_fee_per_gas = min(2 × base_fee + tip, 100 gwei) (won't blow up even during congestion)

Power users can override both. The defaults are safe for the 99% case.

When gas estimation fails

The wallet runs eth_estimateGas before signing. If the simulation reverts (the tx would fail on-chain), the estimator throws and we abort the send — no gas wasted on a doomed tx.

Common revert reasons: - ERC-20 allowance not granted to the contract - Insufficient balance - Contract paused / function disabled - Slippage tolerance exceeded on a swap

The error surface usually shows the EVM revert reason. Read it before re-trying.

Gas in human terms

On Ethereum L1, a swap might cost €20. On the XRPL-EVM sidechain, the equivalent costs fractions of a cent. That's the entire reason a Layer-2-style architecture exists.

But: you still pay gas in XRP. If your sidechain XRP balance is zero, you can't sign anything — including the receive of an ERC-20 token, which requires gas to bring it onto your balance sheet. Always keep a few XRP for gas before bridging in other tokens.