![]() In contrast to the base fee, the priority fee in the transaction is the amount that the user pays, and therefore it makes sense to keep it as low as possible. You can get the current L2 base fee in the gas tracker dashboard (opens new window). That plus a reasonable priority fee would be the value to put in the transaction as max gas fee, even though the L2 base fee (as I'm writing this) is 2,420 wei. In most cases, it makes sense to specify a much higher base fee than the current value, to ensure acceptance.įor example, as I'm writing this, ETH is about $2000, and a cent is about 5000 gwei.Īssuming 20% of a cent is an acceptable base fee for a transaction, and that the transaction is a big 5,000,000 gas one (at the target block size), this gives us a base fee of 200,000 wei. The base fee specified in the transaction ( max_gas_fee - max_priority_fee) is not necessarily the base fee that the user will pay, it is merely an upper limit to that amount. If it takes the user fourteen seconds to approve the transaction in the wallet, the base fee can almost double in that time. This is exactly how fees work on Ethereum with the added bonus that gas prices on OP Mainnet are seriously low.Īs blocks are produced every two seconds, the base fee can be between 54% and 1,745% of the value a minute earlier. Just like on Ethereum, transactions on OP Mainnet have to pay gas for the amount of computation and storage that they use.Įvery L2 transaction will pay some execution fee, equal to the amount of gas used by the transaction multiplied by the gas price attached to the transaction. There are two costs for transaction on OP Mainnet: the L2 execution fee and the L1 data/security fee. ![]() ![]() OP Stack fee estimation will soon be natively availabe in your favorite Ethereum tools. If the SDK is too heavy, or you just want to walk through some reference code, use (opens new window). You can use our SDK (opens new window) to calculate those costs for you. This page includes the formula for calculating the gas cost of transactions on OP Mainnet. ![]() Luckily, OP Mainnet's EVM equivalence (opens new window) makes these differences easy to understand and even easier to handle within your app. However, Layer 2 introduces some new paradigms that means it can never be exactly like Ethereum. Transaction fees on OP Mainnet work a lot like fees on Ethereum. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |