Skip to content

Huge performance degradation in dApp and connected wallets due to excessive eth_chainId requests #1815

Description

@superKalo

Bug Description

The dApp floods connected wallets with redundant eth_chainId requests (hundreds to thousands per interaction). This causes severe slowdowns and can crash wallet background/service workers due to request queue overload.

While testing, the app was observed sending ~500 requests/sec and up to 2200+ eth_chainId calls after entering a swap amount.

Steps to Reproduce

  1. Open https://dapp.quickswap.exchange
  2. Connect Ambire wallet (but observed with multiple wallets).
  3. Enter a token amount for swap (example: POL).
  4. Observe RPC traffic / wallet logs.
    Image

Expected Behavior
The dApp should not spam eth_chainId requests.
A single request (or occasional checks) should be enough, similar to behavior seen in other apps.

Additional Context

  • The issue is reproducible across wallets (Ambire, MetaMask, Rabby).
  • Requests stop only after wallet responses arrive.
  • This creates unnecessary load and slows wallet ↔ dApp communication during transactions.
  • In Ambire, this originally caused service worker crashes due to excessive promise queuing (fix applied wallet-side in our v5.38.4 onward as mitigation).
  • Root cause appears to be on the dApp side due to redundant chainId polling.

Greetings from the Ambire team ✊

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions