The keeper will suffer continuing losses due to miss compensation for L1 rollup fees
Summary
While keepers submits transactions to L2 EVM chains, they need to pay both L2 execution fee and L1 rollup fee. The current implementation only compensates the keeper based on L2 gas consumption, the keeper will suffer continuing losses due to miss compensation for L1 rollup fees.
KingNFT
Medium
The keeper will suffer continuing losses due to miss compensation for L1 rollup fees
Summary
While keepers submits transactions to L2 EVM chains, they need to pay both L2 execution fee and L1 rollup fee. The current implementation only compensates the keeper based on L2 gas consumption, the keeper will suffer continuing losses due to miss compensation for L1 rollup fees.
Vulnerability Detail
As shown of the
Arbitrum
andBase
(op-stack) docs: https://docs.arbitrum.io/arbos/l1-pricing https://docs.base.org/docs/fees/ https://docs.optimism.io/stack/transactions/fees#l1-data-fee Each L2 transaction costs both L2 execution fee and L1 rollup/data fee (for submitting L2 transaction to L1)But current implementation only compensates the keeper the L2 gas consumption (L19).
Impact
The keeper will suffer continuing losses on each transaction
Code Snippet
https://github.com/sherlock-audit/2024-05-elfi-protocol/blob/8a1a01804a7de7f73a04d794bf6b8104528681ad/elfi-perp-contracts/contracts/process/GasProcess.sol#L19
Tool used
Manual Review
Recommendation
Compensating L1 rollup fee as references of the above
Arbitrum
andOptimism
docs: