8000 Fix estimateFee on optimism · Issue #602 · getwax/bls-wallet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Nov 5, 2023. It is now read-only.
This repository was archived by the owner on Nov 5, 2023. It is now read-only.
Fix estimateFee on optimism #602
Closed
@voltrevo

Description

@voltrevo

We currently use gasEstimate * gasPrice to estimate fees.

On Optimism, the L1 fee is charged separately, so we need to do this calculation separately and add it.
https://community.optimism.io/docs/developers/build/transaction-fees/#displaying-fees-to-users

The L1 fee is also dominant, causing the aggregator to dramatically under-charge the wallets, e.g.:
https://goerli-optimism.etherscan.io/tx/0x0dded0c7c0fafd8a114e5c1d427d259a61a65af487fe17263b4752494b8b340b
Wallet Fee: 0.000000000060302196
Aggregator Fee: 0.035376145885029056

With the BREAKEVEN_OPERATION_COUNT=4.5, it's expected the wallet fee would be lower, but it should still be within an order of magnitude.

Metadata

Metadata

Assignees

Labels

aggregatorAggregator backend related

Type

No type

Projects

Status

🤝 Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0