CLOCK_MODE() will not work properly for Arbitrum or Optimism due to block.number
The governance contract used block.number as a clock, which on Arbitrum and Optimism does not track real time reliably. This could make timing-dependent governance logic behave incorrectly on those chains.
Submitted by IceBear, also found by btk
Proof of Concept
According to Arbitrum Docs, block.number returns the most recently synced L1 block number. Once per minute, the block number in the Sequencer is synced to the actual L1 block number. Using block.number as a clock can lead to inaccurate timing.
It also presents an issue for Optimism because each transaction is it’s own block.
Recommended Mitigation Steps
Use block.timestamp rather than block.number
Assessed type
Timing
The governance contract only exists on the Ethereum mainnet.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the contract used block.number as a proxy for elapsed time, which is unreliable on chains where block production does not map to fixed time intervals.
Impact
On Arbitrum and Optimism the governance timing logic could be inaccurate; the project stated the contract only exists on Ethereum mainnet, which limits the practical exposure.
What the attacker needed
Contract deployed on Arbitrum or Optimism
The fix
It should be fixed by using block.timestamp instead of block.number for timing.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract can measure time in two ways: by counting blocks or by reading a timestamp. Counting blocks only works if each block takes a predictable amount of time. On some networks blocks are produced differently, so counting them gives the wrong sense of how much time has passed, and any rule that depends on that timing can misfire.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.