EIP-1559 Fee Mechanism in Mobile Wallet

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
EIP-1559 Fee Mechanism in Mobile Wallet
Medium
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing EIP-1559 Fee Mechanism in Mobile Wallet

Before EIP-1559, wallets guessed gasPrice—often overpaid or transactions hung. EIP-1559, activated at Ethereum block 12,965,000 (August 2021), introduced predictable fee structure. Supporting it correctly means more than using new fields—it means explaining them to the user.

Type 2 Transaction Structure (EIP-1559)

Type 2 transactions contain three key parameters instead of one gasPrice:

  • baseFee — automatically calculated by the protocol, burned (doesn't go to miner). Increases 12.5% on full blocks, decreases on empty. Get current: eth_getBlockByNumber("pending", false)baseFeePerGas field.
  • maxPriorityFeePerGas (tip) — miner/validator reward. Minimum tip for block inclusion—usually 0.1–2 Gwei.
  • maxFeePerGas — absolute maximum the user will pay. Actually charged: min(maxFeePerGas, baseFee + maxPriorityFeePerGas). Difference refunds.
// iOS — web3swift: build EIP-1559 transaction
var transaction = CodableTransaction(
    type: .eip1559,
    to: recipientAddress,
    value: amount,
    data: Data()
)
transaction.maxFeePerGas = baseFee + maxPriorityFee + buffer
transaction.maxPriorityFeePerGas = maxPriorityFee
transaction.chainID = BigUInt(1) // Ethereum Mainnet

Why maxFeePerGas Matters More Than gasPrice

User sees maxFeePerGas = 50 Gwei, but if baseFee at mining is 20 Gwei and tip is 2 Gwei, they pay 22 Gwei. The remaining 28 Gwei refund. Key difference from legacy where the full amount went to the miner.

In the UI, show not maxFeePerGas but expected fee (baseFee + tip) and max possible (maxFeePerGas * gasLimit). Reduces user anxiety from seeing a big max.

Dynamic Recommendations

Update recommended values every 12 seconds (Ethereum block time). Sources:

  • eth_feeHistory — calculate percentile priority fee yourself
  • eth_maxPriorityFeePerGas — MetaMask method, supported by Infura, Alchemy, QuickNode
  • Blocknative Gas API — paid, very accurate for Mainnet
// Android — get recommended priority fee
val maxPriorityFeeResponse = web3j.send(
    Request("eth_maxPriorityFeePerGas", emptyList<Any>(), web3jService, EthMaxPriorityFeePerGas::class.java)
)
val priorityFeeWei = maxPriorityFeeResponse.maxPriorityFeePerGas

Networks Without EIP-1559

BNB Chain uses legacy format with fixed gasPrice (default 3 Gwei). Polygon supports EIP-1559 since version 26.x. Arbitrum and Optimism have custom mechanisms on top of EIP-1559.

The app must detect network type and choose the right transaction format automatically. Sending type-2 transaction to a non-EIP-1559 network returns unsupported transaction type.

Timeline: 2–3 days: network type detection, type-2 transaction building, dynamic fee recommendations, display expected and max cost, automatic legacy fallback for incompatible networks.