Optimistic Rollups and how scalable, low-cost applications are built using it?
Tags: rollups, optimisticrollups
Published: 2023-12-06 11:05:40

<p>General purpose and application-specific <a href="https://www.zeeve.io/appchains/optimistic-rollups/">Optimistic rollups</a> are widely&nbsp; used now-a-days as efficient Layer2 scaling solution because of their high throughput, lower costs and high degree of security from the base chain, in this case <a href="https://www.zeeve.io/blockchain-protocols/deploy-ethereum-blockchain/">Ethereum</a>. But how do <a href="https://www.zeeve.io/appchains/optimistic-rollups/">Optimistic rollups</a> actually work, how businesses can build one easily? These are some of the questions we will talk about in this edition of <a href="https://www.zeeve.io/rollups/">rollups</a>.&nbsp;</p>
<p>So, without a further ado, lets dive deep into the topic.&nbsp;</p>
<h2 id="h-what-are-optimistic-roll-ups">What are Optimistic Roll-ups?&nbsp;</h2>
<p><a href="https://www.zeeve.io/appchains/optimistic-rollups/">Optimistic roll-ups</a> are an off-chain scaling solution with the potential to scale the Ethereum base layer by a significant magnitude. Through the help of the optimistic roll-ups, the transcations can be bundled as one and posted on the mainchain. Such a practice will reduce the gas costs dramatically to support new use-cases to build on top of the <a href="https://www.zeeve.io/blockchain-protocols/deploy-ethereum-blockchain/">Ethereum Network</a>. This is because the total gas cost for that entire one bundle is now divided among many.&nbsp;</p>
<figure class="wp-block-image aligncenter size-large"><a href="https://www.zeeve.io/rollups/"><img src="https://www.zeeve.io/wp-content/uploads/2023/11/Blog-Banner-1-2-1024x130.png" alt="Optimistic rollups for scaling" class="wp-image-50126"/></a></figure>
<p>As the name suggests, <a href="https://www.zeeve.io/appchains/optimistic-rollups/">OP Rollups</a> assumes all transactions are valid by default. But have a 7 days challenger period, for raising objections. And in case there is any fraud, the OP rollup ecosystem can perform the transaction again and fix the issue. In this case, the last valid state is restored.&nbsp; More on this is discussed in the later section.&nbsp;</p>
<p>Since Optimistic rollups are EVM equivalent, they can easily integrate with the EVM ecosystem. The tools, <a href="https://www.zeeve.io/blog/smart-contract-standardization-a-necessity-for-the-large-scale-adoption-of-blockchain/">smart contracts</a> can also work seamlessly with <a href="https://www.zeeve.io/appchains/optimistic-rollups/">OP rollups ecosystem</a> with minor changes.&nbsp;</p>
<h2 id="h-how-does-optimistic-roll-ups-work">How Does Optimistic Roll-ups Work?&nbsp;&nbsp;</h2>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pj43t5ynd35vvspvk3aw.png)
<p>The user has to submit the transaction to the operator who passes the same to the sequencer for sequencing the transactions. Once the transcations are sequenced, they aggregate them for&nbsp; insertion&nbsp; to the main chain as a calldata. And on the Ethereum chain a series of <a href="https://www.zeeve.io/blog/smart-contract-standardization-a-necessity-for-the-large-scale-adoption-of-blockchain/">smart contracts</a> store and track the state of rollup blocks.&nbsp;</p>
<p>On the <a href="https://www.zeeve.io/appchains/optimistic-rollups/">Optimistic ecosystem</a>, the validators verify the transactions by&nbsp; bonding&nbsp; tokens against the same. In the event that validators' final state of the transactions are different from operators' proposed state as verified by the OVM, a challenge period will be triggered which shall validate the transcations through a Merkle Hash proof from the OVM&nbsp; to include them in the L1 block. If the challenger is found correct, the validator loses the fund, whereas, if the challenger is found at fault, the validator shall receive the funds from the challenger.&nbsp;</p>
<h2 id="h-architectural-engineering-of-optimistic-roll-ups-to-scale-dapps">Architectural Engineering of Optimistic Roll-Ups&nbsp; to Scale Dapps?</h2>
<p>The way <a href="https://www.zeeve.io/rollups/">rollups</a> make the blockchain faster is by breaking down separate parts of the transaction processes between multiple layers.&nbsp;</p>
<li>Transaction Handling: In this layer, the receiver shall be accepting the transcations and verifying its validity. If they are complying with the rules of the blockchain, the transaction handling operator shall push it forward to the sequencer.&nbsp;</li>
<li>Block Creators/ Sequencers: The sequencer is the next important entity in the architecture responsible for arranging the transcations in sequence. He/she will be using time-stamp hashes to arrange all the transcations in order of time and place them in the <a href="https://www.zeeve.io/rollups/">roll-up</a> blocks as blocks of transaction. Responsible for sequentially placing the blocks protected by a hash-function that time-stamps and places the blocks in order.&nbsp;</li>
<li>Batching: In this stage of transaction handling, similar to in a typical L1 block, the batcher shall be batching the transcations in batch as per the block sizes allowed. If the op-batches&nbsp; are overburdened, the batcher shall move transcations to another batch to reduce computational burden and link the same with the next batch to restore security.&nbsp;</li>
<li>Data Delivery: Since every batch is separately handled, the batcher posts the data on the Op-VM. The Op-VM helps the main-chain, which is the L1 to verify the data as call-data which reduces the load on the L1 chain increasing scalability and lowering the gas fees to scale dapps.&nbsp;</li>
<li>Challengers: If the data posted on Op-VM doesn’t meet a challenge within a specific challenger period because all transcations are labeled correctly, they are posted on the mainchain and included in the blocks of transcations of the main chain.&nbsp;</li>
<h2 id="h-how-does-optimistic-roll-ups-verify-a-fraud">How Does Optimistic Roll-ups Verify a Fraud?</h2>

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rf4iqdfr0sc51gdayw46.png)
<p>The roll-up environment revolves around a pre and post state based on time locking. Using the Merkle Root Function, the roll-up environment helps in encoding a large amount of data, which should ideally be a part of a larger data for validation. Now, if at any point in time, a validator tries to compromise the network, the state root shall verify the same with the Merkle Root Function for a pre and post state of the network. If any discrepancies are found based on a challenger period, the network shall roll-back all transcations that have happened post that timeline. In the above image, as you can see, the flow of funds between A to B and from&nbsp; For example, as per the below given image;&nbsp;</p>
<p>If Alice sends 20$ to Bob which makes Bob’s balance $110, Bob sends additionally 60$ to Charlie which makes Charlie’s balance which was 110 to 170 and Bob’s balance, which was $110 to $50, but Charlie wishes to send 200$ to David, which the validator shall validate with the state root function. If the validator finds any discrepancies in the pre and post state root, all the&nbsp; transcations happening post a specific point of fraud/failure will be rolled back to the original state and validated through a <a href="https://www.zeeve.io/blog/cryptographic-hash-algorithms-benefits-functionality-and-applications/">cryptographic hash function</a>.&nbsp;</p>
<h2 id="h-start-building-on-optimistic-rollups-using-zeeve-platform">Start Building on Optimistic Rollups using Zeeve platform:&nbsp;</h2>
<p>Okay, so a lot has been discussed and it’s time to take an action towards building your application on a <a href="https://www.zeeve.io/appchains/optimistic-rollups/">Optimistic Rollup chain</a>. If you want to leverage a public, general purpose Optimistic Rollup chain, like <a href="https://www.zeeve.io/blockchain-protocols/deploy-optimism-node/">Optimism</a> or <a href="https://www.zeeve.io/blockchain-protocols/deploy-arbitrum-node/">Arbitrum</a>, you need access to <a href="https://www.zeeve.io/validator-nodes/">validator</a> and full nodes for them.&nbsp;</p>
<p><a href="https://www.zeeve.io/">Zeeve</a> provides dedicated infrastructure for both Arbitrum and Optimism with low-code and a few-click deployment access with in-depth monitoring, alerts and analytics. In case, your need is application-specific OP rollups chain, with lots of customization, use <a href="https://www.zeeve.io/rollups/">Zeeve’s Rollups-as-aservice (RaaS)</a> to launch your <a href="https://www.zeeve.io/rollups/">rollup chain</a> with a few clicks using <a href="https://www.zeeve.io/appchains/optimistic-rollups/">OP Stack framework</a>. Aside from getting into production faster with all necessary infrastructure component like faucets, explorers, data indexers etc, using Zeeve RaaS platform can save you a lot on your deployment and recurring management costs. Plus, you get an unified dashboard for all your deployment and management needs, 24/7 monitoring, and alerts.&nbsp;</p>
<p>If you need more details regarding how <a href="https://www.zeeve.io/">Zeeve</a> can help you launch your first application on a L2 <a href="https://www.zeeve.io/appchains/optimistic-rollups/">Rollup</a> or maybe help you migrate from an existing blockchain, get in <a href="https://www.zeeve.io/talk-to-an-expert/">touch with our experts</a> and see how <a href="https://www.zeeve.io/">Zeeve</a> simplifies the <a href="https://www.zeeve.io/rollups/">rollup deployment and management</a> for all its clients.&nbsp;</p>