Cartesi x Shutter: MEV in generalized computing applications
Thanks to @felipeargento from Cartesi for feedback and input on this blog post!
Maximal Extractable Value (MEV) is gaining an advantage by positioning transactions strategically in a blockchain block. It's significant in areas like high-frequency trading and DeFi, affecting profits and trade outcomes.
The Cartesi Virtual Machine introduces Linux OS into blockchain computation, expanding developers' access to programming tools and languages. It aims to go beyond Ethereum's limitations while ensuring security and censorship resistance.
This blog post explores how MEV could extend to computing applications and gaming on platforms like Ethereum L2. It can impact resource allocation, data access, and operational efficiency. In gaming, it affects matchmaking, resource acquisition, and game strategy.
Cartesi and Shutter are collaboratively offering MEV protection at both the protocol (L2) and application levels, enhancing transaction privacy and application security.
MEV explained
MEV is a concept where certain users can gain an advantage by strategically positioning their transactions in a block. Although not inherently negative, it raises concerns about fairness and security, as it can sideline smaller participants, centralize the network, and introduce additional censorship vectors.
Cartesi VM
The Cartesi Virtual Machine introduces a novel approach to blockchain computation through its ability to boot a Linux operating system. This allows Web3 developers to access a broad range of existing code libraries, programming languages, and open-source tooling. Cartesi extends beyond the EVM's design limitations, maintaining Ethereum's security and censorship resistance, which is critical for trust and reliability in blockchain applications.
In the context of MEV in generalized computing applications, especially with a system like the Cartesi VM acting as a Linux-based L2 on Ethereum, we're presented with an interesting thought (and possibly practical) experiment: What does MEV look like in generalized computing applications and gaming? Is it good or bad? Can we do something about it?
MEV in gaming
Cartesi VM is especially strong for gaming use cases. In a multiplayer gaming environment built on a platform like an Ethereum L2, MEV could manifest in several unique ways. These scenarios typically involve players or other parties attempting to gain advantages by exploiting the transaction ordering or timing in the underlying blockchain.
Here are some specific examples:
Matchmaking Priority MEV: Players or teams might pay to influence matchmaking algorithms to get favorable matchups. This could mean avoiding high-skill players or being matched against less experienced opponents, thus increasing their chances of winning.
In-Game Resource Acquisition MEV: In games where in-game resources (like items, weapons, or power-ups) are critical, players might pay to ensure they are the first to access these resources. This could involve prioritizing transactions that claim these resources, effectively giving paying players an unfair advantage.
Real-Time Strategy Game Manipulation MEV: In real-time strategy games, the timing of actions can be crucial. Players might pay to have their actions (like attacks, movements, or building) processed before their opponents', giving them a tactical edge.
We've seen on-chain RTS games like Dark Forest or DAOPlomacy deal with these issues using cryptography.
Spawn Point Manipulation MEV: In games where spawn points of players or resources are critical, players might pay to influence the spawn timing or location to their advantage.
Latency Manipulation MEV: Players might pay to reduce their network latency or increase others', impacting real-time gameplay. This could be especially relevant in fast-paced, competitive games where reaction time is key.
Server Queue Jumping MEV: In popular games with server queues, players might pay to jump ahead in the queue, ensuring faster access to the game, especially during peak times.
In-Game Advertising MEV: Companies or individuals might pay to prioritize their advertisements or messages within the game, targeting high-traffic areas or peak gameplay times for maximum exposure.
In all these scenarios, the key element of MEV in multiplayer gaming is the ability to gain in-game advantages through external payments or manipulation of the underlying blockchain system. This introduces significant challenges in ensuring fairness and integrity in the gaming experience. As blockchain technology becomes more integrated into gaming, developers and platform operators must devise strategies to mitigate these potential system abuses.
MEV in generalized computing applications
Moving on from these insights about gaming MEV, exploring which form MEV could take in generalized computing applications is also interesting. Here are some specific examples:
Resource and Performance MEV: This involves prioritizing transactions to secure scarce computing resources (CPU time, memory, storage) or enhance application performance. Users might pay to ensure their applications run efficiently, influencing resource allocation and network request handling, which is crucial, e.g., real-time analytics.
Data and Network MEV: Opportunities arise from manipulating transaction ordering for earlier access to data, potentially impacting privacy and security. Additionally, users might pay to reduce network latency, which is vital for real-time processing or communication applications.
Operational MEV: This includes paying for preferential treatment in service availability, task execution order, and API call prioritization. Businesses might prioritize their service maintenance or deployment transactions. At the same time, users could seek to influence the execution order of tasks or API requests, impacting various applications like data analysis or external data-dependent services.
In all these scenarios, MEV goes beyond financial benefits, encompassing any advantage gained from transaction manipulation in a decentralized computing environment, posing distinct challenges and opportunities in system design, security, and fairness.
Deep dive: DAOPlomacy
DAOplomacy, a decentralized game modeled after the classic board game "Diplomacy," faces a unique MEV-type problem inherent to its gameplay and structure. In DAOplomacy, seven DAOs (Decentralized Autonomous Organizations) compete to claim territories on a map. The game's key feature is that moves are planned secretly and executed simultaneously each round, making strategy and secrecy critical elements.
The MEV-type problem in DAOplomacy arises from the need to keep these moves secret until they are executed. If other players or DAOs could see a DAO's moves in advance, they could adjust their strategies accordingly, gaining an unfair advantage. This is akin to traditional MEV issues in blockchain, where entities can exploit information about pending transactions.
To solve this problem, DAOplomacy utilizes the technology developed by Shutter. Shutter protocol is designed to prevent front-running on Ethereum by employing a threshold cryptography-based distributed key generation (DKG) protocol. In the context of DAOplomacy, Shutter's role is to ensure that the game moves remain encrypted and hidden from other players until they are all executed. This encryption is vital for maintaining the integrity of the game, as it preserves the element of surprise and strategic planning that is fundamental to Diplomacy.
By using Shutter, DAOplomacy effectively shields the moves of each DAO from the others, preventing any form of strategic front-running or unfair advantage based on early access to information regarding moves.
Shutter MEV protection for L2
Shutter leverages threshold encryption to provide malicious MEV protection on L2. Here's a proposal for this for the OPStack. It could also mean building application-layer encryption solutions, similar to how it was built for DAOPlomacy and Snapshot's shielded voting, powered by Shutter.
If you're developing a generalized purpose application or game, contact Cartesi or us if you're interested in learning more about MEV!