This repository has been archived by the owner on Nov 26, 2023. It is now read-only.
ecexit - eccentricexit - Updates to Inflation Multiplier on L2 can undone by anyone via OOG + replay. #159
Labels
Duplicate
A valid issue that is a duplicate of an issue with `Has Duplicates` label
Escalation Resolved
This issue's escalations have been approved/rejected
High
A valid High severity issue
Reward
A payout will be made for this issue
ecexit
high
eccentricexit - Updates to Inflation Multiplier on L2 can undone by anyone via OOG + replay.
Summary
The protocol governs governs the inflation multiplier on the
L2EcoBridge
contract via an L1 to L2 message. An adversary can craft a transaction with just enough gas so that when it reaches the L2 it runs out of gas at the proper moment. Then, when favorable, they can replay this message to update the inflation multiplier to an old value.Vulnerability Detail
The behavior is as following:
inflationMultiplier
toL2EcoBridge.inflationMultiplier
. She passes a large enough_l2Gas
to the call such that it entersL2ECOBridge.rebase
function, but small enough that it reverts there due to Out Of Gas (OOG) error:L2ECOBridge.rebase
L2CrossDomainMessenger.relayMessage
and it marks that transaction (tx1
) asfailed
:Things continue operating normally. Inflation multiplier is updated L1 ECO token 1 or N times, people call
L1ECOBridge.rebase
with enough gas, keeping the L2 up to date.Alice doesn't like the current inflation multiplier so she sends a transaction to
L2CrossDomainMessenger.relayMessage
to replay her oldtx1
transaction. This time, she provides enough gas such that the execution completes, reverting the inflation multiplier to the old value.Impact
An adversary can effectively DoS updates to the inflation multiplier indefinitely and benefit from the broken, inconsistent state.
Code Snippet
Tool used
Manual Review
Recommendation
Disallow in the contract passing a too low
l2Gas
toL1ECOBridge.rebase
.Duplicate of #142
The text was updated successfully, but these errors were encountered: