Skip to content

Files

Latest commit

d929093 · Mar 12, 2025

History

History
60 lines (35 loc) · 2.15 KB

File metadata and controls

60 lines (35 loc) · 2.15 KB

EIP-1559 - priority fees

More info in notion

  • ✅ Ethereum Mainnet + Holesky + Sepolia
  • ✅ Arbuirum
  • ✅ Base
  • ⚠ (Supported by infura, not yet impmemented in suite) BNB mainnet (Base fee is 0)
  • ✅ Optimism
  • ✅ Polygon mainnet
  • ❌ Ethereum Classic (not supported)

Blockbook

It is possible to send EIP-1559 transaction, although when we receive transaction data, eip1559 information is not present.

This has to be fixed on blockbook side. (Martin Böhm should be working on it right now)

This is a blocker for sending RBF and correctly displaying transaction fees data in transaction details.

Passing eip1559 transaction to firmware

In Firmware maximum fee is calculated:

https://github.com/trezor/trezor-firmware/blob/13c078f8af75135ac757423da3fc0c013186c32c/core/src/apps/ethereum/sign_tx_eip1559.py#L65

maximum_fee = format_ethereum_amount(max_gas_fee * gas_limit, None, defs.network)

Since we can’t provide baseFeePerGas to firmware, we should calculate effective gas price on the suite side and pass the selected price to maximum_fee. Priority fee is being passed just for the purpose of displaying it, in fact it's being already included into effective gas price.

Misc

I have some thought processes documented here, although it's not complete, it can help you to understand how I reasoned about the forms. Which is the most challenging part about implementing this feature.

While testing, I recommend having a list of each part of the app where you have the fees component and after you test it document the send transaction.

Staking

Stake

Unstake/Claim

Send

Swap

Approval tx for tokens on DEX

The swap tx on DEX

CEX

Sell

Each of the above scenarios has to be tested with:

  • legacy fees with backend disconnected/returning only normal fee level (standard and custom)
  • legacy fees when the network feature is turned off
  • priority fees with a standard fee level
  • priority fees with custom fee level