L2 gas fee calculation comparison
For Polygon zkEVM, there are multiple cases depending on configuration:
With follower mode and enabled effective gas price, the gas fee is min(Effective gas price, L2 gas price * L2 gas used). Polygon zkEVM mainnet is using this approach.
With follower mode and disabled effective gas price, the gas fee is L2 gas price * L2 gas used. Astar zkEVM would take this approach for testnet.
For Optimism, the gas calculation formula is: [ Fee Scalar * L1 Gas Price * (Calldata + Fixed Overhead) ] + [ L2 Gas Price * L2 Gas Used ], which is basically L1 fee + L2 fee.
Source: Transaction fees on OP Mainnet