Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The wrong fee is estimated for Base and Opt networks on send/bridge/swap #21954

Open
VolodLytvynenko opened this issue Jan 20, 2025 · 2 comments
Assignees
Labels
bridge wallet: Send all issues for the send page of the wallet wallet: swap wallet-core Issues for mobile wallet team
Milestone

Comments

@VolodLytvynenko
Copy link
Contributor

VolodLytvynenko commented Jan 20, 2025

More context here

Steps to reproduce:

  1. Navigate to the Send Setup page.
  2. Build a transaction route.

Actual result:

The estimated maximum fee is always displayed as <0.01 USD.
However, after the transaction is performed, the actual fee is 0.1 USD.
image
send: https://basescan.org/tx/0xd0347976e2f41cc81c6a64e07650dca0746d24c487cb2e9c56dbaa6d6c0bfedd
image

image
send: https://basescan.org/tx/0xa7f093829962f8b3f7604d97b3818dc504d4dccbde363a49e56372f3ac453094
image

image
swap: https://basescan.org/tx/0x2df5a010af3754db7349909138d60f117de21a3de4aeabcf59557bb512321d41
image

Expected result:

The estimated maximum fee should accurately reflect the actual transaction fee (e.g., 0.1 USD).

ADDITIONAL INFO

The same issue happened for the Optimism network
image
https://optimistic.etherscan.io/tx/0x48aa2b2baf75c864e384789f56d46bceb5c2c18e1c7490e10790f93b6b73f254
image

@VolodLytvynenko VolodLytvynenko added this to the 2.33.0 milestone Jan 20, 2025
@VolodLytvynenko VolodLytvynenko added wallet-core Issues for mobile wallet team wallet: Send all issues for the send page of the wallet wallet: swap bridge labels Jan 20, 2025
@alwx alwx self-assigned this Jan 20, 2025
@alwx
Copy link
Contributor

alwx commented Jan 20, 2025

Isn't it a very similar issue? #21620

@VolodLytvynenko
Copy link
Contributor Author

Isn't it a very similar issue? #21620

@alwx Unfortunately, this is another case of incorrect fee estimation. In the first issue (#21620), the root cause is that the "bridge fee" and "approval fee" are not included for bridge transactions.

In the current issue, the mobile app calculates fees incorrectly for all types of transactions (swap/send/bridge) on the Optimism and Base networks. This happens because l1GasFee from SuggestedFees is used instead of TxL1Fee and ApprovalL1Fee, as mentioned here.

It would be great to fix both issues in a single PR if possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bridge wallet: Send all issues for the send page of the wallet wallet: swap wallet-core Issues for mobile wallet team
Projects
Status: Next
Development

No branches or pull requests

2 participants