Ephemeral Rollups: The Whats and Hows

Md ZeeshanMd Zeeshan
5 min read

Imagine a blockchain game where players compete in a click-frenzy, racking up thousands of clicks each. Each click translates to a transaction on the blockchain, and soon, the network grinds to a halt under the weight of a million clicks. This is the scalability challenge that plagues many blockchains – the more users, the slower things get.

Ephemeral Rollups are a new type of ‘short-lived’ scaling solution that takes the burden off the main blockchain (L1) by creating temporary, off-chain environments. Think of them as pop-up processing centres that handle the heavy lifting during peak hours.

Here’s a 3-step process on how they work:

Now Let’s take the example of a clicking game wherein the player with the most clicks wins

Using the above 3-step process, here’s how the Ephemeral Rollup would work in this clicking game:

  • Short-Lived Stages: Unlike traditional rollups, Ephemeral Rollups are designed for a specific purpose and exist for a short duration. In our click-counter game example, the rollup would be active only during the game's duration.

  • Off-Chain Processing Power: Transactions happening within the game (clicks in this case) are processed off-chain within the rollup. This frees up the main blockchain for more critical tasks.

  • Final Score on L1: Once the game concludes, the final scores (representing the total number of clicks) are submitted to the L1 for permanent storage. This ensures the game's integrity and allows anyone to verify the results later.

A well-explained architecture is this highlighting the ER’s scalability solution focusing on how a game program manages its state across multiple accounts. The example illustrates two PDAs (Program Derived Addresses) each responsible for recording a state, which could be the position of players. These PDAs are then delegated to the Ephemeral Rollup delegation program (DLP) 👇

(source: https://arxiv.org/pdf/2311.02650 )

Benefits of Ephemeral Rollups

  • Developers can deploy programs to the base layer/L1 (e.g., Solana), rather than on a separate chain as it would normally happen with rollups. Programs live on the base layer/L1 and can interact with any existing protocol and assets. ERs don’t fragment the existing ecosystem and allow the speed-up of targeted operations without creating an isolated environment.

  • Ephemeral Rollups allow FOC games to scale without compromising composability on the base layer by allowing the devs to take advantage of the L1’s infra directly. This includes code libraries, testing tools, etc.

  • The specialized runtime can accommodate game-specific customizations (e.g., ticking or passive events, typical in games, as opposed to the event-driven runtime of blockchains) without the need to pay gas fees on those specific accounts.

Case Study: How can we use Ephemeral Rollups for storing the data on-chain for the Avail Football Match

Before Proceeding, Study this figure once

Now Suppose there is a football match with the following details:

  • 2 Teams → Team 1 and Team 2

  • Each player will have its own unique state

  • Final Result to be stored on-chain which would include the final score and name of Man-of-Match (MOM)

  • The player state, on the other hand, refers to the real-time status and attributes of the game elements, which are stored on-chain, providing a consistent and synchronized environment for all players. It reflects the game’s current situation, from player positions to assets and scores.

So here is how the process would work:

  1. Data of both teams would be temporarily stored on the rollup along with states of each player of both teams

  2. Firstly, all the processes would occur on the rollup. In this case, goal count of each player + score of each team would be stored on the rollup for further processing

  3. This typically means that once player 1 of team 1 scores, the following process will occur

  • Player 1’s state and goal count would be increased by 1 and would be processed as a transaction

  • Team 1’s count will be increased by 1 and will be processed as another transaction

So, this means 2 updation transactions in case of 1 goal scored

4. Now for each goal, similar transactions would occur and all of this processing would occur ‘strictly off-chain’ until the final whistle or 90th minute

5. Suppose the match ends with a score of 2-1 with player-2 (P2) of team 1 being MOM. The final data would be stored in the following format

Final_Result{

        Final_Score{

            Team_1: 2
            Team_2: 1

        }

        Man_of_the_match{

            Player_name: P2
            Goal_count: 1

        }

}
  1. This final result would be the data stored on-chain or on the L1. Now since these rollups are short-lived, the data is archived but can always be referred to for future references

Final Conclusion:

Hence, we can see how these rollups can be used for on-chain games and the data can be referenced later on.

As the technology matures, we can expect to see them powering various use cases beyond games, such as:

  • Decentralized marketplaces: Imagine a bustling marketplace where thousands of transactions co-occur, all handled seamlessly by Ephemeral Rollups.

  • Supply chain management: Track the movement of goods in real-time with the efficiency of Ephemeral Rollups, ensuring transparency and trust throughout the supply chain.

  • Social media platforms: Imagine a decentralized social media platform where millions of users interact without compromising transaction speed or network security.

References:

0
Subscribe to my newsletter

Read articles from Md Zeeshan directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Md Zeeshan
Md Zeeshan