  The emergence of decentralized finance has transformed asset trading on the
blockchain, making traditional financial instruments more accessible while also
introducing a series of exploitative economic practices known as Maximal
Extractable Value (MEV). Concurrently, decentralized finance has embraced
rollup-based Layer-2 solutions to facilitate asset trading at reduced
transaction costs compared to Layer-1 solutions such as Ethereum. However,
rollups lack a public mempool like Ethereum, making the extraction of MEV more
challenging. In this paper, we investigate the prevalence and impact of MEV on
Ethereum and prominent rollups such as Arbitrum, Optimism, and zkSync over a
nearly three-year period. Our analysis encompasses various metrics including
volume, profits, costs, competition, and response time to MEV opportunities. We
discover that MEV is widespread on rollups, with trading volume comparable to
Ethereum. We also find that, although MEV costs are lower on rollups, profits
are also significantly lower compared to Ethereum. Additionally, we examine the
prevalence of sandwich attacks on rollups. While our findings did not detect
any sandwiching activity on popular rollups, we did identify the potential for
cross-layer sandwich attacks facilitated by transactions that are sent across
rollups and Ethereum. Consequently, we propose and evaluate the feasibility of
three novel attacks that exploit cross-layer transactions, revealing that
attackers could have already earned approximately 2 million USD through
cross-layer sandwich attacks.
