Currently, when sending TXs on Scroll L2, the rollup fees are not accounted for.
Sometimes this can result in failed transactions.
Idea is to create a snap (plugin) for Metamask to include them and show a breakdown of transaction fees
Specification
L2 Gas Price
Fee charged to an User using an L2 can be broken down to:
L2 gas fee
This is calculated pretty much the same as on the L1, formula being gas_price * gas_used
L1 data fee
This is an additional fee that covers the cost of sending data to L1 for data availability.
It's calculated based on the size of tx calldata
Problem
Since most regular wallets aren't aware of L1 data fee happening on the rollup, they are unable to display it in their UI.
If the wallet has enough assets to pay for the gas fee, the transaction will pass but the user will be deducted more funds than what they were expecting since the UI didn't display the additional fee.
If the wallet doesn't have enough funds to pay for gas, the transaction will simply fail or the wallet will simulate it and conclude it will fail, not allowing user to emit it to the network. This leaves the user confused on why he can't interact with some DApp.
Solution
Extend Metamask wallet using Snaps to be aware of complete L2 gas fees.
Goal is to:
Show better insight into gas for transactions
Handle errors as to prevent user being left in confusion
Name of the project
Bridge Fee Aware Metamask Snap
Project abstract
Currently, when sending TXs on Scroll L2, the rollup fees are not accounted for. Sometimes this can result in failed transactions.
Idea is to create a snap (plugin) for Metamask to include them and show a breakdown of transaction fees
Specification
L2 Gas Price
Fee charged to an User using an L2 can be broken down to:
L2 gas fee
gas_price * gas_used
L1 data fee
Problem
Since most regular wallets aren't aware of L1 data fee happening on the rollup, they are unable to display it in their UI. If the wallet has enough assets to pay for the gas fee, the transaction will pass but the user will be deducted more funds than what they were expecting since the UI didn't display the additional fee. If the wallet doesn't have enough funds to pay for gas, the transaction will simply fail or the wallet will simulate it and conclude it will fail, not allowing user to emit it to the network. This leaves the user confused on why he can't interact with some DApp.
Solution
Extend Metamask wallet using Snaps to be aware of complete L2 gas fees. Goal is to:
Useful links