<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Stackr Labs</title>
        <link>https://paragraph.com/@stackrlabs</link>
        <description>Micro-rollups to scale web3 applications</description>
        <lastBuildDate>Tue, 07 Apr 2026 18:05:30 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>Stackr Labs</title>
            <url>https://storage.googleapis.com/papyrus_images/4ed7752a893152abc2b877aeef8d7adb302c72e7688d68ac251125929a09ab52.png</url>
            <link>https://paragraph.com/@stackrlabs</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[Your definitive guide to zkVMs]]></title>
            <link>https://paragraph.com/@stackrlabs/your-definitive-guide-to-zkvms</link>
            <guid>EJ6RDYXo0S5HOu7Fy9pY</guid>
            <pubDate>Fri, 13 Dec 2024 15:01:15 GMT</pubDate>
            <description><![CDATA[Researched and written by our awesome engineering team - Aashutosh Rathi, Prudhvi Rampey, zk_cat and Kautuk during their time at Succinct’s ZK-Residency program that took place in October 2024.The goal of this article is to not only provide objective performance metrics but also talk about the subjective experience while we were building using this toolkit -Developer ExperienceDocsSupport / CommunityCode / APIHappiness QuotientFeaturesPerformanceGeneral-purpose zkVMs have become a powerful fo...]]></description>
            <content:encoded><![CDATA[<blockquote><p><em>Researched and written by our awesome engineering team - </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/AashutoshRathi/"><em>Aashutosh Rathi</em></a><em>, </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/0xRampey"><em>Prudhvi Rampey</em></a><em>, </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/zkcat_eth"><em>zk_cat</em></a><em> and </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/Kautukkundan"><em>Kautuk</em></a><em> during their time at Succinct’s </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://blog.succinct.xyz/zk-residency/"><em>ZK-Residency program</em></a><em> that took place in October 2024.</em></p></blockquote><p>The goal of this article is to not only provide objective performance metrics but also talk about the subjective experience while we were building using this toolkit -</p><ol><li><p>Developer Experience</p><ol><li><p>Docs</p></li><li><p>Support / Community</p></li><li><p>Code / API</p></li><li><p>Happiness Quotient</p></li></ol></li><li><p>Features</p></li><li><p><strong>Performance</strong></p></li></ol><hr><p>General-purpose zkVMs have become a powerful force in quickly building scalable and privacy-preserving applications. Builders no longer need to master low-level circuit construction or complex zk mathematics. By supporting popular languages like Rust and its vast ecosystem, zkVMs help builders reduce development time by orders of magnitude. The idea is simple but potent: <em>Write once in Rust, prove anywhere.</em></p><p>But with the number of zkVMs out there, choosing the right one can be a challenge. We sought to answer some critical questions:</p><ul><li><p>What zkVMs are available to use, and how do they perform under real-world conditions?</p></li><li><p>What is the developer experience like for each one?</p></li><li><p>What nuances arise in working with different zkVMs?</p></li><li><p>Can we prove arbitrary Wasm logic inside a zkVM? (spoiler: Yes!)</p></li></ul><p>This is why we conducted <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/rkdud007/awesome-zkvm?tab=readme-ov-file#bench">yet-another</a> detailed benchmarking exercise, focusing on not only performance but also the practicality and developer experience of each zkVM. We selected 8 real-world cryptographic algorithms that are computationally expensive to directly run on-chain and ran them inside 6 zkVMs: SP1, RISC0, Jolt, Nexus, Delphinus and Powdr. You can view the algorithms and benchmark numbers <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.google.com/spreadsheets/d/1HwZQkgiUro9Nl30tO3KdXizB_D-1_J3vIVXbTvuY2Mw/edit?gid=362585795#gid=362585795">here</a>.</p><h1 id="h-ready-set-bench" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Ready, Set, Bench</h1><p>We conducted our benchmarking on the following zkVMs with some commonly used operations with varying complexities and input sizes.</p><ul><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.succinct.xyz/">SP1</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://dev.risczero.com/api/zkvm/quickstart">RISC Zero</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://jolt.a16zcrypto.com/usage/quickstart.html">Jolt</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://zkwasmdoc.gitbook.io/delphinus-zkwasm/c1_beginner/c1_quickstart">Delphinus</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://nexus.xyz/zkvm">Nexus VM</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.powdr.org/blog/powdrvm">Powdr</a> (late addition, results in spreadsheet)</p></li></ul><blockquote><p><em>We initially planned to include </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.lita.foundation"><em>Valida</em></a><em>, but its toolchain wasn’t functional when we began this project. Now that Valida has released an improved Rust toolchain, we’ll revisit it and may follow up with a future article.</em></p></blockquote><p>We chose the following algorithms to benchmark against:</p><ul><li><p>nth Prime</p></li><li><p>ECDSA Verification</p></li><li><p>BLS Verification</p></li><li><p>BLS Aggregation</p></li><li><p>Keccak</p></li><li><p>Poseidon</p></li><li><p>Merklization</p></li><li><p>Merkle Inclusion Proof</p></li></ul><p>To provide a roughly fair comparison, all measures of performance are based on clock cycle counts - each cycle representing a single iteration of a virtual RISC-V processor loop. Clock cycle counts remain consistent across runs on similar hardware, so higher cycle counts generally indicate longer proving times. Except for Delphinus, all the zkVMs here are based on the RISC-V ISA.</p><p>To help visualize our results, we&apos;ve plotted the data on logarithmic scales. The y-axis in each graph shows cycle counts, while the x-axis corresponds to input size (<code>n</code>). In all comparisons, a lower number is better.</p><h2 id="h-algorithm-1-nth-prime" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Algorithm 1: nth Prime</h2><p>This deceptively simple algorithm challenges zkVMs, especially when calculating large primes like the 100,000th prime number.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/37504358fe2a593da591a0b8001f4e5de9374a62662a4f1b0c2cc3bdb210220a.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Most of them performed similarly, however, the Nexus VM requires significantly more cycles than other zkVMs, indicating a substantial performance gap while Jolt OOMs (out of memory, read: our archenemy) out earlier. Other zkVMs cluster much closer together in terms of performance, but <strong>all zkVMs show increasing cycle counts as input size grows—a trend that will continue across other algorithms.</strong></p><h2 id="h-algorithm-2-keccak-hashing" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Algorithm 2: Keccak hashing</h2><h3 id="h-precompiles-accelerators" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Precompiles / Accelerators</h3><p>Precompiles (SP1) and accelerators (R0) are built-in functions within a virtual machine that execute specialized operations more efficiently than executing the same logic as a standard contract or bytecode, thereby reducing computational overhead and cycle counts. Both SP1 and RISC-0 have a lot of prebuilt libraries for common operations</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7609163bb5177299288b84775c5390db52894e35d8986709c39b595329209479.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>The presence of precompiles for keccak clearly provides a performance advantage, as seen with SP1 (orange line). While the Nexus VM (purple line) remains inefficient compared to other zkVMs, and RISC0 lags as input size increases, SP1’s implementation with precompiles significantly reduces cycle counts. <strong>Among zkVMs without precompiles, SP1, Jolt, Powdr, and Delphinus perform similarly, further highlighting the impact of precompiles in enhancing efficiency.</strong></p><h2 id="h-algorithm-3-merklization" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Algorithm 3: Merklization</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/f3fbb6efcbda5c34cdda46c67a9b5262970c5df0534393333ac2c7c99a0843bb.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Once again, Nexus VM consistently shows the highest cycle counts. Without precompiles, the other zkVMs cluster together in mid-range performance. For larger inputs, <strong>cryptographic accelerators provide significant improvements</strong>—particularly with SHA-2 precompiles in SP1 and RISC0.</p><h2 id="h-algorithm-4-bls-signature-verification" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Algorithm 4: BLS Signature verification</h2><p>BLS signature verification plays a crucial role in various on-chain operations, from light client verification to account abstraction.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8bdd915cb6b404591de20d73f31785d2de9c0d04276440bb8142280f499843a0.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>In these benchmarks, Nexus demonstrates higher cycle counts, while Jolt struggles with Out-of-Memory errors and fails to execute.</p><p>Among the remaining VMs, performance is tightly matched, with Delphinus creeping higher with significantly higher cycle usage. Notably, SP1 with precompiles again provides a remarkable performance boost, highlighting the effectiveness of precompiles.</p><h3 id="h-other-benchmarks" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Other Benchmarks</h3><p>We’ve also gathered performance data on additional algorithms, including Poseidon hashing and BLS signature aggregation. Due to the volume and complexity of these results, we can’t include them all within this blog post. To provide comprehensive access to these metrics, we’ve made a separate spreadsheet available, ensuring interested readers can explore the full breadth of our findings.</p><p>Find it <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.google.com/spreadsheets/d/1HwZQkgiUro9Nl30tO3KdXizB_D-1_J3vIVXbTvuY2Mw/edit?pli=1&amp;gid=362585795#gid=362585795">here</a>.</p><h1 id="h-wasm-is-awsm" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Wasm is awsm?</h1><p>The ability to prove arbitrary Wasm logic opens up zkVMs to a range of languages that compile to WebAssembly, such as Go, Python, and JavaScript. We conducted a benchmark to evaluate the feasibility of proving Wasm and to quantify the cycle count required.</p><p>To achieve this, we compiled Rust code to WebAssembly and tested two approaches:</p><ul><li><p>Using <code>wasmi</code>, we interpreted WebAssembly within the zkVM</p></li><li><p>Leveraging Delphinus’s <code>zkWASM</code> VM to trace and prove Wasm instructions</p></li></ul><p>This graph illustrates the performance differences between native Rust, Wasmi and zkWASM for various algorithms.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/f6d6b8cfc027e89c7d9460a5e518089bc0a228fa21bcaea5422522c899be28dd.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Key insights include:</p><ul><li><p><strong>Performance Gap</strong>: Across all algorithms, native Rust outperforms both wasm competitors.</p></li><li><p><strong>Impact of Cryptographic Complexity</strong>: For simpler algorithms like <code>nth prime</code>, the performance gap is about an order of magnitude. However, for complex cryptographic tasks like BLS verification, this gap expands to two orders of magnitude.</p></li><li><p><strong>zkWASM Advantage</strong>: Delphinus’s zkWASM achieves cycle counts that are relatively closer to native Rust compared to running Wasmi within a general-purpose zkVM, making it the leading option for proving Wasm applications.</p></li><li><p><strong>Performance Trade-Off in Intensive Tasks</strong>: Wasm&apos;s flexibility comes at a cost, with significant overhead in cryptographic and complex operations compared to native execution.</p></li></ul><p>To mitigate these costs, optimizations could include compiling Wasm directly to RISC-V assembly rather than interpreting it and integrating precompiles through the Wasm Component model.</p><h1 id="h-letting-devs-cook" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Letting devs cook</h1><p>Building within a zkVM is much like working with an embedded system: keeping dependencies minimal is crucial. We prioritized lean crate setups by setting <code>default-features = false</code> and incrementally enabling only necessary features. Additionally, we had to be cautious with serialization/deserialization for complex inputs and carefully manage memory, particularly for heavy tasks.</p><p>Given these constraints, its important to have a smooth setup process, thorough documentation, and responsive developer support to capitalize on the productivity gains that zkVMs promise. Here are some key insights on developer experience, from a month of working with various zkVMs:</p><ul><li><p><strong>Reliability</strong>: SP1 and RISC0 provided the most reliable experiences—everything <em>simply</em> <em>worked</em>. Other VMs sometimes crashed or encountered out-of-memory (OOM) issues when handling larger input sizes.</p></li><li><p><strong>Documentation</strong>: RISC0 excelled with clear, well-structured documentation, including concept explanations and detailed diagrams. SP1 and Jolt also provided solid resources, while other VMs fell short in this area.</p></li><li><p><strong>SDK</strong>: Jolt had the most intuitive SDK, allowing us to annotate provable functions with a simple macro. The other zkVMs followed a similar SDK pattern, making them relatively easy to adapt to. Also, most of the developments across other SDKs are following the same path as Jolt’s in terms of exposing guest program APIs. However, Delphinus’s initial setup was less straightforward, requiring us to dig into the codebase, which added complexity to the onboarding process.</p></li><li><p><strong>Support</strong>: Delphinus led the way in developer support, with their team going above and beyond to resolve issues. SP1, RISC0 and Jolt also offered active community forums for troubleshooting. Even Nexus had good support. (Fun fact, Nexus and Succinct teams are literally 1 block away from each other in SF)</p></li></ul><p>Overall, we had a lot of fun working with different VMs! <strong>We even reported multiple bugs and contributed to the development of these zkVMs throughout our project! (One inconvenience at a time 🕺🏻)</strong></p><h2 id="h-scores" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Scores</h2><blockquote><p>All the scores are based on the testing results of October-November 2024, All the teams are exceptionally fast in shipping updates and</p></blockquote><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7e4f6908ab1faf260a8550b877cd4e926fa3470c94e000b6a837a265936bfcd6.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/542c574da6f199ed8821957ac1037594daf41e6b0bb73c6ce447459258db7523.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/285000d5cf281cb1e52cd858687ec2431ae37bfc31d7626a972a321f0e8d7ef8.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/607bc0e84c9f4ea432b794305ee187e7f02e0fa66e1bdcfbfe0b527857055189.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e87ecd9dd85b200440466b01975e696d52781fa9f9adb3b69f4dfdb8ce5baaf1.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b41427230fbda7be1a2f8b06877888bd5d25efe7fedb8ad98c21987de9e07ee5.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-summary" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Summary</h2><h3 id="h-sp1" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>SP1</strong></h3><p>SP1 provides a smooth development experience with strong documentation, good APIs, and extensive precompile support. Its prover network is reliable, and the inclusion of standard library support and compatibility with multiple Rust crates simplifies development. Its default recursive STARK proof system can be slow, but the significantly lower cycle counts due to precompiles highlight its efficiency advantages.</p><ul><li><p>Offers the most extensive set of precompiles.</p></li><li><p>Default proof system is a recursive STARK, groth16 takes longer than RISC0</p></li><li><p>Better cycle tracking features than most.</p></li><li><p>Highly compatible with Rust crates, easing integration.</p></li><li><p>On-chain proving toolkit is available</p></li><li><p>No direct WASM interface.</p></li></ul><h3 id="h-risc0" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">RISC0</h3><p>RISC0 offers a smooth development experience, solid tooling, and decent documentation. Some precompiles and standard library support exist, but there are fewer than SP1. While it lacks a polished GUI for its prover network and can be memory-heavy, RISC0 can produce Groth16 proofs more quickly. Its support is adequate, though not exceptional, and on-chain proving is possible.</p><ul><li><p>Less precompiles compared to SP1.</p></li><li><p>Uses Groth16 for proofs, smaller proofs</p></li><li><p>Memory-heavy execution can lead to OOM issues.</p></li><li><p>No prover network web interface/GUI, though a network exists.</p></li><li><p>STARK-to-SNARK bridging only runs on x86.</p></li><li><p>On-chain proving supported but less polished.</p></li></ul><h3 id="h-jolt" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Jolt</h3><p>Jolt provides good developer experience and community support, but it faces severe memory issues leading to OOM errors. While it supports WASM verification and has tooling for stack configuration, the lack of precompiles and poor cycle tracing limit its efficiency. Despite some promise and ongoing fixes, its performance and reliability are currently lacking.</p><ul><li><p>No precompiles, leading to higher cycle counts.</p></li><li><p>No Groth16 recursion, no on-chain verification.</p></li><li><p>Current fix proposals exist but are unmerged.</p></li></ul><h3 id="h-nexus" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Nexus</h3><p>Nexus has good support and pluggable guest options but lacks a prover network, standard library, and efficient proof systems. Its Nova-based approach is slow, with large proofs and frequent OOM issues. The developer experience is subpar, and no precompiles or on-chain tooling are available. Parallel processing helps slightly, but overall it remains inefficient.</p><ul><li><p>Uses Nova proofs, slow and large.</p></li><li><p>No prover network, all proving is manual.</p></li><li><p>No standard library support.</p></li><li><p>Parallel processing on multiple CPUs is possible.</p></li><li><p>Pluggable guest approach but poor DX.</p></li><li><p>Lacks any form of precompile optimizations.</p></li></ul><h3 id="h-valida" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Valida</h3><p>Valida uses plonky3 proofs and can achieve high speed on its own operations, but the developer experience is complex. Its Rust SDK is immature, arithmetic operations are limited, and it only runs on Linux. Documentation exists but doesn’t translate into smooth usage. It lacks community support, features, and mod operations, restricting its utility.</p><ul><li><p>Runs only on Linux.</p></li><li><p>Immature Rust SDK, limiting integration. (Nov 24, Update available, need to test)</p></li><li><p>No mod operations.</p></li><li><p>Plonky3-based, can be very fast under constrained conditions.</p></li><li><p>Reading/writing IO is overly complex.</p></li></ul><h3 id="h-delphinus" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Delphinus</h3><p>Delphinus uses direct Wasm and a GPU-based approach for proofs, resulting in very fast Wasm proving. However, circuit building is slow, and the developer experience requires custom Wasm development with limited documentation. While it supports importing Rust crates and comes with good customer support, proof generation is extremely slow, and certain features remain inaccessible. It provides standard library support but demands extensive setup and dedicated hardware.</p><ul><li><p>Requires GPU for proof generation.</p></li><li><p>Direct Wasm approach for proving is fast but circuit building is slow.</p></li><li><p>Standard library supported.</p></li><li><p>Decent Rust crate integration.</p></li><li><p>Setup overhead is significant.</p></li><li><p>Has a “pro” plan for enhanced features and support</p></li></ul><h1 id="h-takeaways" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Takeaways</h1><ul><li><p><strong>Precompiles are essential</strong>: They significantly reduce cycle counts, and in turn, proving times. In this area, SP1 stands out as a clear leader.</p></li><li><p><strong>Client-side proving isn’t quite there yet</strong>: zkVMs today are not ready for efficient client-side proving. This can change with modular VMs like Powdr providing swappable backends like the STWO prover.</p></li><li><p><strong>SP1 and RISC0 stand out</strong>: As of November 2024, SP1 and RISC0 are the most mature zkVMs, offering dev tooling, access to prover networks, different proof types and much more. Other zkVMs are catching up though.</p></li><li><p><strong>zkVMs are making zero-knowledge mainstream</strong>: We rapidly generated proofs for multiple complex algorithms, showing how zkVMs can tackle real-world challenges swiftly and securely.</p></li><li><p><strong>Not a silver bullet:</strong> While zkVMs lower the barrier to entry, custom circuits will likely still yield better performance than general-purpose solutions.</p></li><li><p><strong>Proving is still tough:</strong> Efficient proving often requires expensive, specialized hardware, presenting a resource challenge for many developers.</p></li><li><p><strong>Prover networks have trade-offs:</strong> They can help scale proving but may introduce privacy considerations and complexity in implementation.</p></li></ul><h1 id="h-final-verdict" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Final verdict</h1><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/f7d16a43b8217628347f4d8553df28012f0a69269f9eb5fad8f7365cd3fc23da.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Both SP1 and RISC0 emerge as top-tier solutions. RISC0 offers strong documentation, a smooth developer experience, and efficient proof generation. However, SP1’s advantage lies in its broad precompile support and superior APIs, enabling lower cycle counts and a more streamlined workflow. This efficiency edge—alongside robust tooling, reliable prover networks, and compatibility with standard Rust crates—positions SP1 slightly ahead in the race, making it the standout choice for those prioritizing performance and developer convenience.</p><h3 id="h-but" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">But…</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6e4d750a60706afbe82a0d199cc5563d74679378fa98fc0dfb9b82e1d08a0230.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>While there are currently more zkVM projects than actual zk applications, this abundance of infrastructure initiatives serves as a foundational catalyst. As these zkVMs mature, they will lower the barriers to entry for developers, ultimately enabling a broader range of builders to leverage zero-knowledge proofs in their products and services. Over time, this will foster a thriving ecosystem, encouraging innovation and accelerating the adoption of zero-knowledge technologies across the industry.</p><p>Ultimately, general-purpose zkVMs are poised to lead the upcoming ZK revolution, setting new standards for efficiency, scalability, and accessibility!</p><h1 id="h-whats-next" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">What’s Next?</h1><p>Succinct has released a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/SuccinctLabs/status/1863998744301371667">whitepaper</a> outlining a new, fully permissionless prover network protocol designed to enable anyone to contribute computational resources without centralized oversight.</p><p>Around the same time, RISC0 unveiled “<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/boundless_xyz/status/1866567596411380103">Boundless</a>,” its own prover network solution aiming to streamline distributed proving and verification at scale.</p><p>Additionally, Valida introduced a new <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/0xLita/status/1856558053262569940">Rust-based toolchain</a> claiming significant performance improvements and better developer ergonomics.</p><p>We will be taking a closer look at these developments soon, as they promise to advance both efficiency and usability in zero-knowledge proof ecosystems.</p><hr><h2 id="h-glossary" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Glossary</h2><p>Benchmark detailed numbers - <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.google.com/spreadsheets/d/1HwZQkgiUro9Nl30tO3KdXizB_D-1_J3vIVXbTvuY2Mw/edit?usp=sharing">Spreadsheet</a></p><p>ZK Residency final presentation - <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://youtu.be/8ycO4dvlFYc?si=_l-jKMMACLUtIKkk">Recording</a>, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.google.com/presentation/d/1crZZhQaNVXXfk49cOoEMu3oPZDxsVh-hP7IFeb-PTbY/edit?usp=sharing">Slides</a></p><p>You can find all the code used for benchmarking here - <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/stackrlabs/succinct-residency-exps">GitHub</a></p>]]></content:encoded>
            <author>stackrlabs@newsletter.paragraph.com (Stackr Labs)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/3ccbcbc25b28dc09a2c8e0c3879a6541b7527978426afea07117b7e8a414e641.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Proof of Gameplay]]></title>
            <link>https://paragraph.com/@stackrlabs/proof-of-gameplay</link>
            <guid>M1ZhQ4fdaf9Tb12YWgvN</guid>
            <pubDate>Mon, 05 Aug 2024 15:20:25 GMT</pubDate>
            <description><![CDATA[Update: August 5, 2024 The mentioned issues had been “somewhat” fixed by the concerned team. The game is still not on-chain.Disclaimer: This piece is meant to be a fun and spicy callout on the current situation and does not mean any harm, the devs in Stackr team are actually coinbase fanboys and would infact love to work with them on fixing the issues highlighted here to onboard users to crypto “properly”.A few weeks ago, Coinbase (Base) announced a partnership with Atari, the gaming giant, b...]]></description>
            <content:encoded><![CDATA[<blockquote><p><em>Update: August 5, 2024 The mentioned issues had been “somewhat” fixed by the concerned team. The game is still not on-chain.</em></p></blockquote><blockquote><p><em>Disclaimer: This piece is meant to be a fun and spicy callout on the current situation and does not mean any harm, the devs in Stackr team are actually coinbase fanboys and would infact love to work with them on fixing the issues highlighted here to onboard users to crypto “properly”.</em></p></blockquote><p>A few weeks ago, Coinbase (Base) announced a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/base/status/1815441757729157188">partnership</a> with Atari, the gaming giant, bringing arcade classics like Asteroids and Breakout “onchain” as part of their ongoing “<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.coinbase.com/blog/onchain-summer-is-here">Onchain Summer</a>” campaign. Much like everyone else, we found this move quite <em>based</em>, paid the minting fees, and proceeded to play Asteroids. Few games in, one of our engineers got bored and started wondering the obvious question: “where’s the onchain?”.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/51428166e14545fa3e29cdae70f73ba3989bb6034fc9ba184bafe2241e41a9ae.png" alt="Well...trust me bro?" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Well...trust me bro?</figcaption></figure><p>This blog post serves as a case study, uncovering the lack of “onchain” in the onchain arcade, how we were able to spoof a high score, and how this led us to build an Asteroids-clone as a Micro-Rollup (live at <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://comets.stf.xyz/">Comets</a>). The aim here is not only to be spicy but also propose a better approach. So, we’d be introducing the concept of Proof of Gameplay and, get this - how we actually put the game on the <em>fkn</em> chain with Stackr.</p><h1 id="h-proof-of-off-chain-spoofing-a-high-score-on-bases-on-chain-arcade" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><em>Proof of Off-chain</em>: Spoofing a High Score on Base’s On-chain Arcade</h1><p>The psyops of the on-chain gaming world is that many games actually run entirely off-chain, only submitting final scores to the blockchain. This approach, while efficient, has a significant flaw: there’s no way to ascertain if a player genuinely played the game to achieve their high score or if they merely spoofed an inflated score. This lack of verification undermines the game&apos;s integrity, making it impossible to distinguish between genuine skill and fraudulent activity.</p><p>Base’s On-chain Arcade suffers with the exact same flaw. When a game session ends, the browser simply submits the high score to <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://Stack.so">Stack.so</a>’s point system to record it (via another API hop). The issue is worsened by the fact that since it’s the browser submitting the score directly, the system’s API key is left exposed. So, a little bit of reverse engineering (fancy term for opening the “Network” tab) and we were able to recreate the API request in Postman:</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/467e448ed00bae1b39d8b92903a14b3820dd29eb8d6a7313c8b2f2402bf5e54b.png" alt="Postman window showcasing the spoofed API request" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Postman window showcasing the spoofed API request</figcaption></figure><p>This means anyone can submit a custom high score for any address without any authentication. As the obvious next step, we reported this issue to the Base team. It took them a long time (over 2 weeks) to work on the issue.</p><p>So, in light of transparency and to simply make the summer more entertaining, we made a webpage - [redacted] - where anyone can go and get their desired high score! After all, Web3 is all about giving control back in the hands of users, <em>amirite</em>?</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e53f6366ed91131006ebaa418ff2c8a4df58d6688fc4509b3110e24a250775fd.png" alt="A webpage which makes this request for your address and desired high score" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">A webpage which makes this request for your address and desired high score</figcaption></figure><blockquote><p><em>As of August 5, 2024, this method does not work anymore. The teams changed the API format</em> <em>but the fix is still (it seems at the time of publshing this article) on the frontend side of things with a JWT token session. The gameplay is still not recorded or has any link with final scores being submitted. If the frontend wants, it can send whatever score to the point system. (infact even legit games are not getting submitted on the leaderboard, a bug perhaps?)</em></p></blockquote><h1 id="h-how-can-we-do-better" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">How can we do better?</h1><p>Our team having discovered this issue combined with our general curiosity to <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/stackrlabs.eth/B-3hUw4Y8L3yWAqzsYWn9KddwluR0oZSHZ3c4K7r9VY">explore</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/stackrlabs.eth/4kLzcBdvWnvECxOnaGQ8prAqUZEzj4BoDoXqSSXiV6w">interesting</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/stackrlabs.eth/0okwPJQRfu-GxDafoV6UGYxaO9dJwCARu3WM16jdeCs">problems</a>, we thought how can we do better, decided to put on our builder hats and got to work.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b63c9d63f4254d954c5f2742a72b490dd07a93e1da5f3877f0ca39d7e2f61812.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-proof-of-gameplay" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Proof of Gameplay 🥁</h2><p>Let&apos;s revisit the basics by examining how traditional games function. In a typical client-server game setup, the client (player&apos;s device) and the game server collaborate to deliver a seamless experience. The client is responsible for rendering the game world and user interface, capturing player inputs, and sending them to the server. Both the server and clients run their own game loops where the server is authoritative, meaning it resolves conflicts and discrepancies in the game state. Since the server stores and validates all the player’s inputs and actions in real-time, manipulation of the game state, such as forging scores, is prevented.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/cb7ac93151b55875b79c715f16d4cc076e95c70f378e342921f30dee6dd8d3d2.png" alt="General implementation of a client-server setup in traditional online games" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">General implementation of a client-server setup in traditional online games</figcaption></figure><p>In contrast, the underlying issue with the On-chain Arcade game is that the server relies solely on the score submitted by the client, which could easily be spoofed.</p><p>To address this issue, we need <strong>Proof of Gameplay</strong>.</p><p>The core idea behind Proof of Gameplay is to ensure that every recorded score is backed by verifiable evidence of actual gameplay. For example, similar to traditional game designs, a record of all the moves made by the player can serve as a proof for the server (or anyone) to be able to verify the submitted score by replaying the sequence of moves.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/2fe41a2ba4bc4d8417e358a7a417b99a811e8d624e5963163165c8981f9f7ead.png" alt="proposed implementation of proof of gameplay as a micro-rollup" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">proposed implementation of proof of gameplay as a micro-rollup</figcaption></figure><p>Implementations of Proof of Gameplay can preserve the fairness and competitiveness of games and also reinforce trust in the on-chain gaming ecosystem.</p><h3 id="h-proof-of-gameplay-for-turn-basedshared-world-games" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Proof of gameplay for Turn-based/shared world games</h3><p>This is just one of the approaches which is possible with this construct where the user starts a session, records all the moves and sends the proof of gameplay to the micro-rollup for verification. <strong>This works in this particular category of games but might not be the best one as it requires a large list of moves that gets signed on in a single packet</strong>. The packet size can grow by a lot which may not be practical to sign as a message.</p><p>Moreover, in case there are multiple players involved, for example, turn based games or shared world games, the moves from each player would be dependent on each other. In this case, each move must be a standalone user action to the micro-rollup which will be sequenced and executed on the world state.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/af510b0ae2cdef0dc0dc4998e95ff213b35c7675b1d2f148206846ec8b5a8c20.png" alt="Proof of Gameplay for single-player games vs multi-player games" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Proof of Gameplay for single-player games vs multi-player games</figcaption></figure><p>Micro-rollups, thanks to their insanely fast block times can support both modes. We will discuss this in a later blog post ;)</p><h1 id="h-off-chain-game-proof-of-gameplay-on-chain-game" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Off-chain Game + Proof of Gameplay = On-chain Game</h1><p>As noted above, in the traditional setup, full control lies with the game server, and ultimately, the game developer, who could arbitrarily change the game logic or state, potentially cheating their users. This is where the importance of “on-chain games” comes into play. By implementing all or parts of the game logic on-chain as (immutable) smart contracts, games can become more transparent and permanent.</p><p>However, this is much easier said than done. Game logic can be extremely complex to write in EVM, and game servers are among the most demanding systems, while blockchains are terrible for compute-heavy tasks. Fortunately, we have this technology called rollups which supercharge blockchains with just that - perform a lot of heavy computation off-chain and submit a small proof of correctness on-chain. However, even <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://l2beat.com/scaling/summary">most rollups today</a> are general-purpose blockchains themselves and inherit the same limitations.</p><p>The quintessential thing to note here is that the game’s state machine needs to duplicated on both client and server side to enforce the rules. At the same time, an off-chain server requires trust while an on-chain server is impractical. But what if we had verifiable off-chain servers — only submit a Proof of Gameplay on-chain without requiring the game logic to be on-chain?</p><p>Micro-rollups, with their verifiable and fast off-chain compute, are perfectly suited for this problem.</p><h3 id="h-proof-of-gameplay-verifiable-compute-micro-rollup" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Proof of Gameplay <strong>∈ Verifiable Compute ∈ Micro-Rollup</strong></h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/d623479c06b012d55a2fb0d15ed1dd4496c064215fa54b2d397768248830f25d.png" alt="Execution cost is minimal because these micro-rollups are super optimized for the game and hosted as web2 servers, storage settlement still happens on-chain" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Execution cost is minimal because these micro-rollups are super optimized for the game and hosted as web2 servers, storage settlement still happens on-chain</figcaption></figure><ol><li><p><strong>Micro-rollups are simply backend services</strong></p><p>Micro-rollups, being indistinguishable from backend services, offer the same developer experience as traditional backend frameworks. Combined with the fact that the Stackr SDK is written in TypeScript, this enables code reuse between the frontend and backend. This is a big unlock for browser-based games, as developers don’t need to duplicate the game logic.</p></li><li><p><strong>Micro-rollups enable specialized minimal runtimes</strong></p><p>Micro-rollups lets you selectively expose only necessary functionality through deterministic and rigid State Transition Functions (STFs) tailored to the state of the rollup. This allows for highly optimised minimal runtimes dedicated to the game logic offering extremely fast execution.</p></li><li><p><strong>Micro-rollups enable verifiable off-chain compute</strong></p><p>Micro-rollups require no overhead in bootstrapping a network since they leverage <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.stf.xyz/concepts/micro-rollup/architecture/verification-layer">Stackr’s verification layer (aka Vulcan)</a> for correctness. Once the state machines are deployed, the STF logic cannot be mutated. This enables the users to have an assurance that the provider has not arbitrarily changed the rules of the system.</p></li></ol><p>The following sections cover the gameplay experience of the game we built and also the developer experience of building it, detailing various engineering tidbits.</p><h1 id="h-comets-actually-onchain-asteroids-clone-with-stackr" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Comets: Actually “Onchain” Asteroids-clone with Stackr</h1><p><em>because comets have a streak which makes it’s path “predictable” ;)</em></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ea3f4caf0315d4f130ddcec10fc3c4c1dd4c749940efb08cc02f32c6fd89ecc5.gif" alt="Demo gameplay GIF of the Comets game " blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Demo gameplay GIF of the Comets game</figcaption></figure><p>After a bunch of research (and meme-ing), it was now time to bring this to life. We started by carefully listing down the core properties and features our game should offer:</p><ol><li><p>The game should incorporate Proof of Gameplay without sacrificing UX. That is, the game should provide the same web2-like experience familiar to users.</p></li><li><p>The Proof of Gameplay will guarantee Verifiable Replays for each game session. That is, the server (read: micro-rollup) will verify the Proof of Gameplay from the client, keeping it in check.</p></li><li><p>The ultimate source of truth should be the underlying blockchain. That is, the server will also relay the proof to be verified on the parent chain.</p></li></ol><p>With this in place, we could design the end-to-end user story of a player’s interactions with the game, clearly demarcating what needs to be off-chain vs on-chain.</p><h2 id="h-gameplay-experience-off-chain-game-meets-proof-of-gameplay" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Gameplay Experience: Off-chain Game meets Proof of Gameplay</h2><p>Breaking this down:</p><p>0. The player visits the webpage — <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://comets.stf.xyz">comets.stf.xyz</a> — and connects their wallet. They can also choose to create an embedded wallet.</p><p>1. The player presses <code>ENTER</code> to start the game. At this point, their wallet pops-up, requesting them to sign an action and submit it to the micro-rollup.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7f7d7e4aea237818df1e5b26d8b6a65ea1ba6b90460faaf566e837f145a49413.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>2. The micro-rollup executes the player’s action, records a new game in the state, and returns a pseudorandomly generated game ID.</p><p>3. The game world is now rendered, and the player experiences traditional <strong>web2-style gameplay with no wallet pop-ups or on-chain transactions during the gameplay</strong>. The client keeps track of each move made by the player at each tick of the game loop.</p><p>4. At the end of the game, the player is prompted with another request to sign an action to submit their score and Proof of Gameplay (their list of moves) to the micro-rollup for validation and storage.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/71b8726a24d51f47bdf2255d4e5f1495683128bc7e2e96b606c750b6cf322d9f.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>5. The micro-rollup executes the player’s action and re-runs the game loop, replaying all the moves. If the simulated score matches the submitted score, it is recorded in the state. Otherwise, if the scores don’t match, the action’s execution fails with no state update.</p><p>6. Finally, the player is notified of success or error with their updated standing in the leaderboard.</p><p><strong>Try out the game here</strong> -</p><div data-type="embedly" src="https://comets.stf.xyz" data="{&quot;provider_url&quot;:&quot;https://comets.stf.xyz&quot;,&quot;description&quot;:&quot;Asteroids inspired on-chain game&quot;,&quot;title&quot;:&quot;Comets&quot;,&quot;url&quot;:&quot;https://comets.stf.xyz&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;Stf&quot;,&quot;type&quot;:&quot;link&quot;}" format="small"><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://comets.stf.xyz" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>Comets</h2><p>Asteroids inspired on-chain game</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://comets.stf.xyz</span></div></div></a></div></div><p>The entire game codebase can be found here</p><div data-type="embedly" src="https://github.com/stackrlabs/comets" data="{&quot;provider_url&quot;:&quot;https://github.com&quot;,&quot;description&quot;:&quot;Comets: Remake of the arcade classic Asteroids as a Micro-rollup - stackrlabs/comets&quot;,&quot;title&quot;:&quot;GitHub - stackrlabs/comets: Comets: Remake of the arcade classic Asteroids as a Micro-rollup&quot;,&quot;author_name&quot;:&quot;stackrlabs&quot;,&quot;thumbnail_width&quot;:1200,&quot;url&quot;:&quot;https://github.com/stackrlabs/comets&quot;,&quot;thumbnail_url&quot;:&quot;https://storage.googleapis.com/papyrus_images/eaab3cde05ee198855037d76247c888f06fea83bdba665fb34c10cd7103fffc1.png&quot;,&quot;author_url&quot;:&quot;https://github.com/stackrlabs&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;GitHub&quot;,&quot;type&quot;:&quot;link&quot;,&quot;thumbnail_height&quot;:600,&quot;image&quot;:{&quot;img&quot;:{&quot;width&quot;:1200,&quot;height&quot;:600,&quot;src&quot;:&quot;https://storage.googleapis.com/papyrus_images/eaab3cde05ee198855037d76247c888f06fea83bdba665fb34c10cd7103fffc1.png&quot;}}}" format="small"><link rel="preload" as="image" href="https://storage.googleapis.com/papyrus_images/eaab3cde05ee198855037d76247c888f06fea83bdba665fb34c10cd7103fffc1.png"/><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://github.com/stackrlabs/comets" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>GitHub - stackrlabs/comets: Comets: Remake of the arcade classic Asteroids as a Micro-rollup</h2><p>Comets: Remake of the arcade classic Asteroids as a Micro-rollup - stackrlabs/comets</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://github.com</span></div><img src="https://storage.googleapis.com/papyrus_images/eaab3cde05ee198855037d76247c888f06fea83bdba665fb34c10cd7103fffc1.png"/></div></a></div></div><h1 id="h-developer-experience-off-chain-game-server-meets-micro-rollup" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Developer Experience: Off-chain Game Server meets Micro-Rollup</h1><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/96096cc186c96c5200fdc217ffb632d8fcd58a4194f235f815e84c50873a476d.png" alt="E2E user story of playing the Comets game" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">E2E user story of playing the Comets game</figcaption></figure><p>Now that we have talked about the UI/UX of the game, let’s delve deep into the DevEx of building this game’s server-side logic as a micro-rollup.</p><blockquote><p>Note: Before proceeding further, if you are not familiar with how Stackr Micro-Rollups work, please refer to <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/stackrlabs.eth/0okwPJQRfu-GxDafoV6UGYxaO9dJwCARu3WM16jdeCs#heading-quick-primer-on-micro-rollups">Quick Primer on Micro-Rollups</a>.</p></blockquote><p>When developing a micro-rollup, it&apos;s crucial to conceptualize your logic in terms of a state machine. This involves carefully considering the state of the micro-rollup - that is, the data it will hold - and the actions that will dictate the behavior of the state transition function, which in turn operates on this state.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ab186787a252094a6bc0bed8876b615dde8ce5a5877f4e7b4862b4cfb582d402.png" alt="The Comets state machine" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">The Comets state machine</figcaption></figure><p>With the above in mind, we start by designing the state of the micro-rollup.</p><p><strong>The Design</strong></p><p>1. Game sessions are stored off-chain inside a state machine</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/3168de524ea5c351135c0e874995acbbbd3669551a99053d30daf5c09a310179.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>2. Player sends actions which trigger a state transition function inside the state machine</p><p>3. Player can send action to start or end a game.</p><p>4. After each set epoch a block is generated which contains state root and action inputs</p><p>5. The block is sent to Vulcan network for verification</p><p>6. If the block conforms the rules of the state machine it is approved</p><p>7. The block data is split between Ethereum and DA for settlement.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/091807000cf903b567a2dd7438ac6189c6f5db3f84a823e4a5384c5b176a5139.png" alt="Game settlement mechanism" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Game settlement mechanism</figcaption></figure><h3 id="h-the-code" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>The Code</strong></h3><p>The Stackr SDK, written in TypeScript, lets you inject the application logic directly into the blockchain. The developer only needs to define their state and state transition functions without worrying about any of the protocol heavy lifting of building a blockchain. Let’s see how:</p><p><strong>Defining the base state</strong></p><p>Our micro-rollup state only needs to keep track of game sessions with basic information, such as the player&apos;s address, the score, and whether the game has ended.</p><p><strong>1. So as a starting point, we defined the rollup state as types in TypeScript.</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/f32724556e95815ed18041bdd2d41809a014d488088a8c6beef3f81987d77f0d.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><strong>The Stackr SDK adopts a schema-first design paradigm familiar to application developers</strong>. It allows complete freedom in terms of state design, allowing developers to simply think in terms of individual entities and how to compose them together to form the full application state.</p><p>You may be wondering how we are able to get away with only storing the score and not the list of moves in our rollup state — this is covered in the next section.</p><p><strong>Adding handlers for state update</strong></p><p>After we have defined our rollup’s state, we need to define S<strong>tate Transition Functions (STFs)</strong> that update the state.</p><p><strong>2. We defined two functions,</strong> <code>startGame</code> and <code>endGame</code> to manage a game’s lifecycle.</p><p>By having only two actions for each game and performing validation in a single step at the end, the on-chain footprint is kept minimal, making this approach cost-effective.</p><p><strong>Start Game</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7ffd39818514e0515fed9e232947284bc5817468b35c7f02d49e40c69a0104fb.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Breaking down the <code>startGame</code> state transition,</p><ul><li><p>The player can submit an action to start a game.</p></li><li><p>The STF deterministically generates a new game ID to uniquely identify a game session, records it in the state and emits the same in execution logs.</p></li></ul><p>What may seem like just a couple of lines of general TypeScript code is actually supercharged by the Stackr SDK adding some interesting properties, such as:</p><ul><li><p><strong>Verifiable Randomness</strong> is added to the game based on the game ID and used as a seed for generating randomness in the game world. It ensures each game session is unique and prevents cheating, such as using the same list of moves from a previous game.</p></li><li><p><strong>Emitting logs</strong> allows linking side effects to a particular action’s execution. Since micro-rollups execute actions instantly upon arrival (within milliseconds), these logs can be returned in response to the very same request. This enables a familiar Web2-style request-response flow, facilitating easier implementation on the frontend.</p></li></ul><p><strong>End Game</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ee4b32f8459116520849cd271419cd6384d4318f2a20f0fd2c9d601f9ddda92b.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Breaking down the <code>endGame</code> state transition</p><ul><li><p>After a player completes a session on the client, aka “plays the game”, an action is sent to the micro-rollup to end the game, referencing the related <code>gameId</code>. The request also includes the score, and all their recorded keystrokes as a serialized list (<code>gameInputs</code>) according to a custom action schema.</p></li><li><p>The STF locates the specified game within the state and performs basic checks, such as verifying the player&apos;s address.</p></li><li><p>The STF then initiates the game world, passing the <code>gameId</code> and applying the player&apos;s inputs to it.</p></li><li><p>Finally, if the simulated score matches the submitted score, it is recorded in the state. Otherwise, if the scores don’t match, the action’s execution fails with no state update.</p></li></ul><p>An interesting detail to note here is that the implementation of <code>GameWorld</code> is independent of the STF. It&apos;s a common package shared between the frontend and backend. The core idea is that as long as it&apos;s deterministic TypeScript/JavaScript code, it can be imported and used within the micro-rollup’s state machine. This is super cool because it unlocks access to npm, the world&apos;s largest software registry, making most (if not all) of your favorite existing libraries now available for building decentralized apps.</p><h3 id="h-implementation-of-the-game-logic-spoiler-we-didnt-write-it-ourselves" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Implementation of the Game Logic (spoiler: we didn’t write it ourselves)</h3><p>This superpower of Stackr SDK became really useful for us because we are not game developers. With some diligent scrounging on GitHub, we were able to find a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/jphamilton/asteroids">repository</a> with a JavaScript implementation of Asteroids. Fun fact: <strong>it only took us a single day of work to have an initial Proof of Concept implementation where we were able to simply port this package inside the micro-rollup.</strong></p><p>Overall, we were able to re-purpose the package as-is with only a few modifications to make it work with the Stackr SDK:</p><p>1. We modified the <code>GameWorld</code> class to initialize with a game ID and the screen dimensions. The randomness seed is derived from the game ID. This seed, along with the screen dimensions, affects all operations in rendering the game world, such as the position and size of objects like the spaceship, rocks, aliens, etc. Since the game ID is deterministically generated inside the <code>startGame</code> STF, each game session is verifiably unique.</p><p>2. At the end of the game session, we need to send the entire list of all recorded keystrokes as a signed payload to the micro-rollup. Generating a signature on the raw payload and then sending it over to the network could be very slow. Therefore, we came up with a basic serialization technique to convert the list of all input objects into a single compressed string. This string represents the list of all inputs with comma-separated base 10 numbers whose binary representation represents bit-strings, where each position of the bit maps to a particular action. For example, a list of inputs that originally looks like <code>[{ isThrust: true}, { isFire: true }, ...]</code> gets serialized into a string like <code>&quot;32,2,...&quot;</code></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/9f5c5b07387504cda639b5096ed0a64cd1c73b553e1142b6a9db429c5c9df95e.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>3. Some effort was spent in decoupling the game business logic from pixel rendering logic. This was necessary to keep the WASM minimal and allow for clean re-execution. This, as mentioned above, also allowed us to share this code between the client and server.</p><h1 id="h-off-chain-game-micro-rollup-endless-possibilities" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Off-chain Game + Micro-Rollup = Endless Possibilities <strong>✨</strong></h1><h3 id="h-verifiable-replays" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Verifiable Replays</h3><p>The beauty of this system is that it allows <strong>Verifiable Replays</strong> of the game without requiring either of the game state or logic to be on-chain.</p><p>As mentioned above, micro-rollup’s state root is settled on L1 (typically, Ethereum). It is interesting to note that the developer can chose what part of the state settles on L1 vs what part can go on DA as metadata, thereby, unlocking hybrid security assumptions.</p><p>In this case, we extract the <code>games</code> list from the state and settle it’s <strong>merklized root</strong> on L1, thereby opening up the possibility of direct inclusion proofs of games in the merkle tree.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/baa8360d282bdc5829a83d222597af9f241de3481992e1f245daac362e4396dd.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Without any extra effort on the developer’s part, the Stackr framework ensures that the micro-rollup’s state machine binary (Wasm) and all the actions to it get published to the DA. The hashes of the Wasm and the genesis state are stored in the AppInbox contract.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/092ca73f3f26c6e5b678c3a1381d15e294e0f6940c8488967dd0cbc6afe48d76.png" alt="Etherscan page showcasing the micro-rollup’s batch submission tx on Sepolia testnet" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Etherscan page showcasing the micro-rollup’s batch submission tx on Sepolia testnet</figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/02e750460a054aa039d8ca7f9941ba5dea962f866e40108d3c285728812132f4.png" alt="Micro-Rollup Batch data posted as blob on Celestia Mocha testnet " blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Micro-Rollup Batch data posted as blob on Celestia Mocha testnet</figcaption></figure><p>This approach allows anyone to verify the entire pipeline in a fully trustless manner. Anyone can retrieve the Wasm and the actions (game inputs) from the DA, replay these actions, catch up to the latest state, and verify a Merkle proof of the score against the state roots on L1.</p><h3 id="h-incentivization-using-points-or-referral-programs" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Incentivization using Points or Referral Programs</h3><p>Base’s Onchain Arcade makes use of <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://Stack.so">Stack.so</a> for loyalty points and leaderboard. However, as mentioned, the client is making a mere insecure API call to record the scores. So, again — how can we do better?</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7dba0b10d0a455ef8aadab0cacc87e284dc32bbea9157a903d66462e48e2c837.png" alt="Points System Micro-Rollup can interop with Comets Micro-Rollup" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Points System Micro-Rollup can interop with Comets Micro-Rollup</figcaption></figure><p>Recently, we published an article, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/stackrlabs.eth/xSRyanslzZEW95mP1_N8Z5X5_eIaEXQBgwc42txZPDI">Micro-Rollups for Points Systems</a>, which details a micro-rollup implementation of a loyalty points platform. An exciting feature of Stackr is its built-in cross micro-rollup interoperability. This means we can spin up a points micro-rollup and seamlessly bridge users scores from our Comets micro-rollup. This approach would keep the game logic decoupled from the points system, enabling it to be used across multiple games and campaigns, and extended with its own features. In fact, anyone has the freedom to launch their own micro-rollups that interoperate with these two; an example could be a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/stackrlabs.eth/xSRyanslzZEW95mP1_N8Z5X5_eIaEXQBgwc42txZPDI#heading-referrals">referral system</a>.</p><p>The end result would be a set of modular but integrated systems, avoiding ecosystem silos and fostering permissionless innovation.</p><blockquote><p>Btw, we have our own points system in beta → try it out <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://pointy.stackrlabs.xyz">pointy.stackrlabs.xyz</a>, and stay tuned for more announcements on this front! 👀</p></blockquote><h3 id="h-scale-using-zk-proofs" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Scale using ZK Proofs</h3><p>Currently, Vulcan employs a pessimistic re-execution model to verify incoming blocks from micro-rollups. This leads to a trust centralization vector on Vulcan. To mitigate this, Stackr is actively exploring the potential of zkWASM-based verification, enabling Vulcan to execute application WASM binaries within a zkVM and generate STARK proofs for final verification on the parent chain.</p><p>In the context of Comets micro-rollup, this could be implemented in a way that allows the client to generate a ZK-Proof of Gameplay locally on the user’s device. The underlying layers would then only need to verify this proof, providing greater scalability and cost-efficiency.</p><h1 id="h-how-to-think-about-proof-of-gameplay-for-your-next-game" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">How to think about Proof of Gameplay for your next game?</h1><p>While this blog post specifically focuses on the Asteroids game, the concept and implementation of Proof of Gameplay (PoG) using Stackr demonstrated here can be extended to any single-player or even multi-player turn-based games.</p><p>By integrating PoG with features like loyalty points and referral systems, developers can create new opportunities for rewards and incentives, backed by verified gameplay achievements. This can enhance player engagement and trust in the game&apos;s fairness.</p><p>Moreover, having Proof of Gameplay on-chain opens up new possibilities for integrating in-game assets and currencies onto the blockchain. By backing in-game asset and currency acquisitions with verified gameplay, developers can prevent fraud and maintain the integrity of virtual economies. This approach naturally supports the development of a thriving secondary market where in-game assets and currencies can be freely traded, with their value determined by the free market rather than the game developers. The result is a system that not only incentivizes players by allowing them to capitalize on their in-game achievements but also fosters a dynamic environment where both developers and players can innovate and create new economic opportunities.</p><h1 id="h-whats-next" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">What’s next?</h1><h3 id="h-1-coinbase-if-you-are-reading-this" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">1. Coinbase if you are reading this…</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/fbe4c0493924f7ba92f637acbc96d1340f8068d2d0ab205294876dbe4ff5a19b.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>We’d love to explore collaboration with Base and be <strong>the choice of game development toolkit</strong> for builders in the base ecosystem. Together, we can help developers build authentic on-chain games with genuine “Proof of Gameplay” and unlock a new paradigm in game development with actually on-chain verifiable games. Please reach out to someone from our team :D</p><h3 id="h-2-proof-of-gameplay-grants" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">2. Proof of Gameplay grants</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/4f220889f0027ad9042ebcf3126edc48a68f638c581ce045c24153d2e000be9a.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>We’d soon be launching a grants program for builders to use the micro-rollup SDK to build and launch games with proof of gameplay mechanics. Game developers would get a toolkit and additional resources alongside core integration APIs to build some cool shit with our SDK.</p><hr><h1 id="h-come-build-with-us" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Come build with us!</h1><p>At Stackr Labs, we’re building the toolkit and the necessary infrastructure to build <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://kautuk.substack.com/p/micro-rollup-a-wave-or-just-a-shameless">app-specific micro-rollups</a> to supercharge and unlock the DevEx around building apps that bridge the gap between Web2 and Web3. If you’re someone who’s looking to build Web3 apps or games, we’d love to talk to you and find ways to collaborate.</p><p>Join our <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://t.me/StackrCommunity">Telegram Community</a> to stay updated with the latest news, or reach out to us on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/0xStackr">Twitter</a> (X).</p><h3 id="h-fyi" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">FYI</h3><p>Our SDK is <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.stf.xyz">live in open beta</a> for anyone to try out!</p>]]></content:encoded>
            <author>stackrlabs@newsletter.paragraph.com (Stackr Labs)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/2b4dbfe04c16b031ef108a42e8482622c74fe7ce45e1f292e6794400375d7714.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[A case study for Ephemeral Rollups: Avail Unification Cup]]></title>
            <link>https://paragraph.com/@stackrlabs/a-case-study-for-ephemeral-rollups-avail-unification-cup</link>
            <guid>s3PJmJw8cRX6EfqOZ85M</guid>
            <pubDate>Mon, 22 Jul 2024 16:13:16 GMT</pubDate>
            <description><![CDATA[During the EthCC 2024 week in Brussels, the Avail team hosted the Unification Cup, bringing together many people from the ecosystem to participate in a football tournament. We, at Stackr Labs, partnered with the Avail team to develop an application-specific ephemeral rollup on top of Avail DA for the tournament. This blog post serves as a case study introducing the concept of ephemeral rollups, exploring their use cases across Web2 and Web3, detailing the user experience and engineering of th...]]></description>
            <content:encoded><![CDATA[<p>During the EthCC 2024 week in Brussels, the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.availproject.org/">Avail</a> team hosted the Unification Cup, bringing together many people from the ecosystem to participate in a football tournament. We, at Stackr Labs, partnered with the Avail team to develop an application-specific ephemeral rollup on top of <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.availproject.org/da">Avail DA</a> for the tournament.</p><p>This blog post serves as a case study introducing the concept of ephemeral rollups, exploring their use cases across Web2 and Web3, detailing the user experience and engineering of the application we developed with the Stackr SDK, and shares some fun tidbits and challenges faced during the tournament.</p><h2 id="h-what-is-an-ephemeral-rollup" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">What is an Ephemeral Rollup?</h2><p>“Ephemeral” and “Rollup” - let’s break down the two words individually.</p><ul><li><p>Ephemeral: as in transient or short lived.</p></li><li><p>Rollup: a system (often a blockchain) that executes transactions off-chain and then submit a single, aggregated proof back to the parent chain, preserving integrity and verifiability of such executions. In this context, the parent chain and the rollup are termed as layer 1 and layer 2 respectively.</p></li></ul><p>Therefore, Ephemeral Rollups (ERs) can be defined as a special form of rollups that are &quot;short-lived&quot;. For example, a rollup (read: application) can be spun up at the start of an event, process rapid transactions off-chain during the event, and then be spun down at the end. At this point, the rollup data, including state roots and transaction inputs, can be settled onto the parent chain for permanent storage. This approach ensures the retraceability and verifiability of event data at any point in the future, even after the application’s lifetime.</p><h2 id="h-what-applications-make-sense-as-an-ephemeral-rollup" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">What Applications Make Sense as an Ephemeral Rollup?</h2><p>Consider the following list of use cases across various domains (non-exhaustive):</p><ul><li><p><strong>Financial Markets</strong>: Rapid transactions in financial markets can be processed off-chain, ensuring quick execution and minimal latency. At the end of the session, only essential summary data, such as final positions and balances, could be committed on-chain, reducing costs and maintaining market integrity. Examples: promotional flash sales and auctions.</p></li><li><p><strong>Ticketing and Events</strong>: Process ticket sales and event results in real-time with final data, such as ticket ownership and event results, committed on-chain for a tamper-proof record. Examples: hackathons, concerts and seasonal sports tournaments.</p></li><li><p><strong>Gaming:</strong> For in-game events where every click could be a transaction, a fast and dedicated runtime can be off-chain but only user’s game state or final scores can be preserved on-chain. Examples: competitive esports or gaming tournaments.</p></li><li><p><strong>Privacy</strong>: Situations where users want to transact without leaving a permanent trace so only the final balances can be settled on-chain. Examples: private auctions, confidential fundraising campaigns and surveys.</p></li><li><p><strong>Data Aggregation:</strong> Collect and process high-volume data streams from sensors like IoT devices in real-time, with summary data settled on-chain for transparency. Examples: seasonal agriculture and environmental studies.</p></li><li><p>Temporary chains for an Airdrop or NFT mint, and more.</p></li></ul><p>Distilling these examples, we see that applications requiring a combination of high-frequency transaction processing, real-time responsiveness, privacy, and verifiable final outcomes can benefit from being implemented as ephemeral rollups. This approach allows applications to borrow the essential Web3 properties of transparency and verifiability without needing to be entirely on-chain which could be too costly or complex.</p><p>In short, if your application needs to provide the core guarantees of verifiable checkpoints and final state, even after its lifecycle, then an ephemeral rollup may be the ideal solution for you.</p><h2 id="h-ephemeral-rollups-stackr-sdk" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Ephemeral Rollups 🤝 Stackr SDK</h2><p>We know by now that rollups provide scalability and cost efficiency by reducing the load on the parent chain. However, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://l2beat.com/scaling/summary">most rollups today</a> are general-purpose blockchains themselves. If your application requires rapid transactions, you are still bottlenecked by the block time and competing for the limited block space shared among all other smart contracts on the rollup.</p><p>Ephemeral rollups are inherently application-specific since the core idea behind them being “short lived” is that many applications don’t need to exist indefinitely, unlike smart contracts on a general purpose blockchain. Therefore, they borrow all the advantages of a micro-rollup built with Stackr SDK, such as:</p><ol><li><p><strong>Micro-rollups are simply backend services</strong></p><p>Micro-rollups, being indistinguishable from backend services, offer the same DevEx as traditional backend frameworks. In context of ephemeral rollups, this means they can be easily spun up and down while assuring all rollup data was published to the DA and settled on L1.</p></li><li><p><strong>Micro-rollups enable specialized minimal runtimes</strong></p><p>Micro-rollups lets you selectively expose only necessary functionality through deterministic and rigid State Transition Functions (STFs) tailored to the state of the rollup. This allows for highly optimised minimal runtimes dedicated to your application offering extremely fast execution.</p></li><li><p><strong>Micro-rollups enable instant interaction alike web2 apps</strong></p><p>Micro-rollups execute transactions instantly upon arrival. This reduces friction for developers, enabling them to deliver an instant, interactive, and responsive UI that users expect from Web2 applications.</p></li><li><p><strong>Micro-rollups enable verifiable off-chain compute</strong></p><p>Micro-rollups require no overhead in bootstrapping a network since they leverage <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.stf.xyz/concepts/micro-rollup/architecture/verification-layer">Stackr’s verification layer (aka Vulcan)</a> for correctness. Once the state machines are deployed, the STF logic cannot be mutated. This enables the users to have an assurance that the provider has not arbitrarily changed the rules of the system.</p></li><li><p><strong>Micro-rollups can compose with on-chain apps</strong></p><p>Micro-rollups settle the state root (read: merkle root) of the app to the L1 allowing other apps to provably access the state of the rollup, even after the app’s lifecycle.</p></li></ol><h2 id="h-bringing-an-ephemeral-micro-rollup-to-life-for-avail-unification-cup" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Bringing an Ephemeral Micro-Rollup to life for Avail Unification Cup</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/a35bd517bfe9e8ab56ca7f0c7ded01f0afe2ea1ec252c024cad4700b43f9797e.png" alt="Avail&apos;s Announcement post" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Avail&apos;s Announcement post</figcaption></figure><p>An interesting fact is that the Stackr team had been researching and exploring Ephemeral Rollups since some time already. For example, we previously built and showcased on twitter, a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/zkcat_eth/status/1776645571928850770">Scoring System as an Ephemeral Micro-Rollup</a> that can be used for games like Capture the Flag. Hence, partnering with Avail to build an Ephemeral Rollup for their event was the perfect opportunity to showcase simply how delightful of a developer experience (DevEx) it is to build a real-world application with Stackr SDK.</p><p>The goal (<em>pun intended</em>) was to create an application that would allow both onsite attendees and remote followers to track scores, leaderboards, fixtures, rosters, and team information in one place. This app provided a web2-like experience with the added benefit of on-chain traceability, as all match events were recorded in real-time by the Avail team and could be verified by onlookers instantly.</p><h3 id="h-app-experience-web2-style-ux-meets-on-chain-verifiability" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">App Experience: Web2-style UX meets On-chain Verifiability</h3><p>This section details the various design and engineering decisions that went into building this application’s UI to enable a Web2-style UX but with on-chain verifiability.</p><p><strong>Embedded Wallets</strong></p><p>One of our main goals was to abstract the complexities of chain interactions for the users.</p><p>We had two choices:</p><ol><li><p><strong>Traditional Wallet Connection:</strong> This would require users to connect their wallet and sign transactions manually. However, this approach often creates friction, especially if users need to access the application from a device without their wallet signed in.</p></li><li><p><strong>Embedded Wallets:</strong> We chose this option. By using <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.privy.io/">Privy</a> as our OAuth provider, we enabled automatic embedded wallet generation during user signup. This method ensures that the private key is distributed between the client and server, making it impossible to retrieve the private key without the user’s consent.</p></li></ol><p>For administrators of the Micro-Rollup, we implemented an authentication system where only the embedded wallets of authorized admins can sign actions. This approach enhances security and ensures a seamless user experience by reducing the need for repetitive manual interactions with the wallet.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/3a62cdd12fd673948f3e039ad601fb1855f78db8af603f8a748af8bbd0afd0e0.png" alt="UI: Actions page" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">UI: Actions page</figcaption></figure><p><strong>Better Transaction UX with EIP712 Type-Based Signing</strong></p><p>As discussed later, the backend exposes an API endpoint that returns all the STFs with their preferred schema and <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://eips.ethereum.org/EIPS/eip-712">EIP-712</a> types. Based on this information, the frontend dynamically renders the appropriate form, allowing admins to sign and submit the payload without any ambiguity in what action they are authorizing. This is a much more secure and user-friendly approach than traditional DApps where wallets often require users to sign cryptic string of bytes (calldata).</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/2594ff6d3fa17a19a0cc631321c06d3f77d7d33457d5e3887d0a8665f4facc26.png" alt="UI: Action form page" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">UI: Action form page</figcaption></figure><p><strong>Transactions Page: Inbuilt Block Explorer</strong></p><p>One of the key features we implemented is a transactions page, which functions as an inbuilt block explorer. This page lists all actions on the Micro-rollup along with their on-chain pointers, such as transaction links to explorers of both Ethereum and Avail DA. This ensures that all transactions are open and verifiable, maintaining transparency and trust in the application.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6f8e0b57e466402187f6c285fb0e16c608821230fdeafe8bff1ddd657bde0108.png" alt="UI: Transactions page" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">UI: Transactions page</figcaption></figure><p><strong>Serving Stale Content While Revalidating</strong></p><p>To enhance the user experience on the end-user (<em>viewer</em>) side, we built a suite of regular REST APIs. These APIs provide access to various data points from the rollup state such as match fixtures, match events, leaderboards for players and teams, micro-rollup transactions, and more.</p><p>All of these APIs serve regular JSON content, which can be updated through frontend polling. To optimize performance, we used the <code>swr</code> (stale-while-revalidate) technique to cache the transformed responses in a format compatible with our components.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7e9aaae37801a8e5e7c6a69683ce5f49ac231f14fba96abdb9966c312bd6a3b6.png" alt="UI: Team and player rankings page" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">UI: Team and player rankings page</figcaption></figure><p><strong>Native-Like Feel with Optimistic UI Updates</strong></p><p>To make the app feel more native, we chose to develop a mobile-optimized Progressive Web App (PWA) instead of a regular web app. This approach, combined with the embedded wallet, completely abstracts away the chain aspects and provides a seamless, mobile application-like experience.</p><p>Overall, both admins and viewers perceive the application as having a seamless UX similar to traditional apps, despite being backed by the security of Ethereum. We achieve this by updating content immediately upon receiving <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.stf.xyz/build/framework/action/confirmation-status#c1--executed-milliseconds">soft confirmation (C1)</a> from the micro-rollup, which typically occurs within milliseconds. This approach settles transactions on-chain in the background while providing a responsive and regular web2-style application UX.</p><blockquote><p>Feel free to take the application for a spin by visiting <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://unify.stf.xyz">https://unify.stf.xyz</a> or you can watch the demo video linked below as well :)</p></blockquote><div data-type="embedly" src="https://assets.stackrlabs.xyz/clips/unification-cup/demo.mp4" data="{&quot;url&quot;:&quot;https://assets.stackrlabs.xyz/clips/unification-cup/demo.mp4&quot;,&quot;provider_url&quot;:&quot;https://assets.stackrlabs.xyz&quot;,&quot;provider_name&quot;:&quot;Stackrlabs&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;type&quot;:&quot;link&quot;}" format="small"></div><h3 id="h-developer-experience-rollup-meets-rest-api" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Developer Experience: Rollup meets REST API</h3><p>Now that we have talked about the UI/UX of the application, let’s delve deep into the DevEx of building this application’s server-side logic as a micro-rollup.</p><blockquote><p>Note: Before proceeding further, if you are not familiar with how Stackr Micro-Rollups work, please refer to <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/stackrlabs.eth/0okwPJQRfu-GxDafoV6UGYxaO9dJwCARu3WM16jdeCs#heading-quick-primer-on-micro-rollups">Quick Primer on Micro-Rollups</a>.</p></blockquote><p>When developing a micro-rollup, it&apos;s crucial to conceptualize your logic in terms of a state machine. This involves carefully considering the state of the micro-rollup - that is, the data it will hold - and the actions that will dictate the behavior of the state transition function, which in turn operates on this state.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/a7d425a8c3c88cb04754434ae2ec10af25d037116dc32d932bfb9490cfefeb26.png" alt="Basic State Machine working" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Basic State Machine working</figcaption></figure><p>With the above in mind, we start by designing the state of the micro-rollup.</p><p><strong>The Design</strong></p><p>1. Tournament data is stored off-chain inside a state machine as a JSON object</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/877fd907f63747010042f78ebd2753c7a0c5f0c21b7ce9947f3ced04ebe21e44.png" alt="Tournament state represented as a JSON object " blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Tournament state represented as a JSON object</figcaption></figure><p>2. User sends actions which trigger a state transition function inside the state machine</p><p>3. User can send action to start the tournament, start or end a match, record goals, etc.</p><p>4. After each set epoch a block is generated which contains state root and action inputs</p><p>5. The block is sent to Vulcan network for verification</p><p>6. If the block conforms the rules of the state machine it is approved</p><p>7. The block data is split between Ethereum and Avail DA for settlement.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e92d03d04dda058c7f7ab1a2a57c0d608b93dda9356a6c3e11c57f31b5e64289.png" alt="E2E architecture of Avail Unification League Micro-Rollup" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">E2E architecture of Avail Unification League Micro-Rollup</figcaption></figure><p><strong>The Code</strong></p><p>The Stackr SDK, written in TypeScript, lets you inject the application logic directly into the blockchain. The developer only needs to define their state and state transition functions without worrying about any of the protocol heavy lifting of building a blockchain. Let’s see how:</p><ul><li><p><strong>Defining the base state</strong></p></li></ul><p>Since the purpose of our application was to manage a football tournament, the app <strong>state</strong> needed to keep track of players, matches, events during a match, along with some other basic information about the tournament.</p><p><strong>1. So as a starting point, we defined all entities as types in TypeScript.</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/f6f774e58251f7651e60b280bf05c14bf8e56a0e7547524ebe2793192682cf43.png" alt="state.ts" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">state.ts</figcaption></figure><p><strong>The Stackr SDK adopts a schema-first design paradigm familiar to application developers</strong>. It allows complete freedom in terms of state design, allowing developers to simply think in terms of individual entities and how to compose them together to form the full application state.</p><ul><li><p><strong>Adding handlers for state update</strong></p></li></ul><p>After we have defined our app’s state, we need to define <strong>State Transition Functions (STFs)</strong> that update the state. For our app, we could simply define one STF each for actions such as to start or end a match, record a goal or penalty, add or remove a player, etc.</p><p><strong>2. We defined two functions,</strong> <code>startMatch</code> which sets the start time for a match, and <code>logGoal</code> which records a goal event in a match</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/22ca4f2eaa0bf798577f4c8ac0bcf7d09a23be5a6cbb2ad0e78d2a5e9cc798fb.png" alt="stfs.ts" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">stfs.ts</figcaption></figure><p>Breaking down the <code>startMatch</code> function,</p><ul><li><p>The admin can submit an action to start a match providing the <code>matchId</code>.</p></li><li><p>The STF verifies that the match is not already started and sets the <code>startTime</code> of the match to that of the current block timestamp.</p></li></ul><p>Breaking down the <code>logGoal</code> function,</p><ul><li><p>The admin can submit an action to record a goal, referencing the related <code>matchId</code> and <code>playerId</code>.</p></li><li><p>The STF verifies the inputs, updates the match’s score and records a new entry of type <code>Log</code> with action <code>GOAL</code> in the state.</p></li></ul><blockquote><p>Note: The actual implementation contains more state handlers than only the above two but are intentionally left out to keep this blogpost short and concise.</p></blockquote><p>We’ve reached the point where our micro-rollup is ready (you: <em>already!?</em>).</p><ul><li><p><strong>Interfacing with the micro-rollup using REST APIs</strong></p></li></ul><p>Another great DevEx unlock here is that the developers have complete freedom in how they wrap the micro-rollup, whether it’s through REST API, GraphQL, RPC, or any other method to expose interaction with the micro-rollup.</p><p><strong>3. Ultimately, we exposed certain functionalities of the micro-rollup, such as submitting actions and retrieving its state, through simple REST APIs with Express.js:</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/bfff95d68a8117a2e9b98c26bde4b2fd44994159a4d4d1d3f0d39f1ec8e1c6a9.png" alt="api.ts" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">api.ts</figcaption></figure><p>Despite our rollup having many STFs, we consolidated them into a single POST endpoint to facilitate easier implementation on the frontend. Additionally, we implemented several GET endpoints that provide access to the micro-rollup’s state and meta information, including lists of STFs with their preferred schema and EIP-712 types. Hence, clients can make HTTP requests to these APIs to interact with the micro-rollup in a familiar manner. This greatly simplified the frontend integration while enhancing flexibility in leveraging the micro-rollup&apos;s capabilities.</p><p>Overall, our micro-rollup builds, feels and behaves like a regular web2 backend server. And yes, with Stackr, it is <em>that</em> easy to give on-chain superpowers to a backend server. Indeed, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.stf.xyz/build/development-paradigm#rollups-are-the-new-web-servers">rollups are the new web servers</a>.</p><h3 id="h-challenges-faced-during-the-tournament-real-time-fork" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Challenges faced during the tournament: Real-Time “Fork”</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/0a75434a581c6f63c2323a319a36dbacdadb5dcbff556bd1db286b23fa28eb44.png" alt="zkcat (from our team) onsite at the tournament and debugging from phone" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">zkcat (from our team) onsite at the tournament and debugging from phone</figcaption></figure><p>Things never seem to go smoothly in production, do they? Well, yes and no. On the bright side, the micro-rollup worked flawlessly with no bugs or errors. On the not-so-bright side, we totally missed the memo on having to manually manipulate state in a decentralized app. Classic. Well, story time!</p><p>Although it hasn&apos;t been discussed in the implementation above, there is a <code>computeMatchFixtures</code> function called at the start of the tournament and after each match to determine the next fixtures among the qualifying teams. When the tournament reached the semi-finals, the fixtures were computed, but two qualifying teams were not ready to play. This required reconfiguring the fixtures so the two teams already present could play each other first.</p><p>Given the immutable nature of a blockchain, this is an impossible task since the fixtures were already updated in the state with commitments settled on Ethereum and Avail DA.</p><p><em>Wat to do?</em> We ended up performing a &quot;<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.stf.xyz/build/upgrade-guide#backing-up-your-micro-rollup-state">Squash Fork,</a>&quot; where we shut down the rollup and deployed a new instance, taking the latest state but with modified fixtures as the new genesis state. Since all involved parties agreed that the fixtures needed to be reconfigured and given that (again) micro-rollups are just backend services, it took only a few minutes for us to perform the Squash Fork, ensuring the tournament proceeded smoothly.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c482b5cd77e46fb9aa9b8af6f1a69c591949d0d5b5b4511e72d0eee0e4946e9c.png" alt="State is copied at a block and used as genesis state for a new chain - The new chain loses history but preserves the last finalized state" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">State is copied at a block and used as genesis state for a new chain - The new chain loses history but preserves the last finalized state</figcaption></figure><p>This incident highlights the importance of flexibility and sovereignty of micro-rollups in adapting to real-world scenarios. The sovereign nature of micro-rollups ensures that control over the rollup lies with the specific application, enabling quick decision-making and implementations. This flexibility is one of the key advantages of using micro-rollups, especially in dynamic environments where unforeseen changes may occur.</p><p>Full code for the MRU can be found here -</p><div data-type="embedly" src="https://github.com/stackrlabs/unification-cup" data="{&quot;provider_url&quot;:&quot;https://github.com&quot;,&quot;description&quot;:&quot;Micro-rollup for Unification Cup. Contribute to stackrlabs/unification-cup development by creating an account on GitHub.&quot;,&quot;title&quot;:&quot;GitHub - stackrlabs/unification-cup: Micro-rollup for Unification Cup&quot;,&quot;author_name&quot;:&quot;stackrlabs&quot;,&quot;thumbnail_width&quot;:1200,&quot;url&quot;:&quot;https://github.com/stackrlabs/unification-cup&quot;,&quot;thumbnail_url&quot;:&quot;https://storage.googleapis.com/papyrus_images/171d64d53a4ddc47348b66ae291d94bf88ce281f9463e18dae1a7ed82a42d9e1.png&quot;,&quot;author_url&quot;:&quot;https://github.com/stackrlabs&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;GitHub&quot;,&quot;type&quot;:&quot;link&quot;,&quot;thumbnail_height&quot;:600,&quot;image&quot;:{&quot;img&quot;:{&quot;width&quot;:1200,&quot;height&quot;:600,&quot;src&quot;:&quot;https://storage.googleapis.com/papyrus_images/171d64d53a4ddc47348b66ae291d94bf88ce281f9463e18dae1a7ed82a42d9e1.png&quot;}}}" format="small"><link rel="preload" as="image" href="https://storage.googleapis.com/papyrus_images/171d64d53a4ddc47348b66ae291d94bf88ce281f9463e18dae1a7ed82a42d9e1.png"/><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://github.com/stackrlabs/unification-cup" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>GitHub - stackrlabs/unification-cup: Micro-rollup for Unification Cup</h2><p>Micro-rollup for Unification Cup. Contribute to stackrlabs/unification-cup development by creating an account on GitHub.</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://github.com</span></div><img src="https://storage.googleapis.com/papyrus_images/171d64d53a4ddc47348b66ae291d94bf88ce281f9463e18dae1a7ed82a42d9e1.png"/></div></a></div></div><h2 id="h-questions-and-considerations" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Questions &amp; considerations</h2><ul><li><p>Why does this application need to have any on-chain component at all in the first place — why require <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://polynya.mirror.xyz/B6sXybxh21xliL4XDxvX1X86UE4NmkTvcCHexxEa4PU">strict global consensus</a> on who won a football tournament among a bunch of crypto degens?</p><ul><li><p>A: You (may) have a valid point. However, consider the importance of having such solutions available for recording extremely high-stake historical or political events that affect the larger human civilization. Because in scenarios, when our <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://en.wikipedia.org/wiki/List_of_bank_failures_in_the_United_States_(2008%E2%80%93present)">institutions fail</a> or a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.goodreads.com/quotes/481916-every-record-has-been-destroyed-or-falsified-every-book-rewritten">totalitarian state attempts to rewrite history</a>, yes, the superpower of public blockchains like Ethereum is to provide strict global consensus and to serve as a reliable <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://stark.mirror.xyz/n2UpRqwdf7yjuiPKVICPpGoUNeDhlWxGqjulrlpyYi0">source of hardness</a> enabling <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://ethereum.foundation/infinitegarden">human coordination</a> at scale.</p></li></ul></li><li><p>Ethereum roadmap includes <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://ethereum.org/en/roadmap/statelessness/">history expiry and state expiry</a>. Also, Data Availability layers <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.celestia.org/learn/how-celestia-works/data-availability-faq#why-doesn-t-celestia-incentivize-storage-of-historical-data">do not guarantee that historical data will be permanently stored</a>. Does this not defeat the purpose of ERs?</p><ul><li><p>A: It is <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://notes.ethereum.org/@vbuterin/proto_danksharding_faq#If-data-is-deleted-after-30-days-how-would-users-access-older-blobs">increasingly the view</a> in the community that blockchains are not meant for storing data but rather for storing data commitments. As long as there is global consensus on the hash or digest of the data, it doesn&apos;t matter where this data is obtained from. This concept is central to rollups. In other words, there is clear incentive for centralized providers such as block explorers to provide access to archival data. Since rollups settle their state root to Ethereum (EVM state), which becomes part of the block header, you will always be able to verify whether the data obtained from a centralized provider is correct, maintaining the verifiability of data.</p></li></ul></li><li><p>Could ERs be useful for protocol workload balancing?</p><ul><li><p>A: That’s an intriguing idea — using Ephemeral Rollups as a load-balancing mechanism, spinning them up on demand to manage traffic. To draw an analogy, just as micro-rollups function as micro-services for Web3 and Kubernetes provides auto-scaling for micro-services, exploring this concept for multi-nodal micro-rollups is certainly worth considering, though it may come with many challenges.</p></li></ul></li></ul><h1 id="h-conclusion" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Conclusion</h1><p>The implementation of the tournament application as an ephemeral rollup for use at the Avail Unification Cup during EthCC Brussels 2024 demonstrated their potential in being perfectly suited for efficient real-time real-world applications that offer the core guarantee of some summary or outcome being inscribed on-chain. With the state roots and transaction inputs set in stone on Ethereum (and Avail DA), anyone at any point in the future can verify the historical accuracy of this tournament’s events and outcome. Through this event, we were able to showcase how applications can be built as micro-rollups, providing a UX and DevEx comparable to traditional web2 apps while maintaining on-chain verifiability.</p><p>By combining the scalability and efficiency of off-chain execution runtimes with the security and immutability of on-chain data permanence, we foresee the applications of ephemeral rollups expanding across various domains, providing robust solutions for temporary yet critical use cases.</p><hr><h2 id="h-interested-in-building-your-own-ephemeral-micro-rollup" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>Interested in building your own Ephemeral Micro-Rollup?</strong></h2><p>At Stackr Labs, we’re building the toolkit and the necessary infrastructure to build <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://kautuk.substack.com/p/micro-rollup-a-wave-or-just-a-shameless">app-specific micro-rollups</a> to supercharge and unlock the DevEx around building apps that bridge the gap between Web2 and Web3. If you’re someone who’s looking to build a web3 application, we’d love to talk to you and find ways to collaborate.</p><p><strong>Contact us on </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.com/invite/PY4nhg7bcc"><strong>Discord</strong></a><strong> (preferable), </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://twitter.com/0xStackr"><strong>Twitter</strong></a><strong> or shoot an email at gm[at]stackrlabs.xyz</strong></p>]]></content:encoded>
            <author>stackrlabs@newsletter.paragraph.com (Stackr Labs)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/4e15a0af63ae764a04f62bc099f73c602ce429ea455ee42c1f1a003146a4f119.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Micro-Rollups for Keystores]]></title>
            <link>https://paragraph.com/@stackrlabs/micro-rollups-for-keystores</link>
            <guid>G64DOBjYjWzFrChVfapu</guid>
            <pubDate>Mon, 27 May 2024 16:28:41 GMT</pubDate>
            <description><![CDATA[If you’ve been deep in the trenches of Account Abstraction (AA) and Rollup scaling, you’ve probably come across the term “Keystore Rollup”. Since this concept sits at the intersection of two of "The Three Transitions", it represent a significant step towards a more global-scale and user-friendly Ethereum ecosystem.The Three TransitionsThe aim of this blogpost is to provide a high-level yet detailed deep dive into the concept of a Keystore Rollup, what problems does it solve, an example implem...]]></description>
            <content:encoded><![CDATA[<p>If you’ve been deep in the trenches of <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://ethereum.org/en/roadmap/account-abstraction/">Account Abstraction (AA)</a> and <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://ethereum.by/it/developers/docs/layer-2-scaling/#rollups">Rollup scaling</a>, you’ve probably come across the term “Keystore Rollup”. Since this concept sits at the intersection of two of &quot;<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://vitalik.eth.limo/general/2023/06/09/three_transitions.html">The Three Transitions</a>&quot;, it represent a significant step towards a more global-scale and user-friendly Ethereum ecosystem.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/217b104b944d0f69b066c2e8e30e41e81db32547b6c30742fd8663975010b828.png" alt="The Three Transitions" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">The Three Transitions</figcaption></figure><p>The aim of this blogpost is to provide a high-level yet detailed deep dive into the concept of a Keystore Rollup, what problems does it solve, an example implementation of a Keystore Micro-Rollup while covering both the advantages and disadvantages of such an approach.</p><h2 id="h-why-is-a-keystore-rollup-needed" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Why is a Keystore Rollup needed?</h2><p>As part of the two of &quot;The Three Transitions&quot;, the Ethereum ecosystem is encouraging users to migrate to rollups (L2s) for cheaper transactions and promoting the use of Smart Contract Wallets (SCW) for better security. As a result, <strong>a user is now required to deploy a smart contract account on every rollup they wish to transact on</strong>. Unlike Externally Owned Accounts (EOAs), which are stateless and function similarly on L1 and all L2s, a smart contract account holds state enabling features like key rotation, recovery, multi-sigs and more.</p><p>This is where lies the root of the problem: each rollup’s state is isolated from other rollups. If a user wishes to update her account state, such as adding or removing a signer from a multi-sig, this change needs to be synchronized across all her SCWs on all networks. This complexity is why many wallet providers are heavily tied to one network, leaving the user with no choice but to use separate wallets. Although some providers are developing modules to synchronize these changes to all networks for the user, but even that has significant difficulties in practice:</p><ul><li><p>Complexity: Building and submitting transactions, handling transaction failure, settlement or re-orgs across all networks is intricate.</p></li><li><p>Cost: If rollups provide 10-100x cost savings compared to Ethereum, but a permission change needs propagation to 10-100 networks, we haven’t really saved anything on fees.</p></li><li><p>Security: Urgent permission revoking changes, such as incase of a key becoming leaked, need to applied immediately but different networks have different block times, time to finality, censorship guarantees therefore leaving users vulnerable if changes are not applied promptly or left unapplied altogether.</p></li></ul><p>Essentially, in an increasingly modular world where a user’s assets are spread across many rollups, using smart wallets becomes more challenging, and their advantages over EOAs, such as better UX and security, start to fade. <em>Wat to do?</em></p><h2 id="h-keystore-rollup-a-solution-for-cross-chain-smart-accounts" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Keystore Rollup: A solution for cross-chain smart accounts</h2><p>The fundamental idea behind a Keystore rollup is to concentrate account state in one rollup, the Keystore rollup, which can serve as the source of truth for all other rollups. All accounts, regardless of what other networks they need to transact on, refer to the Keystore Rollup to authenticate users. Instead of storing mutable permissions in the account smart contract on each rollup, an immutable link to a “virtual account” id is stored which points to the actual permission data on the Keystore Rollup. Hence, by providing a global repository for account permissions, Keystore Rollups can streamline account management for users.</p><p>Drawing an analogy to <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://en.wikipedia.org/wiki/OAuth">OAuth</a>, a standard widely used in Web2 systems, the Keystore rollup functions as the Identity Provider (IdP), while all other rollups serve as Service Providers (SPs).</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/3eb55a1ce6015119bc87edbc4303a2f7f6a1dc2e746cb362d380daa2dcc355c5.png" alt="Gollum: “One rollup to auth them all”" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Gollum: “One rollup to auth them all”</figcaption></figure><p>We can compare how such a construction addresses the shortcomings of current systems:</p><ul><li><p>Complexity: is reduced by removing the need to manage state across multiple networks and propagate duplicate transactions to make permission changes.</p></li><li><p>Cost: is reduced by removing these duplicated transaction fees.</p></li><li><p>Security: is improved by guaranteeing immediate application of removed permissions which automatically (implicitly) gets applied to all networks.</p></li></ul><p>While this sounds promising, the subsequent sections delve into the existing approaches, implementation, and user stories of the Keystore Rollup revealing various drawbacks and considerations, which are discussed in depth at the end of this article.</p><h1 id="h-basic-architecture-of-a-keystore-rollup" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Basic architecture of a Keystore Rollup</h1><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7cebbe682324ba03cb54da31d3903c7920d9e391d7ba2f8c6d8878a34948e8cd.png" alt="E2E mechanics of a Keystore Rollup" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">E2E mechanics of a Keystore Rollup</figcaption></figure><p>The basic architecture of a Keystore Rollup comprises several components:</p><ol><li><p>Rollup node</p></li><li><p>Keystore Rollup Contract on L1</p></li><li><p>Keystore Contract on each L2</p></li><li><p>Keystore Account Factory on each L2</p></li><li><p>Validator Library and State Verification Library</p></li></ol><p>Let’s briefly go over each of these one-by-one:</p><ol><li><p>Rollup node</p><p>The Keystore Rollup node maintains the state, has functionality for registering and updating accounts and generating proof for an account. It periodically rolls down its state root to the L1.</p></li><li><p>Keystore Rollup Contract on L1</p><p>The Keystore Rollup Contract on L1 stores the state root and sends messages to L2 contracts to update their state root variable.</p></li><li><p>Keystore Contract on each L2</p><p>The Keystore Contract on each L2 also stores the state root for direct read-access by Smart Contract Wallets (SCWs) on that L2.</p></li><li><p>Keystore Account Factory on each L2</p><p>The Keystore Account Factory on each L2 is responsible for creating SCWs deterministically. These SCWs point to the unique key of the Keystore Rollup, allowing users to authenticate across all networks with the same key.</p></li><li><p>Validator Library and the State Verification Library</p><p>These are included with the SCW on each L2. Validator Library verifies the validity of transaction signature against the SCW config, while the State Verification Library verifies the user-provided proof against the state root of the Keystore Rollup.</p></li></ol><h3 id="h-existing-approaches" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Existing approaches</h3><p>While the basic architecture discussed above remains the same across different approaches, deciding on a proof scheme is a crucial detail that impacts the complexity of implementation and costs for users in how data (and its proofs) are communicated cross-chain.</p><p>The following is a comparative analysis of a figure taken from Vitalik’s blog on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://vitalik.eth.limo/general/2023/06/20/deeperdive.html#what-kinds-of-proof-schemes-can-we-use"><strong>Deeper dive on cross-L2 reading for wallets and other use cases</strong></a> which mentions different approaches for proof schemes:</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/43e3247f5e0fb84f9259fbae64ac7fb86f8814febce3291dd2da1e4ac3b82bdc.png" alt="Vitalik’s ranking for different proof schemes" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Vitalik’s ranking for different proof schemes</figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/aad1ad4598e952889e6c89af88a57848d1b7a67726b2a42f89e4cdfc42f306d3.png" alt="Comparison between different approaches" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Comparison between different approaches</figcaption></figure><p>While the merkle tree model is not the most cost effective for the user, they are widely used everywhere in Web3 with a large amount of available tooling. For the sake of simplicity, we will implement a merkle tree model since that is the default proofing mechanism employed by Stackr Micro-Rollups as well.</p><h2 id="h-quick-primer-on-micro-rollups" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Quick Primer on Micro-Rollups</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/32602bcdd679f6f94debb3fb9023a95e408d754abd4aa121012962fc982bbbf7.png" alt="Micro-Rollup e2e Workflow" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Micro-Rollup e2e Workflow</figcaption></figure><p>In oversimplification, micro-rollups are essentially state machines at the core.</p><ul><li><p>The state machine has a defined shape of the state &amp; the genesis state.</p></li><li><p>The state machine has actions(read: transaction types) which when invoked trigger a state transition function on the machine.</p></li><li><p>The State Transition Function(STF) in effect performs computation and mutates the state of the machine.</p></li></ul><p>After the STF execution, the actions are rolled together in a block &amp; shipped to Vulcan(Stackr’s Verification Middleware).</p><p>Finally, Vulcan —</p><ol><li><p>Pessimistically re-executes the actions in the block to check for validity of the STF.</p></li><li><p>Settles on L1 &amp; DA.</p><ol><li><p>Micro-Rollup’s updated state is sent to the DA.</p></li><li><p>The metadata of the verified block &amp; the updated state root is settled to the micro-rollup’s inbox contract on L1.</p></li></ol></li></ol><p>The above pipeline collectively forms Stackr’s Micro-Rollup Framework.</p><h2 id="h-keystore-micro-rollup" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Keystore 🤝 Micro-Rollup</h2><p><em>So, why are micro-rollups uniquely suited to build a keystore?</em></p><ol><li><p><strong>Micro-rollups enable specialized minimal VMs</strong></p><p>In the original proposal for a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://notes.ethereum.org/@vbuterin/minimal_keystore_rollup">dedicated minimal rollup for keystores</a>, Vitalik advocates for a simple implementation without a full EVM for reduced security risk. Micro-Rollups lets you selectively expose only necessary functionality through deterministic and rigid State Transition Functions (STFs) tailored to the state of the rollup, significantly reducing the attack surface area.</p></li><li><p><strong>Micro-rollups are flexible sovereign systems</strong></p><p>Since micro-rollups break free from the shackles of the EVM, it’s trivial to add support for different signature schemes for sending transactions to the micro-rollup. In context of a keystore rollup, this could translate to supporting transactions signed using passkeys, multi-sigs, etc.</p></li></ol><h2 id="h-lets-build-a-keystore-micro-rollup" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Let’s build a Keystore Micro-Rollup</h2><p><em>Disclaimer: This demonstration showcases the framework&apos;s capabilities and represents a preliminary proof of concept.</em></p><p>When developing a micro-rollup, it&apos;s crucial to conceptualize your logic in terms of a state machine. This involves carefully considering the state of the micro-rollup - that is, the data it will hold - and the actions that will dictate the behavior of the state transition function, which in turn operates on this state.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/aba6b517ab16ec46aef25583a5a8a422d72d952a26a6d04589c15851b4e25160.png" alt="The State machine development paradigm" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">The State machine development paradigm</figcaption></figure><p>With the above in mind, we start by designing the state of the micro-rollup using Stackr’s SDK.</p><h3 id="h-the-design" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>The Design</strong></h3><ol><li><p>Accounts are stored off-chain inside a state machine as a key-value map</p></li><li><p>User sends actions which trigger a state transition function inside the state machine</p></li><li><p>User can send action to register a new account or update an account</p></li><li><p>After each set epoch a block is generated which contains details of accounts state</p></li><li><p>The block is sent to Vulcan network for verification</p></li><li><p>If the block conforms the rules of the state machine it is approved</p></li><li><p>The block data is split between L1 and DA for settlement.</p></li></ol><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/df981373d3a7e6baca1e9d772eb8be416f9abc938b28a681989874d4d348a3af.png" alt="Architecture of a Keystore Micro-Rollup using Stackr&apos;s SDK" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Architecture of a Keystore Micro-Rollup using Stackr&apos;s SDK</figcaption></figure><h3 id="h-quick-demo-before-diving-into-the-implementation-details" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Quick Demo before diving into the implementation details</h3><div data-type="embedly" src="https://assets.stackrlabs.xyz/clips/keystore/demo.mp4" data="{&quot;url&quot;:&quot;https://assets.stackrlabs.xyz/clips/keystore/demo.mp4&quot;,&quot;provider_url&quot;:&quot;https://assets.stackrlabs.xyz&quot;,&quot;provider_name&quot;:&quot;Stackrlabs&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;type&quot;:&quot;link&quot;}" format="small"></div><h3 id="h-implementation-using-the-stackr-sdk" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Implementation using the Stackr SDK</h3><p>The Stackr SDK, written in TypeScript, lets you inject the application logic directly into the blockchain. This environment delivers a developer experience akin to traditional server-side or backend application development. Let’s see how:</p><p><strong>1. As a starting point, let’s define</strong> <code>accounts</code> in our state.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e4b8e006df8b9ff1df932444e0e3df97cbe857dfc27c0ddfdb8a92ec562c08d5.png" alt="accounts state" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">accounts state</figcaption></figure><p>Bear with us, these fields are explained in the next section.</p><p>After we setup our minimum viable state, we need to define <strong>state transition functions</strong> that update the state.</p><p><strong>2. Let’s define two functions,</strong> <code>register</code> which is responsible for registering a new account with the keystore, and <code>update</code> which is responsible for updating an existing account entry.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/44b300d876bc896cf2231d464b4490411ca650eb43a8a84f2f796de14c217f65.png" alt="state transition function for registering an account" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">state transition function for registering an account</figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/3eb0466bf5005985a2385f3e2d76c93c256d6665b23e98048975ea30f1673a2b.png" alt="state transition function for updating an account" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">state transition function for updating an account</figcaption></figure><p>Breaking down the <code>register</code> function,</p><ul><li><p>The user submits an action to register a new account, providing two fields (ideally generated by the user’s wallet):</p><ul><li><p><code>codeHash</code>: hash of the smart contract’s bytecode of the validation library</p></li><li><p><code>configHash</code>: hash of the SCW config (could be a public key or in the case of a multisig a concatenation of multiple public keys)</p></li></ul></li><li><p>Together this makes up the <code>data</code> i.e.,<code>data = hash([codeHash, configHash])</code></p></li><li><p><code>vk</code>: verification key that specifies instructions for changing the <code>data</code> and <code>vk</code>. In this case, it’s the address who initiates the action but it could be different depending on the type of approach.</p></li><li><p><code>key = hash([data,vk])</code>: this key serves as the unique “virtual account” id and returned to the user.</p></li><li><p>Finally, the new account entry is added to the state against this key, <code>accounts[key] = (data, vk)</code>.</p></li></ul><p>Breaking down the <code>update</code> function,</p><ul><li><p>The user submits an action to update an existing account, referencing the related <code>key</code> among other fields they wish to update. While it may not be immediately obvious, update functionality is crucial to enable security-critical features like recovery or changing signers.</p></li><li><p>The address initiating the action must match the current <code>vk</code>.</p></li><li><p>Finally, account entry at <code>accounts[key]</code> is updated with the new values.</p></li></ul><p><strong>3. Ultimately, we define how the state root is computed for L1 settlement.</strong></p><p>As mentioned at the beginning, micro-rollup’s state root is settled on L1. It is interesting to note that the developer can chose what part of the state settles on L1 vs what part can go on DA as metadata, thereby, unlocking hybrid security assumptions.</p><p>In this case, we extract the <code>accounts</code> and settle it’s <strong>merklized root</strong> on L1, thereby opening up the possibility of direct inclusion proofs of accounts in the merkle tree.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/74e1897000c530e1d2bb8fa0463539e140537637983d97f9438a90239c1fb491.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><strong>We’ve reached the point where the minimum viable system works. Surprisingly easy to give on-chain superpowers to a backend server, no?</strong></p><blockquote><p>Note: The contracts side of code is intentionally omitted as out of scope for this article. It is well discussed in <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://hackmd.io/@ilikesymmetry/solidity-account-circuits">Conner’s Solidity Account circuits</a> blog post. Although that is an approach for ZK-SNARK based proof scheme, the Validator Library and State Verification Library remains similar for this type of system too.</p></blockquote><h3 id="h-what-does-using-this-keystore-micro-rollup-look-like" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">What does using this Keystore Micro-Rollup look like?</h3><p>There are two primary user stories here:</p><ol><li><p>User registering a keystore account</p></li><li><p>User sending a transaction on an L2 referencing their keystore account</p></li></ol><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/328c3ab10bc7035861f96e22c16a36d3baab1698e10c91bdeb5e838a498cf1e1.png" alt="Transaction flow and user stories of interacting with the Keystore Micro-Rollup" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Transaction flow and user stories of interacting with the Keystore Micro-Rollup</figcaption></figure><p>Breaking these down,</p><ol><li><p>User can register an account with the Keystore Micro-Rollup. As described in the previous section, this would involve their wallet provider generating the <code>codeHash</code> and <code>configHash</code> and passing it onto the keystore. The wallet provider also deploys a new SCW <code>KeyStoreAccount</code> (bundled with the Validator Library and State Verification Library) using the <code>KeystoreAccountFactory</code> on each L2 the user wishes to transact on. This SCW simply stores a pointer to the immutable account key returned by the Keystore micro-rollup, which can be later used for lookups in the keystore during verification.</p></li><li><p>When submitting a transaction on any L2, the user would first need to obtain a proof (in this case, a merkle proof) for their account from the Keystore Micro-Rollup. The wallet provider would essentially need to construct a User Operation, baking in the <code>merkleProof</code>, SCW <code>config</code>, and <code>codeHash</code> into its signature, like so: <code>userOp.signature = abi.encode(codeHash, userOpSig, config, merkleProof)</code>. This will later be decoded inside the SCW at which point it will leverage the Validator Library to verify the validity of transaction signature against the SCW config, and the State Verification Library to verify the user-provided merkle proof against the state root stored in the Keystore Contract on that L2. If both checks pass, the user’s transaction is authenticated.</p></li></ol><p>An interesting thing to note here is that since each <code>(data, vk)</code> pair corresponds to a unique key in the Keystore, the SCW need not be deployed immediately on all L2s but the user can still obtain a counterfactual address. This is a deterministic address for a smart contract that hasn&apos;t been deployed yet, but can still be used to receive funds on any chain at the same address</p><h2 id="h-questions-and-considerations" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Questions &amp; considerations</h2><ul><li><p>Can I migrate my existing SCW to a keystore rollup?</p><ul><li><p>A: There is no spec that enables an existing SCW to “register” with the keystore. In all the approaches, user will deploy new SCW after registering a key with the keystore first. This is an essential feature to have though and requires further discussions within the community.</p></li></ul></li><li><p>What does it mean that the L2 “requires” a proof?</p><ul><li><p>A: Since the user’s account state is no longer on the L2s they may be transacting with but externalized on the keystore rollup, the L2 requires the relevant account state to be submitted alongside that account key’s inclusion proof for verifying the integrity of a transaction.</p></li></ul></li><li><p>Aren’t the transactions going to be more expensive as there is more metadata?</p><ul><li><p>A: Yes. With a keystore rollup, each user-op is packed with extra metadata (<code>config</code>, <code>codeHash</code>, <code>proof</code>) while also requiring extra on-chain compute for the verification of the proof. This incurs additional gas fees in both calldata and computation. As Merkle Tree of accounts grows, the size of the proof becomes larger and will cost more gas fees.</p></li></ul></li><li><p>What about latency between the proof creation and proof verification?</p><ul><li><p>A: Yes, latency issues persists for all approaches and in both directions. It’s possible that the proof obtained by the user is no longer valid by the time it is verified onchain as the state root stored in the keystore contract got updated in the meantime. On the other hand, the user might have obtained a proof for a state which is not yet synced with the L1 and all L2s.</p></li></ul></li><li><p>What about the cost of syncing the state root across all L2s?</p><ul><li><p>A: Yes, in this approach one transaction is required for message transfer to each L2 which could incur significant cost. This is because we rely on the messaging protocol of each L2 since there is <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://vitalik.eth.limo/general/2023/06/20/deeperdive.html#direct-state-reading">no standardized way to read L1 state on L2s</a>.</p></li></ul></li><li><p>What if the keystore rollup censors me?</p><ul><li><p>A: We see two paths here. Firstly, the rollup should allow <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://l2beat.com/glossary#escape-hatch">force-inclusion</a> of transactions directly from the L1 so the user can always update their account. Secondly, as long as the rollup guarantees publishing all its data to a Data Availability (DA) layer the user should be able to construct a proof without relying on the rollup operator.</p></li></ul></li><li><p>What if the keystore rollup re-orgs?</p><ul><li><p>A: Ideally the keystore rollup would keep an appropriate buffer of block confirmations to hang back before solidfying a state root as official and generating proofs against it. This feeds back into the latency issues and depletes UX.</p></li></ul></li><li><p>What kinds of wallet configurations and signing methods can it support?</p><ul><li><p>A: The general idea is to support all and any kind of signing methods as long as it can be implemented in the EVM. That is why the keystore rollup doesn’t assume anything and accepts arbitrary variables, namely, <code>codeHash</code> and <code>configHash</code>, which lets the developer write unique and custom signature verifications methods in the Validator Library. The possibilites are endless: multisigs, passkeys, rotating session keys, signing methods with aggregation like BLS or EdDSA, ZK Email, ZK-SNARKs, Quantum safe signing method like Winternitz Signatures, and more.</p></li></ul></li></ul><h2 id="h-conclusion" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Conclusion</h2><p>Keystore Rollups offer a promising solution for managing smart contract wallets across networks by centralizing account states on a dedicated rollup. At first glance, they seem to simplify permission management, reduce complexity, cut costs, and enhance security. However, as we delve deeper, we see that they are not without their own challenges, particularly related to costs and latency issues.</p><p>Being a complimentary feature to a more <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://frontier.tech/the-cake-framework">Chain Abstracted</a> future of seamless cross-chain interaction, ideas like Keystore Rollup play a crucial role in paving a path to a more scalable, secure, and user-friendly Ethereum ecosystem. As developers and researchers, we must strive to explore and experiment with such ideas.</p><h2 id="h-references" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">References</h2><ul><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://vitalik.eth.limo/general/2023/06/09/three_transitions.html">https://vitalik.eth.limo/general/2023/06/09/three_transitions.html</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://vitalik.eth.limo/general/2023/06/20/deeperdive.html#how-would-zk-snark-proofs-work">https://vitalik.eth.limo/general/2023/06/20/deeperdive.html</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://notes.ethereum.org/@vbuterin/minimal_keystore_rollup">https://notes.ethereum.org/@vbuterin/minimal_keystore_rollup</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://hackmd.io/@mdehoog/mksr#Account-circuit">https://hackmd.io/@mdehoog/mksr#Account-circuit</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://hackmd.io/@ilikesymmetry/intro-keystore-rollup">https://hackmd.io/@ilikesymmetry/intro-keystore-rollup</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://hackmd.io/@ilikesymmetry/solidity-account-circuits">https://hackmd.io/@ilikesymmetry/solidity-account-circuits</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://hackmd.io/@haichen/keystore#Wallet-Example">https://hackmd.io/@haichen/keystore#Wallet-Example</a></p></li></ul><hr><h2 id="h-interested-in-building-your-own-keystore" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>Interested in building your own Keystore?</strong></h2><p>We will soon be sharing a more “complete” version of the above mentioned experiment. Until then, if you’re someone who’s looking to build a Keystore Rollup for your protocol, we’d love to talk to you and find ways to collaborate.</p><p>Meanwhile - beta access to our SDK is still open, head over to the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.stf.xyz/beta/beta-access/">application form</a> and sign-up. We are letting developers in on a rolling basis.</p><p><strong>Contact us on </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.com/invite/PY4nhg7bcc"><strong>Discord</strong></a><strong> (preferable), </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://twitter.com/0xStackr"><strong>Twitter</strong></a><strong> or shoot an email at gm[at]stackrlabs.xyz</strong></p>]]></content:encoded>
            <author>stackrlabs@newsletter.paragraph.com (Stackr Labs)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/3dcae6ca6728f4bd1ae12c1bd12c7e17f9884220d15e394c83816e05ae5a64aa.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Introducing the Playground 🧸]]></title>
            <link>https://paragraph.com/@stackrlabs/introducing-the-playground</link>
            <guid>H4iRaUBNzd83LK4I0mr2</guid>
            <pubDate>Tue, 30 Apr 2024 15:34:41 GMT</pubDate>
            <description><![CDATA[Micro-Rollups are an evolution of how app-specific rollups, or single-app rollups, should be built. It was only fair that we reimagined what the developer tooling should look like to significantly enhance the process of building a micro-rollup. And, that’s how the Micro-Rollup Playground was birthed! The Playground is primarily a dev tool, which provides a full-featured interface to interact with your MRU, view actions processed, blocks formed, granular finality of each action, and enables ac...]]></description>
            <content:encoded><![CDATA[<p>Micro-Rollups are an evolution of how app-specific rollups, or single-app rollups, should be built. It was only fair that we reimagined what the developer tooling should look like to significantly enhance the process of building a micro-rollup.</p><p>And, that’s how the <strong>Micro-Rollup Playground</strong> was birthed!</p><p>The Playground is primarily a dev tool, which provides a full-featured interface to interact with your MRU, view actions processed, blocks formed, granular finality of each action, and enables action-by-action state rewind, all inside the developers’ browser.</p><h2 id="h-feature-highlight" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Feature Highlight</h2><p>The team at Stackr has put together the Playground with a lot of passion and love. We’d like to showcase a few features that we think are a stand-out compared to the other dev tooling available in the ecosystem</p><h3 id="h-mru-interface" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">MRU Interface</h3><p>Developers can directly interact with their micro-rollup and send actions through the Playground interface.</p><div data-type="embedly" src="https://assets.stackrlabs.xyz/clips/playground/3.mp4" data="{&quot;url&quot;:&quot;https://assets.stackrlabs.xyz/clips/playground/3.mp4&quot;,&quot;provider_url&quot;:&quot;https://assets.stackrlabs.xyz&quot;,&quot;provider_name&quot;:&quot;Stackrlabs&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;type&quot;:&quot;link&quot;}" format="small"></div><p>The Playground picks up all the defined state transition functions and the action schemas and provides a visual way to interact with your Rollup after connecting your favorite wallet to it.</p><p>This feature solves a major pain point of developers building micro-rollups around interacting with the rollup for testing and significantly improves the feedback loop between implementing the business logic and checking that it’s working as it’s supposed to.</p><h3 id="h-tiered-confirmation-levels" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Tiered Confirmation Levels</h3><div data-type="embedly" src="https://assets.stackrlabs.xyz/clips/playground/1.mp4" data="{&quot;url&quot;:&quot;https://assets.stackrlabs.xyz/clips/playground/1.mp4&quot;,&quot;provider_url&quot;:&quot;https://assets.stackrlabs.xyz&quot;,&quot;provider_name&quot;:&quot;Stackrlabs&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;type&quot;:&quot;link&quot;}" format="small"></div><p>At the heart of micro-rollups is the concept of tiered confirmations. Through the lifecycle of an action, you have several different confirmation levels which the developers can utilise to build flexible experiences, optimised for their use-case.</p><p>The smooth animation on the Playground depicts the confirmation level of an action in real time</p><h3 id="h-state-rewind" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">State Rewind</h3><div data-type="embedly" src="https://assets.stackrlabs.xyz/clips/playground/2.mp4" data="{&quot;url&quot;:&quot;https://assets.stackrlabs.xyz/clips/playground/2.mp4&quot;,&quot;provider_url&quot;:&quot;https://assets.stackrlabs.xyz&quot;,&quot;provider_name&quot;:&quot;Stackrlabs&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;type&quot;:&quot;link&quot;}" format="small"></div><p>As micro-rollups have a state machine at its core, each action sent to the micro-rollup effects a state transition function which may produce a new state for the machine. It’s only logical that developers are able to inspect the state of the state machine, action-by-action.</p><h3 id="h-and-many-other-cool-features" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">And many other cool features…</h3><h2 id="h-fun-fact" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Fun fact!</h2><p>Playground is the first plugin in the Stackr ecosystem! More useful tools are expected to be added to Stackr’s Plugin suite in the future. 🤝</p><h2 id="h-how-to-set-it-up" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">How to set it up?</h2><p>Head over to the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.stf.xyz/build/plugins/playground">docs</a> for instructions on how to setup the Playground Plugin with your micro-rollup.</p><h2 id="h-conclusion" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Conclusion</h2><p>The Playground is only the beginning of making micro-rollup development as intuitive as possible. It provides a glimpse into the future of blockchain app development. With the Stackr SDK and the Playground, developers have robust tools to build innovative use-cases for single-app rollups and push the boundaries of the crypto ecosystem.</p><h3 id="h-the-future" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">The Future</h3><p>This is just step 1 into our vision of redesigning block explorers in a app-specific world. The Playground is just a developer tool and helps ease the micro-rollup development process. In world of multiple micro-rollups we would need a much bigger and a more versatile explorer that can not only display data per MRU but also provide ways to interact with it.</p><p>Stay tuned as we have big plans for that as well</p><hr><p>If you&apos;re interested in trying out the Playground, apply for beta access to the Stackr SDK through the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.stf.xyz/beta-access">sign-up form</a>!</p>]]></content:encoded>
            <author>stackrlabs@newsletter.paragraph.com (Stackr Labs)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/598cccf0713ed8c93d2f84e30c0d6d56c2d85323b7937521795ca7219d2dd57c.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Micro-Rollups for On-chain Attestations]]></title>
            <link>https://paragraph.com/@stackrlabs/micro-rollups-for-on-chain-attestations</link>
            <guid>bXGbM5KN7RYFv8rO9jTA</guid>
            <pubDate>Fri, 26 Apr 2024 17:52:17 GMT</pubDate>
            <description><![CDATA[Attestation. It&apos;s one of those loaded words with a generic meaning; almost everyone has some notion of what they think it means, and everyone has, at some point in their lives, used the concept without perhaps realising. So let’s try to define it. Attestations, in essence, are statements or claims made about some piece of information. They serve as evidence or confirmation provided by a trusted party, validating the truthfulness of a particular claim. The credibility of an attestation hi...]]></description>
            <content:encoded><![CDATA[<p>Attestation. It&apos;s one of those loaded words with a generic meaning; almost everyone has some notion of what they think it means, and everyone has, at some point in their lives, used the concept without perhaps realising.</p><p>So let’s try to define it. Attestations, in essence, are statements or claims made about some piece of information. They serve as evidence or confirmation provided by a trusted party, validating the truthfulness of a particular claim. The <strong>credibility</strong> of an attestation hinges on the reputation of the entity making it. In the world of Web3, attestations carry digital signatures ensuring authenticity and immutability.</p><p>Let&apos;s take a look at examples of attestations — in the real world as well as in crypto — that you may not have even realized are basically attestations in one of its many forms.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c0e8221069551bc2ba80eb8e562dbb99d63468a75698ab01a64837b671489b09.png" alt="Real world attestation use-cases" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Real world attestation use-cases</figcaption></figure><h2 id="h-attestations-in-web3-enter-ethereum-attestation-service" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>Attestations in Web3: Enter Ethereum Attestation Service</strong></h2><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://attest.org/">Ethereum Attestation Service (EAS)</a> is one of the leading projects enabling attestation use-cases in Web3. EAS is an open-source infrastructure public good for making attestations on-chain or off-chain. It works on a simple primitive — you simply register a schema (or use an existing one) about any topic and make attestations referencing that schema.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/302818176e80073f4408962cb313ccd90e458fea1154a3d3415060153895d4ad.png" alt="source:  https://docs.attest.org/docs/core--concepts/how-eas-works" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">source: https://docs.attest.org/docs/core--concepts/how-eas-works</figcaption></figure><h3 id="h-limitations" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Limitations</h3><p>While EAS provides a solid foundation for reasoning about and utilizing attestations in Web3, it is not without its limitations. Using EAS for on-chain attestations can be cost-prohibitive and requires writing EVM smart contracts for any custom logic. For off-chain attestations, the schema still needs to be on-chain, and developers often store these attestations in private databases, compromising user verifiability.</p><p>This situation underscores how micro-rollups built using the Stackr SDK can be used to supercharge the capabilities of EAS or attestations, in general.</p><h2 id="h-quick-primer-on-micro-rollups" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Quick Primer on Micro-Rollups</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7fd15a2991a0b25b6a4a15d3857ce0bdec17c8005e46428916fb9e1b7925835b.png" alt="Micro-Rollup e2e Workflow" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Micro-Rollup e2e Workflow</figcaption></figure><p>Micro-rollups are essentially state machines that executes certain logic off-chain and then outsource the verification of the execution to another layer, which we call “Vulcan” that verifies the state updates and pushes the compute data on-chain.</p><ul><li><p>The state machine has a defined shape of the state and is initialized with a genesis condition.</p></li><li><p>The state machine has actions(read: transaction types) which when invoked trigger a state transition function on the machine.</p></li><li><p>The State Transition Function(STF) in effect performs computation and mutates the state of the machine.</p></li></ul><p>After the STF execution, the actions are rolled together in a block &amp; shipped to Vulcan.</p><p>Finally, Vulcan —</p><ol><li><p>Pessimistically re-executes the actions in the block to check for validity of the STF</p></li><li><p>Generates metadata for the verified block</p></li><li><p>Settles on L1 &amp; DA.</p><ol><li><p>Micro-Rollup’s updated state is sent to the DA.</p></li><li><p>The metadata of the verified block &amp; the updated state root is settled to the micro-rollup’s inbox contract on L1.</p></li></ol></li></ol><p><strong>The above pipeline collectively forms Stackr’s Micro-Rollup Framework.</strong></p><h2 id="h-attestations-system-micro-rollup" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Attestations System 🤝 Micro-Rollup</h2><p><em>So, why are micro-rollups uniquely suited to build attestation systems?</em></p><ol><li><p><strong>Micro-rollups enable verifiable off-chain compute</strong></p><p>Micro-rollups are indistinguishable from backend services but adds a layer of verifiability to the state of the app and the compute.</p></li><li><p><strong>Micro-rollups make the state auditable</strong></p><p>Once the state machines are deployed, the STF logic cannot be mutated. This enables the users to have an assurance that the provider has not arbitrarily changed the rules of the system.</p></li><li><p><strong>Micro-rollups can compose with on-chain apps!</strong></p><p>Micro-rollups settle the state root of the app to the L1. This state root could be a Merkle Root and can be used by other apps to provably access the state of the rollup.</p></li></ol><h3 id="h-three-ways-in-which-micro-rollups-can-be-used-for-attestations" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>Three ways in which Micro-rollups can be used for Attestations</strong></h3><p><strong>1. Verifiable Storage for EAS off-chain attestations</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ec4e598ebb7c08d22d5c01aa55adda4d0c06f46a01e7f489860b8c7972c7dbe9.png" alt="Architecture of a micro-rollup to store EAS offchain attestations" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Architecture of a micro-rollup to store EAS offchain attestations</figcaption></figure><p>As highlighted above, an EAS off-chain attestation is just a JSON of attestation data plus a signature. This is not stored on-chain but in private databases or decentralized storage solutions.</p><p>In a fashion very similar to the “<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.attest.sh/docs/core--concepts/onchain-vs-offchain#verifiable-data-ledger---a-third-option">Verifiable Data Ledger by Ceramic Network</a>” recommended by EAS, a micro-rollup is an ideal solution to store these off-chain attestations. Essentially, a micro-rollup is a <em>verifiable data ledger</em> since:</p><ul><li><p>verifiable compute ensures correct state transitions.</p></li><li><p>the state is “rolled-up” into a hash (read: merkelized) which is posted on Ethereum L1 after each set epoch.</p></li><li><p>all data is made available to the underlying DA layer.</p></li></ul><p>Such a system would be a generalized micro-rollup designed to store attestations against any schema already registered on EAS without compromising ease-of-verifiability for the end user.</p><p><strong>2. Micro-rollup for schema-specific attestations</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/005ab28c583c51b5207f42b0284de0363f5e2ff7d011559568938ddc677df2ba.png" alt="Architecture of a micro-rollup for schema-specific attestations" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Architecture of a micro-rollup for schema-specific attestations</figcaption></figure><p>At its core, a micro-rollup is simply a state machine comprising of a state and state transition functions. When examining this framework through the lens of schema and attestations, parallels emerge. The state, akin to a schema, defines the data structure, while attestations, akin to state transitions, serve as verified updates that adhere to the schema. This comparison highlights the true potential of micro-rollups: individual micro-rollups can be built tailoring attestations to specific schemas, granting developers the flexibility to incorporate custom logic into transition functions, similar to <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.attest.org/docs/tutorials/resolver-contracts">Resolver contracts</a> in EAS. What makes such a construction even better is that the user making the attestation would incur no gas costs since the computation is done completely off-chain outside the EVM.</p><p>Our recent article on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/stackrlabs.eth/xSRyanslzZEW95mP1_N8Z5X5_eIaEXQBgwc42txZPDI"><strong>Micro Rollups for Points Systems</strong></a><strong>,</strong> which talked about points being employed as an incentivization mechanism by applications, is a direct example of such a system as points are essentially attestations bestowed by an application to its users.</p><p>Someone could also write a wrapper built on Stackr’s SDK to easily launch a new micro-rollup with custom schema and resolver logic while keeping the same API for cross micro-rollups interoperability.</p><p><strong>3. Micro-Rollup as an improvement to EAS</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/58cda9fcdfad3a7bbb2d11b9bb4bbcf046a3bd8445179ad956e2d483950f82c8.png" alt="Architecture of a micro-rollup as an alternative implementation of EAS" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Architecture of a micro-rollup as an alternative implementation of EAS</figcaption></figure><p>Since micro-rollups abstract away most complexities of building decentralized applications, a near feature-complete alternative to EAS can be implemented as a micro-rollup pretty quickly. This alternative can provide the same three core functions:</p><ul><li><p>A schema registry for storing all schemas.</p></li><li><p>The ability to create an attestation against a schema.</p></li><li><p>The option to revoke an existing attestation.</p></li></ul><p>In the following section, we&apos;ll delve deeper into how to build this.</p><h1 id="h-lets-build-eas-as-a-micro-rollup" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>Let’s build EAS as a Micro-Rollup</strong></h1><p><em>Disclaimer: This demonstration showcases the framework&apos;s capabilities and represents an incomplete build not intended for production use. Please regard the content as illustrative and not as a finalized product.</em></p><p>When developing a micro-rollup, it&apos;s crucial to conceptualize your logic in terms of a state machine. This involves carefully considering the state of the micro-rollup - that is, the data it will hold - and the actions that will dictate the behavior of the state transition function, which in turn operates on this state.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e42f011223d7df34d3155e2a8cf0043c6bd7f7ca9bea864a88de84d91fb1f8d6.png" alt="State Machine way of thinking about building apps" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">State Machine way of thinking about building apps</figcaption></figure><p>With the above in mind, we start by designing the state of the micro-rollup using Stackr’s SDK.</p><h3 id="h-the-design" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>The Design</strong></h3><ul><li><p>Schemas and attestations are stored off-chain inside a state machine</p></li><li><p>User sends actions which trigger a state transition function inside the state machine</p></li><li><p>User can send action to register a schema, make attestation referencing any of the stored schemas, or revoke an existing attestation</p></li><li><p>After each set epoch a block is generated which contains details of schemas and attestations state</p></li><li><p>The block is sent to Vulcan network for verification</p></li><li><p>If the block conforms the rules of the state machine it is approved</p></li><li><p>The block data is split between L1 and DA for settlement.</p></li></ul><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/01104fb5ec0f24661316282ece74fbaa67917a04fe8191c3723be21003a1866f.png" alt="Attestations system in a Micro-Rollup architecture" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Attestations system in a Micro-Rollup architecture</figcaption></figure><h3 id="h-defining-the-base-state" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Defining the base state</h3><p>Similar to EAS, we need to store a list of schemas and attestations. To illustrate this clearly and provide a stark comparison, we&apos;re using the same struct definitions used by EAS.</p><p><strong>1.As a starting point, let’s define</strong> <code>schemas</code> and <code>attestations</code> in our state.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/df1f0f1608258e6c8893080ddd1543268855f127d0969cbd0a6b300f22e22779.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Breaking this down,</p><ul><li><p><code>schemas</code>: stores a mapping of schema UID to <code>SchemaRecord</code> structs where <code>SchemaRecord</code> corresponds to an attestation schema submitted by a user.</p></li><li><p><code>attestations</code>: stores a mapping of attestation UID to <code>Attestation</code> structs where <code>Attestation</code> corresponds to an individual attestation made referencing a schema.</p></li></ul><h3 id="h-adding-handlers-for-state-update" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>Adding handlers for state update</strong></h3><p>After we setup our minimum viable state, we need to define <strong>state transition functions</strong> that update the state.</p><p><strong>2. Let’s define two functions,</strong> <code>registerSchema</code> which is responsible for creating a schema entry, and <code>attest</code> which is responsible for creating an attestation entry.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/18a779c4c35db2728bb10145c1fc6d67459046c1a15005005d72c5e3027aefec.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/299b1226b347f8fc67b5e7e2f1754275b364c9e7fe2f496a33c65e455d8742de.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Breaking down the <code>registerSchema</code> function,</p><ul><li><p>The user submits an action to register a new attestation schema, providing two fields: <code>schema</code> (the ABI) and <code>revocable</code> (whether the schema explicitly allows revocations).</p></li><li><p>The user who initiates the action is recorded as the schema registerer.</p></li><li><p>The state transition function calculates a unique identifier for this schema entry based on the provided values.</p></li><li><p>Finally, the new schema entry is added to the state.</p></li></ul><p>Breaking down the <code>attest</code> function,</p><ul><li><p>The user submits an action to create a new attestation, referencing the related <code>schemaUID</code> among other fields.</p></li><li><p>The user who initiates the action is recorded as the attester.</p></li><li><p>The state transition function calculates a unique identifier for this attestation entry based on the provided values.</p></li><li><p>The state transition function verifies the incoming attestation data against the related schema’s ABI (out of scope for this article).</p></li><li><p>Finally, the new attestation entry is added to the state.</p></li></ul><p><strong>We’ve reached the point where the minimum viable system works.</strong></p><h3 id="h-smart-contracts-vs-micro-rollup" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><strong>Smart Contracts vs Micro-rollup</strong></h3><p>To get all the attestations made to a schema or sent by one address, we would need to iterate over all the attestation entries and this has to be repeated each time we want to perform such lookups.</p><p>To mitigate this, EAS implements an Indexer.sol smart contract specifically to index the values in several <code>mapping</code> variables. However, this incurs extra gas costs as storage is extremely expensive inside the EVM compared to a micro-rollup.</p><p>But since we’re building a micro-rollup, we can be more liberal with the state and compute to prioritise user experience over cost.</p><h3 id="h-adding-index-fields-for-efficient-lookups" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Adding index fields for efficient lookups</h3><p><strong>3. Adding</strong> <code>schemaAttestations</code> <strong>to the state.</strong></p><p>It’ll be tasked to maintain a mapping between a schema and its attestations.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/080e7ef2126a76c29da91c2605850e1860cbbddfb5fef6d398a07704b3b5bbcb.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Accordingly, we update the <code>attest</code> function also to update the mapping for the schema when a new attestation is added.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8270bd646e0de62d58b348af05002eb1b7690a7d68dbfe06916da60ee3f0b618.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Voila!</p><p>And it’s that simple to build an attestations system akin to Ethereum Attestation Service with on-chain traceability! Surprisingly easy to give on-chain superpowers to a backend server, no?</p><h1 id="h-off-chain-attestations-brought-on-chain-real-world-use-cases-and-more" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>Off-chain Attestations brought on-chain → Real-world use-cases and more ✨</strong></h1><p>In the world of Web3, attestations are essential for enabling most real-world use cases. They bridge the gap between Web2 and real-life identity to Web3, preserving distributed trust.</p><p>The beauty of the above system is that it allows attestations to seamlessly be used on-chain without severe overhead.</p><p>As mentioned at the beginning, micro-rollup’s state root is settled on L1. It is interesting to note that the developer can chose what part of the state settles on L1 vs what part can go on DA as metadata, thereby, unlocking hybrid security assumptions.</p><p>In this case, if we extract the <code>attestations</code> and settle it’s <strong>merklized root</strong> on L1, we open up the possibility of direct inclusion proofs of attestations in the merkle tree.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/0d96336bba88c9dc26b4958e1148a455e25b8384a8264dc01f7ddbcb636d21f3.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>This property unlocks on-chain verification of identity, proof of ownership, and access to various services and benefits. For instance, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://blockworks.co/news/jpmorgan-trade-on-public-blockchain-monumental-step-for-defi">JP Morgan recently used Verifiable Credential</a>, a form of attestation, to execute its first DeFi transaction on a public blockchain. When attestation data is brought on-chain with inclusion proofs, the potential for on-chain real-world use-cases explode.</p><p><strong>This approach brings attestations on-chain without the attestations having to be strictly on-chain! (And for significantly cheaper with superior user experience)</strong></p><h2 id="h-conclusion" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>Conclusion</strong></h2><p>Though attestations may seem like a new primitive in Web3, they have always been a part of what we perceive as <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://stark.mirror.xyz/rkLEVz9p4r3ouusD-WCkWP_iVZYkZ0K7TFkzeRfiXCU">Trust Experience</a>. They are crucial in bringing real-world identities and assets on-chain, which contributes directly to the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://vitalik.eth.limo/general/2021/03/23/legitimacy.html">legitimacy</a> of blockchains. Essentially, attestations are just another tool for <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://ethereum.foundation/infinitegarden">human coordination</a>. With this mental model in place, only one question remains: how do we coordinate at webscale?</p><p>Micro-rollups, with their verifiable and fast off-chain compute, auditable state, and ability to compose with on-chain apps, provide an ideal framework for building robust attestation systems and, in turn, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://coordinationmechanisms.gitcoin.co/">coordination mechanisms</a>.</p><p>We are only just getting started bridging the gap between Web2 and Web3.</p><hr><h2 id="h-interested-in-building-your-own-attestations-infra" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><strong>Interested in building your own Attestations Infra?</strong></h2><p>We will soon be sharing a more “complete” version of the above mentioned experiment. Until then, if you’re someone who’s looking to build an Attestations System for your protocol or building tooling for attestations, we’d love to talk to you and find ways to collaborate.</p><p><strong>Contact us on </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.com/invite/PY4nhg7bcc"><strong>Discord</strong></a><strong> (preferable), </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://twitter.com/0xStackr"><strong>Twitter</strong></a><strong> or shoot an email at gm[at]stackrlabs.xyz</strong></p>]]></content:encoded>
            <author>stackrlabs@newsletter.paragraph.com (Stackr Labs)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/c91cd9688fc3703aa2452adbcf71c85bc29b51aa381552e015813713dd51abf0.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[GM! Join the Beta Testnet 🫡]]></title>
            <link>https://paragraph.com/@stackrlabs/gm-join-the-beta-testnet</link>
            <guid>wKDIFp7zDRENIGQD0ZXv</guid>
            <pubDate>Mon, 08 Apr 2024 16:50:58 GMT</pubDate>
            <description><![CDATA[We are excited to announce the launch of the Private Beta for Stackr&apos;s SDK! This is a significant milestone in our development as for the first time we open up the SDK to people all around the globe. We can’t wait to see what the community ends up building with micro-rollups. This Private Beta is a significant step towards achieving our vision of making blockchain app development simpler by providing the necessary tools and introducing the paradigm of building your apps as rollups, or “s...]]></description>
            <content:encoded><![CDATA[<p>We are excited to announce the launch of the Private Beta for Stackr&apos;s SDK! This is a significant milestone in our development as for the first time we open up the SDK to people all around the globe. We can’t wait to see what the community ends up building with micro-rollups.</p><p>This Private Beta is a significant step towards achieving our vision of making blockchain app development simpler by providing the necessary tools and introducing the paradigm of building your apps as rollups, or “single-app rollups” in other words. During this phase, we will be giving access to a select group of developers, allowing them to explore the world of micro-rollups and test the limits of the Stackr SDK.</p><p><strong>We aim to gather feedback, encourage users to identify issues, and suggest improvements to refine and enhance the platform.</strong></p><p>At the end of this post, we’ve added instructions on how you can apply for access to the Stackr SDK. For now, let’s dive into what you can build with micro-rollups!</p><h1 id="h-building-with-the-stackr-sdk" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Building with the Stackr SDK ⚒️</h1><p><em>Disclaimer: The SDK currently is highly experimental and we do not recommend it for production use as of this phase of Private Beta.</em></p><p>The SDK lets developers easily build <strong>micro-rollups</strong> using TypeScript. Micro-Rollups are self-hosted off-chain services that maintain their state, accept actions to generate a new state based on incoming requests, and transmit blocks to Stackr’s Verification Layer for checking correctness and eventually settlement and data availability on parent chain. <em>This aligns with what you would want out of a crypto-powered backend framework.</em></p><h1 id="h-what-to-build-on-micro-rollups" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">What to build on micro-rollups?</h1><p>Anything that could be built with smart-contracts could be built better with a combination of smart contracts and micro-rollups. The idea that micro-rollups enable <strong>verifiable off-chain compute</strong> unlocks a multitude of use-cases that were not possible or were too unoptimized to be done fully on-chain.</p><p>The team has curated and categorised a list of ideas and verticals where we think interesting use-cases of micro-rollups are waiting to be discovered and built!</p><p>Peruse the list and reach out to us if you’re exploring a similar use-case.</p><ol><li><p>On-chain apps</p><ol><li><p>Payments</p><ol><li><p>Transfers</p></li><li><p>Streaming</p></li><li><p>Micro-payments (smol money)</p></li></ol></li><li><p>Frames</p><ul><li><p>Games</p></li><li><p>P2P Swaps</p></li><li><p>Verifiable Polls</p></li><li><p>Token Distribution</p></li><li><p>Prediction Market</p></li></ul></li><li><p>Games</p><ol><li><p>Simulation Engines</p></li><li><p>Autonomous worlds</p></li><li><p>In-game assets</p></li></ol></li><li><p>DeFi protocols</p><ol><li><p>Lending/Borrowing</p></li><li><p>DEX / Orderbooks</p></li><li><p>LST</p></li><li><p>Airdrops</p></li><li><p>Prediction Markets</p></li></ol></li><li><p>NFT protocols</p></li><li><p>DAOs and Governance</p></li></ol></li><li><p>On-chain Infrastructure</p><ol><li><p>Identity</p></li><li><p>Programmable VMs</p></li><li><p>AVS frameworks</p></li><li><p>Oracles</p></li><li><p>Shared Sequencers</p></li><li><p>Account Abstraction and Intents</p><ul><li><p>Solver Marketplace</p></li><li><p>Decentralised Bundler</p></li><li><p>Unified Mem-pool</p></li></ul></li><li><p>Attestations</p><ul><li><p>Reputation Systems</p></li><li><p>Points Systems</p></li><li><p>Engagement score on social graphs.</p></li><li><p>Credit score for DeFi</p></li></ul></li><li><p>Two sided Marketplaces</p></li><li><p>Social graphs</p></li><li><p>Reputation Engine</p></li><li><p>Social Media Protocols</p></li><li><p>On-chain Agents</p></li><li><p>AI/ML use-cases</p></li></ol></li><li><p>DePIN</p><ol><li><p>dRPC</p></li><li><p>Storage</p></li><li><p>Compute</p></li><li><p>IoT</p></li><li><p>Indexers</p></li></ol></li></ol><p>The only limit is your imagination 💭</p><h1 id="h-how-to-get-access" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">How to get access?</h1><p>Developers can apply for access to the SDK through the link below</p><p>👉🏻 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.stf.xyz/beta-access">Beta Access Form</a></p><p>The team will periodically review all requests and approve access for the selected few developers. The approved developers will have to mint the <strong>Beta Access Pass</strong> on Sepolia to be able to create a micro-rollup.</p><p>In the meantime, we recommend developers to go through the docs and understand the system.</p><h2 id="h-conclusion" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Conclusion</h2><p>We’re thrilled to be kicking-off the Private Beta! The team has worked incredibly hard, seven days a week, to bring this to life and get the SDK in to the hands of the developers. The Stackr Stack is a work in progress and we’re continuously making improvements and thinking through the next steps of what’s required to make it the best tooling in the ecosystem to build applications.</p><p><strong>For any queries, join the community on </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.com/invite/PY4nhg7bcc"><strong>Discord</strong></a><strong>, </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://t.me/+_CNUrK3stmVlMjU1"><strong>Telegram</strong></a><strong> or </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0xStackr"><strong>Twitter</strong></a><strong> or shoot an email at gm[at]stackrlabs.xyz</strong></p>]]></content:encoded>
            <author>stackrlabs@newsletter.paragraph.com (Stackr Labs)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/622e15bda1a290c1babd98418aa043ee11f385a52c3e639afc7c4137c02b1aed.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Micro-Rollups for Points Systems]]></title>
            <link>https://paragraph.com/@stackrlabs/micro-rollups-for-points-systems</link>
            <guid>v7FAcOgQmYxAK5uKubHH</guid>
            <pubDate>Thu, 14 Mar 2024 20:43:41 GMT</pubDate>
            <description><![CDATA[Points have recently emerged as the catalyst of engagement in the crypto ecosystem, spearheading numerous successful initiatives by leading teams and protocols. Their concept is straightforward: engaging with the protocol in a manner that fosters its growth, results in the protocol rewarding users with points. This mechanism closely mirrors the XP system found in numerous video games, where accumulating points elevates a user&apos;s position on a leaderboard, incentivizing them to climb to th...]]></description>
            <content:encoded><![CDATA[<p>Points have recently emerged as the catalyst of engagement in the crypto ecosystem, spearheading numerous successful initiatives by leading teams and protocols. Their concept is straightforward: engaging with the protocol in a manner that fosters its growth, results in the protocol rewarding users with points. This mechanism closely mirrors the XP system found in numerous video games, where accumulating points elevates a user&apos;s position on a leaderboard, incentivizing them to climb to the top.</p><p>Many protocols employ points as an initial step before introducing the protocol&apos;s governance token, indicating that the distribution of tokens will be based on the number of points a user accumulates. This strategy allows protocols and teams to gain valuable time before they need to unveil the specifics of their token, also delaying the inevitable scrutiny in case they mess up. <strong>Accumulating points functions similarly to yield farming</strong> but without the direct financial incentive, offering a more generalized approach to user engagement and reward.</p><p>It has now become the latest meta to incentivise users &amp; grow the protocol. And the fun part is, points are theoretically infinite supply, adding a twist to the conventional airdrop mechanism and differentiating it with actual tokens.</p><h1 id="h-problems-with-points" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Problems with Points</h1><p>PMF should not stand for Points Market Fit. If a product isn&apos;t getting used without points, it&apos;s <em>pointless</em> to slap a point system on top of it and call it PMF. Points should not serve as the decisive factor for choosing product X over Y; rather, both products X and Y should offer inherent value to the user.</p><p>The next biggest problem is the fact that most point systems are black boxes, and specifically black boxes with unpredictable computation properties over time. This opacity has its advantages and disadvantages - it grants teams greater flexibility to adjust the system&apos;s rules, yet it simultaneously strips users of any sense of control or influence.</p><p>The rules of the game to accrue XP (read: points) should be clear and predictable!</p><p>What if points were auditable, transparent, and predictable — while still being flexible for teams to design campaigns around?</p><h1 id="h-on-chain-points" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">On-Chain Points</h1><p>The idea of implementing points on-chain presents an intriguing concept, yet it should not merely serve as a facade for another ERC-20 token. There have been instances where protocols introduced a pre-release token, promising its eventual conversion into a different token (basically points in disguise) but littering the ecosystem with redundant tokens.</p><p>Envisioning on-chain points as distinct from ERC-20 tokens opens up the possibility for unique experiences through the composability of different point systems. However, the reality that both Layer-1 and Layer-2 solutions are cost-prohibitive for implementing an on-chain points tracking system raises a critical question: why not simply use an ERC-20 token to represent points?</p><p>This situation underscores why an on-chain points system is an ideal candidate for development as a micro-rollup on Stackr.</p><hr><p>Looking at the problems with the current infra used to run point systems, the team pulled a night long internal research sprint and what has emerged is a specialised VM to track &amp; manage points for your protocol.</p><h3 id="h-quick-primer-on-micro-rollups" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Quick Primer on Micro-Rollups</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/864d6000b39a14b26730ac2a59a219ecccae3c18a8c1d94cf584136dbf71c43a.png" alt="Micro-Rollup e2e Workflow" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Micro-Rollup e2e Workflow</figcaption></figure><p>Micro-rollups are essentially state machines that executes certain logic off-chain and then outsource the verification of the execution to another layer, which we call “Vulcan” that verifies the state updates and pushes the compute data on-chain.</p><ul><li><p>The state machine has a defined shape of the state and is initialized with a genesis condition.</p></li><li><p>The state machine has actions(read: transaction types) which when invoked trigger a state transition function on the machine.</p></li><li><p>The State Transition Function(STF) in effect performs computation and mutates the state of the machine.</p></li></ul><p>After the STF execution, the actions are rolled together in a block &amp; shipped to Vulcan.</p><p>Finally, Vulcan —</p><ol><li><p>Pessimistically re-executes the actions in the block to check for validity of the STF</p></li><li><p>Generates metadata for the verified block</p></li><li><p>Settles on L1 &amp; DA.</p><ol><li><p>Micro-Rollup’s updated state is sent to the DA.</p></li><li><p>The metadata of the verified block &amp; the updated state root is settled to the micro-rollup’s inbox contract on L1.</p></li></ol></li></ol><p><strong>The above pipeline collectively forms Stackr’s Micro-Rollup Framework.</strong></p><h1 id="h-points-system-micro-rollup" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Points System 🤝 Micro-Rollup</h1><p><em>So, why are micro-rollups uniquely suited to build point systems?</em></p><ol><li><p><strong>Micro-rollups are fast, flexible, self-hosted execution environments</strong></p><p>This ensures that the delivery of points does not incur “on-chain” overhead and all the state updates happen as fast as possible.</p></li><li><p><strong>Micro-rollups enable verifiable off-chain compute</strong></p><p>Despite being self hosted, the framework ensures that any data that enters the system and mutates the state can be fully verified before the data settles on L1. This ensures that the system is running predictably and not being tampered with.</p></li><li><p><strong>Micro-rollups make the state auditable</strong></p><p>Once the state machines are deployed, the STF logic cannot be mutated. This enables the users to have an assurance that the provider has not arbitrarily changed the rules of the system.</p></li><li><p><strong>Micro-rollups can directly settle on L1</strong></p><p>Since micro-rollups can settle directly on an L1, the state proofs can be consumed directly inside contracts to take on-chain actions. The verifier layer ensures that the settlement period is greatly reduced by providing pre-settlement guarantees.</p></li></ol><h1 id="h-lets-build-the-points-system" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Lets build the Points System</h1><p><em>Disclaimer: This demonstration showcases the framework&apos;s capabilities and represents a highly unoptimized build not intended for production use. Please regard the content as illustrative and not as a finalized product.</em></p><p>When developing a micro-rollup, it&apos;s crucial to conceptualize your logic in terms of a state machine. This involves carefully considering the state of the micro-rollup - that is, the data it will hold - and the actions that will dictate the behavior of the state transition function, which in turn operates on this state.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/5ea972952f1ad61c3cf54f3b5f10250dad437cd16802f7a029afe0a5142d6661.png" alt="State Machine way of thinking about building apps" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">State Machine way of thinking about building apps</figcaption></figure><p>With the above in mind, we start by designing the state of the micro-rollup using Stackr’s SDK</p><h3 id="h-the-design" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">The Design</h3><ul><li><p>Events are triggered when a user performs an off-chain or on-chain action on a platform. Events can also be assigned to a user by the admin</p></li><li><p>Points are stored off-chain inside a state machine</p></li><li><p>The system holds a state transition function that determines when and how much points are granted to the user</p></li><li><p>Events trigger the state transition functions and the state is updated with the user’s new points</p></li><li><p>After every set epoch a block is generated which contains details of user events and updated points table state</p></li><li><p>The block is sent to Vulcan network for verification</p></li><li><p>If the block conforms the rules of the state machine it is approved</p></li><li><p>The block data is split between L1 and DA for settlement</p></li></ul><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/1743807e9e4dbc3090a6975ff29fe8d138fad07d771abe41b591d7b134161378.png" alt="Points System in a Micro-rollup Architecture" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Points System in a Micro-rollup Architecture</figcaption></figure><h3 id="h-defining-the-base-state" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Defining the base state</h3><p><strong>1. As a starting point, we add</strong> <code>admins</code> <strong>and an</strong> <code>eventRegistry</code></p><ul><li><p><strong>admins :</strong> Addresses which can register an event entity and also assign points for users</p></li><li><p><strong>event :</strong> Any kind of entity that the user can receive points for. It could be an on-chain event or a custom manually added entity. eg : “sign-up” (custom) can give them 200 points, “swap” (on-chain) can give them 500 points and so on.</p></li></ul><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/401a62e2da60e65600bb33aa8b0040a1bd5d8ed13f22885c10e83e81faac4988.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><strong>2. Next up, we need a way to track the events of the users which they are eligible for points.</strong></p><p>So a user may have 1 sign-up and 5 swaps. Each event is an entry in the <code>eventLog</code></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/307f2d6087fca3ae811c1082547d3fe0679b555ec12e1eafc05c07f3a07ae410.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>We added an <code>eventLog</code> to the state to keep track of all the on-chain events that have been tracked for a user and the max points corresponding to them for each. We at the moment do not need the points subfield as it can be fetched from the <code>eventRegistry</code>, but we add it nonetheless to keep the system flexible for further development.</p><h3 id="h-adding-a-handler-for-state-update" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Adding a handler for state update</h3><p>After we setup our minimum viable state, we need to define <strong>reducers</strong> that update the state.</p><p><strong>3. Let’s add a</strong> <code>logEventReducer</code> <strong>which is responsible for creating a log entry for an event for a user</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/bd497321fb5dd5af24bf6c4280b76d6b008815a0ea2e76277b1cc3a168e15ce1.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Breaking down the above</p><ul><li><p>Admin calls a <code>logEvent</code> action (out of scope for this article) with the name of the event and identifier of the user.</p></li><li><p>The action hits the stateMachine and triggers <code>logEventReducer</code></p></li><li><p>The reducer then →</p><ul><li><p>Finds the points corresponding to the event.</p></li><li><p>Updates the event log for the user with the event and the corresponding points.</p></li></ul></li></ul><p>For example —</p><ul><li><p>Admin calls <code>logEvent({user: mg-labs.eth, event: &quot;deposit&quot;})</code></p></li><li><p>The reducer would then find the <code>deposit</code> action in the <code>eventRegistry</code> and log the event for <code>mg-labs.eth</code> along with the points corresponding to the <code>deposit</code> event.</p></li></ul><p>We’ve reached the point where the minimum viable system works.</p><h3 id="h-smart-contracts-vs-micro-rollup" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Smart Contracts vs Micro-rollup</h3><p>To calculate the total points of a user, we would need to iterate over the event logs for the user and this has to be repeated each time we want to fetch the total points of the user.</p><p>Now, that could be a viable approach if you were building a points system as a smart contract because storage is extremely expensive inside the EVM compared to a micro-rollup.</p><p>But since we’re building a micro-rollup, we can be more liberal with the state and compute to prioritise user experience over cost.</p><h3 id="h-storing-the-computed-points" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Storing the computed points</h3><p><strong>4. Adding</strong> <code>userPoints</code> <strong>to the state.</strong></p><p>It’ll be tasked to keep the sum of the points allocated to a user.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/82fdeb5a2eada1266785d6a395d7dd9432b9303f89afc6036f5d101681422915.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>We update the <code>logEventReducer</code> to also update the points for the user when an event is logged.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/69f4cd313b9865464ea1053195286b408cd68a960f6c707aa591b29f3dc393c8.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-done" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Done!</h3><p>And it’s that simple to build an event-driven point system with on-chain traceability! Surprisingly easy to give on-chain superpowers to a backend server no?</p><h1 id="h-off-chain-points-brought-on-chain-airdrops-and-more" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Off-chain Points brought on-chain → Airdrops and more ✨</h1><p>The beauty of this system is that it allows points to seamlessly be used on-chain without severe overhead.</p><p>As mentioned at the beginning, micro-rollup’s state root is settled on L1, It is interesting to note that the developer can chose what part of the state settles on L1 vs what part can go on DA as metadata, thereby, unlocking hybrid security assumptions.</p><p>In this case, if we extract the <code>userPoints</code> and settle it’s <strong>merklized root</strong> on L1, we open up the possibility of direct inclusion proofs of users in the merkle tree.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e6fb98311455455aaa924b25ef616608371d2dc4540cc7d5889475cc5f8c9c1a.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>This property would let us seamlessly build on-chain experiences for trust-less token redemptions, rewards against points, on-chain secondary market for points, etc. By getting user points data on-chain with inclusion proofs the possibility of on-chain experiences explode</p><p><strong>This approach brings points on-chain without the points having to be strictly on-chain! (And for significantly cheaper with superior user experience)</strong></p><h2 id="h-musings" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Musings</h2><p>The Point System we’ve built so far in this post is just the tip of the iceberg and can be significantly expanded to build a wealth of features. Some of them could be as follows:</p><h3 id="h-multipliers" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Multipliers</h3><p>Teams love to play with time-bound multipliers on the baseline points for certain events or campaigns as it’s a beautiful mechanism to collaborate with other projects, increase activity in the community and the protocol, etc.</p><p>With this version of the Points System, it’s trivial to iterate and implement multipliers as we were already storing the points that are to be allocated for the event at that specific time.</p><p>First, we update the <code>EventRegistry</code> to hold a list of multipliers for each event.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6c799356ba91d5fbf9690b0f3fb53eea939ab8c208f2c2c034890f63a4905e3f.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>As you’ll notice above, it’s a list of multipliers per event which can be activated and deactivated by the team to achieve interesting campaign design.</p><p>To take the above state update into account, we update <code>logEventReducer</code> to apply active multipliers.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/2c2ad3dad115339f01ba5eca2a1a81c685cac10a0a84f076545a3905a9846ea6.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>The above logic not only applies a multiplier but also stacks multiple multipliers for the event when calculating the amount of points to allocate.</p><h3 id="h-referrals" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Referrals</h3><p>Similar to multipliers, referrals are key to several point systems. Referral systems are hard to build completely on-chain as they can get quite complex in their structure.</p><p>For example, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.marginfi.com/">MarginFi</a> has a multi-level referral system —</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/4ea220844dfc64bbcc217cc10b6b5f36dfe00f8076fc7749c45af32750624ab6.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Building points system as micro-rollup gives you the freedom to implement the above mechanisms, as complicated as they maybe, in your own <strong>sovereign execution environment.</strong></p><h3 id="h-points-automation" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Points Automation</h3><p>The system discussed above allows for a lot of flexibility, but also requires additional infra as overhead on the admin (or bots) to update the user points.</p><p>One could increase the autonomy of the system by piping in all the user events from selected contracts to the micro-rollup through the <code>L1Syncer</code> (Inbuilt module inside the SDK) and the state transition function of the rollup being purely the algorithm to compute the points for the users with transparency on how the points are calculated.</p><h3 id="h-points-as-reputation" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Points as Reputation</h3><p>Points can easily be thought of as XP or reputation points in a social economy.</p><p>They serve as a form of recognition for contributing value to a protocol or product. The potential for creating on-chain experiences using the Points System as a reputation tracker in a social economy is vast and filled with exciting possibilities for engagement and innovation.</p><p><strong>For example, Reddit’s Karma Points built on a micro-rollup could instantly make the “useless internet points,” as they like to call it, useable on-chain.</strong></p><p>Using this framework, it is probably a few days of work to port over the existing karma point system to bring it on-chain.</p><h2 id="h-conclusion" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Conclusion</h2><p>The Points System represents a compelling use case situated at the crossroads of Web2 and Web3, warranting a novel hybrid architecture. This is precisely the opportunity provided by micro-rollups.</p><p>Micro-rollups offer the flexibility to choose your position on the decentralization spectrum. They empower builders to construct applications according to their preferences, whether that entails full decentralization, sufficient decentralization, or a secret third thing yet to be unlocked.</p><hr><h2 id="h-interested-in-building-your-own-points-infra" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Interested in building your own Points Infra?</h2><p>We will soon be sharing a more “complete” version of the above mentioned experiment. Until then, if you’re someone who’s looking to build a Points System for your protocol or building tooling for points, we’d love to talk to you and find ways to collaborate.</p><p><strong>Contact us on </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.com/invite/PY4nhg7bcc"><strong>Discord</strong></a><strong> (preferable), </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://twitter.com/0xStackr"><strong>Twitter</strong></a><strong> or shoot an email at gm[at]stackrlabs.xyz</strong></p>]]></content:encoded>
            <author>stackrlabs@newsletter.paragraph.com (Stackr Labs)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/f859beca7b59c267ece06a47a7ad75c8271f5927bc74b637fd3e530fd5b8ed4e.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[What everyone* gets wrong about building blockchain apps]]></title>
            <link>https://paragraph.com/@stackrlabs/what-everyone-gets-wrong-about-building-blockchain-apps</link>
            <guid>xJCFK4Ucr2t0h1gl9pZi</guid>
            <pubDate>Mon, 12 Feb 2024 17:33:10 GMT</pubDate>
            <description><![CDATA[The early years of blockchains have been marked by an emotional fixation on the revolutionary potential of web3 and the inherent benefits of decentralization. This emphasis has been crucial to drive innovation and rally early adopters. However, an overemphasis on these ideals without considering the practical limitations can lead to the formation of erroneous mental models about how and why this technology should be adopted. As more and more mainstream users come in, these mental models can b...]]></description>
            <content:encoded><![CDATA[<p>The early years of blockchains have been marked by an emotional fixation on the revolutionary potential of web3 and the inherent benefits of decentralization. This emphasis has been crucial to drive innovation and rally early adopters.</p><p>However, an overemphasis on these ideals without considering the practical limitations can lead to the formation of erroneous mental models about how and why this technology should be adopted. As more and more mainstream users come in, these mental models can be hard to dislodge.</p><p>One such mental model is the belief that all centralized apps should be completely decentralized and migrated to blockchains in their entirety.</p><p><em>Decentralize everything as fast as you can!</em> Or in simpler words - “Onchain good, offchain bad”</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6bb9762d2d7cae58a32562c5e22f4920ead95cfe9c39ca6fb5987e4332c465f0.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-decentralization-is-not-an-on-off-switch" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Decentralization is not an On-Off Switch</h2><p>Crypto holds dear the values of decentralisation but it’s often overlooked that decentralisation is a spectrum and not an on-off switch.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/49edeaff2e573f500f80b2db62fb33eb564c170c466a83700843b17b594a7b49.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Truth be told, not all applications need to fall on the decentralised end of the spectrum.</p><p>And in reality, a lot of well-adopted use-cases in crypto currently also function on the back of heavily centralised architectures.</p><ul><li><p>The current narrative of loyalty programs(read: points) are mostly done with off-chain and opaque infra.</p></li><li><p>Perpetual DEXes like Aevo often have their orderbook and matching engine running entirely off-chain.</p></li><li><p>Several niche DeFi protocols end up relying on centralised single-signer oracles for price feeds.</p></li><li><p>And how can you forget the state of the Layer-2s where everybody is in the process of decentralising 😛</p></li></ul><p>But the lesson is, centralisation vectors are fine if that is the trade-off you need to take for the experience of your app. As mentioned, decentralisation is a spectrum and as long as you’re able to provide your users with certain <strong>security guarantees that are appropriate for your app</strong>, it is more than enough.</p><p>Determining your app&apos;s level of decentralization involves carefully weighing the importance of security against the desired user experience.</p><p>For example - A DeFi app that holds users’ funds should be as bullet-proof as possible whereas a game that’s augmented with crypto features most probably doesn’t need extremely secure decentralisation guarantees.</p><p>Similarly, A social media app, doesn&apos;t really need to put frequent and low-value actions such as likes and votes onchain since these actions don&apos;t require as much security Instead, they can just put the essential components (say registration, account recovery, etc. for social media apps) onchain while keeping the other components centralized.</p><p>Blockchain apps provide transparency, security, censorship-resistance, and immutability. Centralized apps provide speed, efficiency, and scalability but aren’t as secure. Apps that blend both onchain and offchain components can thus be referred to as <strong>“hybrid apps”</strong> which provides the best of both worlds.</p><p>*<em>Obviously, not everyone gets this wrong, so excuse the clickbait title. But that is often the dominating way of thinking about blockchain apps and it’s a mental model that we try to break with this blog post. Vitalik also brought up hybrid apps in his </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://vitalik.eth.limo/general/2023/10/31/l2types.html"><em>recent article</em></a><em>, calling them “halfway-house” level decentralized apps and even other chad builders in the space are talking about it</em></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/10eb65e995c55cb0cac9a493122a84e1cfcb367e323dabd4b8347cd67487c0a7.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>All of the above leads us to the fact that for a plethora of use-cases, halfway-house security is sufficient while prioritising for the user experience.</p><h2 id="h-oh-baby-why-dont-you-just-meet-me-in-the-middle" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0"><em>Oh Baby, Why dont you just meet me in the middle?</em></h2><p>Enabling developers to progressively decentralize their apps allows for some fantastic web3 usecases that so far have been thought of as too difficult to build onchain.</p><p>Of course, there can be variations of which part stays onchain based on what each app tries to achieve. “Halfway-house” apps don’t have to be exactly halfway decentralized. They can instead reside anywhere on a spectrum of decentralization based on the desired characteristics (for instance, apps looking for a high level of security can put more components onchain).</p><h3 id="h-drum-roll-halfway-house-security-with-verifiable-compute" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0"><em>(drum roll)</em> Halfway-house security with verifiable compute</h3><p>Verifiable Compute refers to being able to provably demonstrate that a piece of computation has happened exactly how it was supposed to without any interference or tampering.</p><p>Verifiable compute coupled with suitable security guarantees around the trust assumptions of the infrastructure enabling it, is the most ideal outcome that apps should desire rather than decentralisation-maxxing.</p><p>Thinking through apps in terms of halfway-house security enables the developers to build apps that can power smooth Web2-like user experience while borrowing the best of crypto and the security guarantees if affords.</p><h2 id="h-show-dont-tell" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Show, don’t tell</h2><h3 id="h-social-sufficiently-decentralised-media" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Social “Sufficiently Decentralised” Media</h3><p>Looking at Farcaster, it’s a social protocol that took the stance of being <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.varunsrinivasan.com/2022/01/11/sufficient-decentralization-for-social-networks">sufficiently decentralised</a>.</p><p>For a social protocol, sufficient decentralisation is achieved “if two users can find each other and communicate, even if the rest of the network wants to prevent it.”</p><p>Farcaster achieves “sufficient decentralisation” with a clever mix of on-chain &amp; off-chain infrastructure.</p><ul><li><p>On-Chain: ID registry &amp; critical actions are provably processed and stored on Optimism.</p></li><li><p>Off-Chain: Actions like posting a public message, or liking a message are processed and stored on a P2P Network — Hubs.</p></li></ul><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/a5da421f3e20a82bf66a15d56302727b2e91247246c8d5edd6c8e7d35a2935b8.png" alt="Farcaster Architecture (https://docs.farcaster.xyz/learn/architecture/overview)" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Farcaster Architecture (https://docs.farcaster.xyz/learn/architecture/overview)</figcaption></figure><p>Farcaster is a prime example of leveraging the on-chain infrastructure for what it’s good at — solid security guarantees. And at the same time, not requiring the users to sign a transaction every single time they want to post “gm” on their feed — good UX.</p><p>On top of all that, with the registry being on-chain and Hubs making the data available: developers can build their own clients on top of Farcaster, effectively reaching sufficient decentralisation. If one client decides to censor you, move to another.</p><p>These are the kind of trade-offs between security and the envisioned user experience that are highlighted throughout the article.</p><h3 id="h-micro-payments" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Micro-Payments</h3><p>Well if it isn’t the most commonly touted yet not fully realised vision of crypto.</p><p>And the vision won’t be fully realised until the UX of micro-payments with crypto isn’t as smooth as Apple Pay. Which is quite possible to build when you think about designing a micro-payments app with halfway-house security.</p><p>And to think of it, we’ve had experiments along the similar lines. For example, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://lightning.network/">Lightning Network</a> on top of Bitcoin is a protocol with halfway-house security which tried to offer a better experience for small BTC transfers between the users.</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://celo.org">Celo</a> is another case to look at where they’re transitioning from being an <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://forum.celo.org/t/clabs-proposal-for-celo-to-transition-to-an-ethereum-l2/6109/1">independent L1 to a validium on Ethereum</a> with the renewed vision of being THE chain for micro-payments.</p><p>(Bonus: Soon, dropping an article on how Celo could be built as a set of micro-rollups using Stackr.)</p><h3 id="h-two-sided-marketplaces-matching-engines" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Two-sided Marketplaces (Matching Engines)</h3><p>The value of verifiable compute can be applied to any use-case that requires a matching engine to make the market between the supply and demand, and do so efficiently.</p><p>Think Uber but they leave an on-chain paper trail that proves your “intent” to go from A to B with your constraints has been matched as efficiently as possible with a driver.</p><p>And for a crypto-native use-case, think orderbooks.</p><p>In current Perp DEXes, the matching engine that connects buyers and sellers on the orderbook operates off-chain. While the DEX is motivated to make the market efficient, there is limited visibility on whether your orders are being effectively matched or not.</p><p>Imagine a rollup that is highly optimised for the matching engine. It reads the state from the orderbook and provably makes the market efficient right in the state transition function of the rollup. 🤯</p><h3 id="h-games" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Games</h3><p>Building games while leveraging the decentralised stack can look very similar to how Farcaster leverages the decentralised ledger, halfway-house security.</p><p>Games usually need to be high throughput and that’s often a constraint when building on-chain both in terms of cost and user experience.</p><p>But, when thinking in a combination of on-chain &amp; off-chain architecture, the design space opens up and that is also the trend we’re slowly seeing gaining steam where the games are just normal games with a few crypto-native features.</p><p>And in addition to that —</p><ul><li><p>Simulation/Strategy based games can leverage verifiable compute to build a trust-minimised simulation engine.</p></li><li><p>PvP games can leverage the blockchain rails to add native “financialisation” with wagers.</p></li><li><p>Games can leverage the decentralised ledger to store a paper-trail of in-game assets.</p></li></ul><h3 id="h-and-many-other-use-cases" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">And many other use-cases…</h3><h2 id="h-the-road-to-building-hybrid-apps-and-more" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">The road to building hybrid apps &amp; more ➡️</h2><p>We strongly believe building apps with halfway-house security in mind can lead to both — a more robust crypto-native ecosystem &amp; use-cases that lead to mass adoption.</p><p>At Stackr, we’re building the toolkit and the necessary infrastructure to build <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://kautuk.substack.com/p/micro-rollup-a-wave-or-just-a-shameless">app-specific micro-rollups</a> to supercharge and unlock the DevEx around building apps with halfway-house apps and much more with the languages you already know.</p><p><strong>It’s not just a new tool, it’s a new paradigm on how to think about building blockchain-powered applications that are also secure.</strong></p><p>If that piques your interest, <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.com/invite/PY4nhg7bcc">come say hi</a> and keep an eye out for the wish list of experiments dropping soon ✨</p><hr><p><em>Thanks </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/jdkanani"><em>JD</em></a><em> for review and </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/ShivanshuMadan"><em>Shivanshu Madan</em></a><em> and </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0xFunk"><em>Benjamin Funk</em></a><em> for inputs</em></p>]]></content:encoded>
            <author>stackrlabs@newsletter.paragraph.com (Stackr Labs)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/070dd148cc47b9cd25546380af3a5628f0ec21532aa8dde0ccda75af4e5320b3.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Announcing Stackr's $5.5M Seed Fundraise]]></title>
            <link>https://paragraph.com/@stackrlabs/announcing-stackr-s-5-5m-seed-fundraise</link>
            <guid>aV0sNySHZUoFvu7LsFjZ</guid>
            <pubDate>Wed, 08 Nov 2023 15:29:51 GMT</pubDate>
            <description><![CDATA[We are excited to announce our $5.5M seed round led by Archetype with participation from prominent funds, strategic investors, and angels, including a16z CSS, Lemniscap, Superscrypt, Spartan, Scalar Capital, a_capital, Sreeram Kannan, Anurag Arjun, Mustafa Al-Bassam and others to onboard the next wave of builders to web3. Stackr is a comprehensive and modular framework designed to enable developers to seamlessly build micro-rollups using general-purpose programming languages.Our Mission: Empo...]]></description>
            <content:encoded><![CDATA[<p>We are excited to announce our $5.5M seed round led by Archetype with participation from prominent funds, strategic investors, and angels, including a16z CSS, Lemniscap, Superscrypt, Spartan, Scalar Capital, a_capital, Sreeram Kannan, Anurag Arjun, Mustafa Al-Bassam and others to onboard the next wave of builders to web3.</p><p>Stackr is a comprehensive and modular framework designed to enable developers to seamlessly build micro-rollups using general-purpose programming languages.</p><h1 id="h-our-mission-empower-every-developer-to-build-scalable-web3-apps" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Our Mission: Empower every developer to build scalable web3 apps</h1><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/1f877865fb1968e6109846cd82528e0afe9c173026d95fd54f75da94a7cf4759.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Building applications for the blockchain has always been a niche field with a steep learning curve. Many non-web3 teams shy away from the complexities, even though decentralization could significantly enhance their offerings.</p><p>Stackr provides the simplest route to building web3 applications, offering developers a <strong>&quot;web2 way for building web3 applications.&quot;</strong> With our powerful developer tooling, new teams and existing enterprises with web2 applications can seamlessly transition to decentralized solutions.</p><p>We call the apps built using Stackr, <strong>Micro-rollups.</strong></p><h1 id="h-redefining-blockchain-app-development-through-micro-rollups" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Redefining (blockchain) app development through Micro-rollups</h1><p>Rollups are applications that perform off-chain execution and post the execution data on a host blockchain. By doing so, they derive the security properties of the host chain.</p><p>Conceptualized as a solution to the scaling problems of blockchains, rollups were conceived amidst the skyrocketing network fees on Ethereum. The initial EVM-based general-purpose rollups were designed to provide a quick fix, preserving the ‘<em>Ethereum developer experience</em>’ while minimizing transaction costs. They served as an immediate remedy for the blockspace crisis. However, this initial approach to rollups has its own set of limitations.</p><p>One of them being the single-threaded nature and the global shared state of the EVM execution environment. A notable incident occurred when Arbitrum, one of the largest rollups, witnessed gas prices far surpassing those of Ethereum during its Odyssey event in July 2022, causing network congestion and impacting all apps on the rollup. This is because all applications were competing for the same, congested blockspace!</p><p>The solution to such predicaments lies in building isolated execution environments for each app, a.k.a., <strong>App-specific rollups.</strong></p><p>App-specific rollups are chains that provide a customized and/or optimized execution environment to support specific use cases. These customizations could be protocol level - such as block times or gas measurement or even application level like custom cryptography or pre-compiles. They can be shared by similar applications or could serve just a single one.</p><p>However, while app rollups provide an optimized solution to the block space crisis, “constructing new architectures” for these app rollups is still <strong>quite difficult</strong>! It requires the management of various components, including establishing a state machine, the intricacies of data transport, and the implementation of verification mechanisms.</p><p><strong>This is where Stackr comes in</strong>. The Stackr SDK offers pre-packaged modules that can be tailored to specific needs allowing developers to easily build bespoke rollups from scratch each with their own unique designs.</p><p>However, Stackr transcends traditional VM-based rollups, taking the concept of app rollups to a new level where execution doesn&apos;t necessarily rely on a VM but can instead employ custom logic written in nearly any programming language. We <strong>proudly introduce Micro-rollups</strong>, ushering in a new era of logic-specificity alongside app-specificity.</p><h1 id="h-introducing-micro-rollups-mrus-a-paradigm-shift-in-app-specific-rollups" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Introducing Micro-rollups (MRUs): A Paradigm Shift in App-specific Rollups</h1><p>Micro-rollups are <strong>neo execution environments</strong> with primary objective of empowering developers by providing them with the necessary tools to create a broader range of web3 applications. This is achieved by offering developers a toolkit that aligns seamlessly with their existing knowledge and expertise, simplifying the complexities associated with building native web3 applications.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/554379caa61a9b8d99e2ebe81026f09bbb2267f1ca7168bca038cb0a85bbd04b.png" alt="Basic Architecture of a Micro-rollup" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Basic Architecture of a Micro-rollup</figcaption></figure><p>At the heart of the micro-rollup concept lies the principle of separation of execution and proving. The executor’s primary duty is to execute transactions, while the burden of ensuring the accuracy of the execution results is shifted to an external entity or auditor. This approach allows the executor to implement the core business logic in an unconstrained flexible manner and focus on throughput while the slower and costlier process of generating proofs or attestations is delegated away.</p><p>Unlike traditional blockchains, while MRUs can be used to build full rollups, they do not place the same emphasis on the highest levels of security or complete permissionless-ness. Instead, their focus is on achieving “Sufficient Decentralization”, striking a balance between the familiarity of Web2 development and the security inherent in Web3. Some examples of the kind of apps that this approach is suitable for include (as also noted by Vitalik himself in his post “<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://vitalik.ca/general/2023/10/31/l2types.html">Different types of layer 2s</a>“):</p><ol><li><p>For current app-chains who want to strip off some weight off of their protocols by piggy backing on Ethereum’s or other chain’s security models</p></li><li><p>Centralized projects seeking to enhance security assurances for their users through blockchain-based solutions</p></li><li><p>Current-gen centralized financial applications like CEXs who would want to provide users more visibility into their systems like proofs of solvency.</p></li><li><p>Non-financial applications, such as games or social media platforms, that aspire to be decentralized but require a “halfway-house” level of security</p></li><li><p>Systems that require additional co-processing and want to get trusted input inside Ethereum</p></li><li><p>and many more…</p></li></ol><p>In essence, Micro-rollups offer a blend of accessibility, user-friendliness, and a certain degree of decentralization, making them a valuable tool for the expansion of the web3 ecosystem.</p><h1 id="h-a-web2-way-for-building-web3-applications" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">A web2 way for building web3 applications</h1><p>Much like conventional Web2 apps, micro-rollups can be self-hosted on various cloud infrastructures. The Stackr SDK delivers a developer experience akin to traditional server-side or web2 backend application development. Additionally, Stackr’s roadmap includes plans to offer a mechanism for hosting these MRUs on behalf of developers in the future.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/73eda23a143c9abd1f8f7e1f00a6d6f02ed6f158c3c4a2817703f4eeef5d5856.png" alt="The Vulcans noted for their logic and rationalism form a committee to serve the Stackr Network and maintain order among MRUs" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">The Vulcans noted for their logic and rationalism form a committee to serve the Stackr Network and maintain order among MRUs</figcaption></figure><p>Stackr will provide its core framework in multiple languages along with an aptly named verification layer - Vulcan committee, starting with JavaScript, as it is the most commonly used language for building web apps. Eventually, the SDK will also be made available in other languages like Python, Golang, Rust, C#, and more. The aim is to provide tooling support for use-case-specific builds. For example, having a toolkit in C# will allow Unity game developers to leverage micro-rollups in their projects, and with Golang developers can build multi-nodal micro-rollup networks.</p><p>In addition to the core library, Stackr will offer pre-built state machine wrappers for specific use cases, such as token transfers. We intend to extend these wrappers to basic applications like exchanges, marketplaces, and social networking apps, among others so that developers don&apos;t have to bootstrap their applications from scratch.</p><p>Stackr aims at expanding its base toolkit via first and third party plugins for Sequencing, Data Availability adapters, Account Abstraction, Indexing, Hosting and multitude of other services and is open to collaboration on the development of these plugins and wrappers.</p><h1 id="h-next-steps-on-the-road-to-the-moon" class="text-4xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Next steps on the road to the moon 🚀🌕</h1><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/923ef90d89609399bb50715c01dded15f794a9d4cf932bf7f5adee3e93fb2511.png" alt="If modular Pepe can build it, so can you!" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">If modular Pepe can build it, so can you!</figcaption></figure><p>The raised capital will be allocated towards several key objectives, including team expansion, preparation for the imminent launch of the platform&apos;s v1 version, and the growth of Stackr&apos;s developer ecosystem. Our overarching goal is to engage with a diverse community of independent developers and enterprise teams that are actively involved in developing applications for both Web2 and Web3.</p><p>Soon, we will also be launching our developer preview for a select few developers to give the Stackr SDK a spin. As a private beta tester, you will have early access to the various modules and direct support from the team. We will also be hosting a Hacker House Bootcamp in the build-up to ETH India later this year. If you&apos;re interested in participating, keep an eye out on our Twitter for an upcoming announcement.</p><p>Decentralized app development is currently constrained to a niche subset of crypto-natives. With Stackr, we aim to make it accessible for all. We want to break down the barriers between web2 and web3 by making it easy to build and operate rollups by providing a web2 like developer experience and abstracting away the on-chain complexities.</p><p>A truly permissionless on-chain world will be built when developers can innovate without restrictions. That is the vision that guides us at Stackr. #onwards</p><p><strong>Stay tuned for Stackr Whitepaper dropping soon!</strong></p><ul><li><p>Follow us <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0xStackr">on Twitter</a></p></li><li><p>Drop an email at gm[at]stackrlabs.xyz</p></li><li><p>Join the conversation - <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.gg/AnmWBWyf">Discord</a></p></li></ul>]]></content:encoded>
            <author>stackrlabs@newsletter.paragraph.com (Stackr Labs)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/75ce986258cb3ccf2ceb7a9ce38fad2c92d724624c63b0512a19407c97cb2daa.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Value accrual for Rollup frameworks and RaaS (are they going to ZERO?)]]></title>
            <link>https://paragraph.com/@stackrlabs/value-accrual-for-rollup-frameworks-and-raas-are-they-going-to-zero</link>
            <guid>YVTqt7X59lgrMUD95Bh9</guid>
            <pubDate>Thu, 26 Oct 2023 17:02:50 GMT</pubDate>
            <description><![CDATA[- by Shivanshu Madan If the future consists of an onchain economy of thousands of rollups, we’re definitely on the right timeline in the present. From the Optimism stack and Polygon chain development kit to Caldera and Stackr, recent months have seen a variety of Rollup frameworks and Rollups-as-a-Service (RaaS) providers hit the market. These frameworks offer modular (often open-source) codebases for the different components of a rollup, allowing developers to pick and choose from a variety ...]]></description>
            <content:encoded><![CDATA[<p>- by <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/ShivanshuMadan">Shivanshu Madan</a></p><p>If the future consists of an onchain economy of thousands of rollups, we’re definitely on the right timeline in the present. From the Optimism stack and Polygon chain development kit to Caldera and Stackr, recent months have seen a variety of Rollup frameworks and Rollups-as-a-Service (RaaS) providers hit the market. These frameworks offer modular (often open-source) codebases for the different components of a rollup, allowing developers to pick and choose from a variety of custom options for each layer of the stack.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6c8e8a98f031a8102ae8b9db8afa2bac274844336647476c831bff3fbc23e414.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><strong>But how do these providers accrue value? Or, do they accrue </strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.youtube.com/watch?v=EIekN6przb0"><strong>any value at all?</strong></a><strong> as argued by Neel Somani recently</strong> <strong>in his talk “</strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.neelsomani.com/blog/rollups-as-a-service-are-going-to-zero.php"><strong>RaaS solutions are going to zero</strong></a><strong>” at Modular Summit.</strong></p><p>In this blog post, we analyze some of his arguments and also explore the intricate dynamics of value accrual for rollup frameworks and RaaS providers. From the individual layers to Superchains, we unravel the hidden mechanisms behind the value creation and capture by rollup frameworks and RaaS providers.</p><h3 id="h-rollups-vs-rollup-framework-vs-raas" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Rollups vs Rollup Framework vs RaaS</h3><p><strong>Rollups</strong> are applications that perform offchain execution and post the execution data on another (host) blockchain. By doing so, they derive the security properties of the host chain. The rollup application itself could be just a single State transition function, or it could be a separate Blockchain for which canonical state is maintained by a group of nodes</p><p>A <strong>rollup framework</strong> is a pre-built codebase that implements the essential components of a rollup. Instead of building a rollup from scratch, developers can use these existing codebases (often packaged as SDKs) and customize them to their specific needs. Examples of open-source rollup frameworks include <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://stack.optimism.io/">OP Stack</a> and <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://arbitrum.foundation/orbit">Arbitrum Orbit</a>.</p><p><strong>Rollups-as-a-Service</strong>, or <strong>RaaS</strong> protocols, are no-code wrappers built on top of existing rollup frameworks. They enable developers to quickly deploy a rollup from scratch by selecting custom features from drop-down menus. RaaS companies often handle the sequencing of the deployed rollups and offer additional consulting services.</p><h2 id="h-where-the-money-goes" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Where the money goes</h2><p>To understand how the value flows in and out of the entire stack, it is important to first understand the architecture of a rollup and how the different layers interact with each other. There are broadly 3 layers that constitute a rollup stack:</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/77624550e2afa4d920c842418b876c604b7167a2888d9e8c02534498bb38f2ec.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><strong>1. Execution -</strong> This layer executes the transactions by applying the State Transition Function (STF) on the existing state of the rollup. Depending on how ‘centralized’ the rollup is, an execution node could own a range of responsibilities from ordering transactions and executing them to posting them on L1 and creating fraud/validity proofs.</p><p>The execution layer is the ‘user-facing’ layer, where the money enters the rollup stack. Users are charged a transaction fee (gas) which is usually a margin over the various costs that the execution layer has to pay (more on this later). This layer can also extract additional value from the users by ordering transactions in certain ways (also known as <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://ethereum.org/en/developers/docs/mev/"><strong>MEV: Maximal Extractable Value</strong></a><strong>).</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/be2c37188775b65cb83f52916de0621d140ab5e6d4deccc70b623e1d72f15599.png" alt="Breakdown of the execution layer operated by a centralized rollup sequencer. Its responsibilities include: Ordering transactions, Posting transaction data on the DA layer, Creating proofs, Posting proofs and state changes on Settlement Layer" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Breakdown of the execution layer operated by a centralized rollup sequencer. Its responsibilities include: Ordering transactions, Posting transaction data on the DA layer, Creating proofs, Posting proofs and state changes on Settlement Layer</figcaption></figure><p><strong>2. Settlement -</strong> This includes verifying the validity/fraud proofs and ‘defining’ the canonical state of the rollup (in the case of smart contract rollups). Settlement is usually managed by a unified, high-security layer like Ethereum. Rollup frameworks can build their own settlement layer as well.</p><p>Settlement isn’t a very high-value-capture layer of the stack as verification costs are usually meager. Optimism only pays <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://dune.com/optimismfnd/optimism-l1-batch-submission-fees-security-costs">~$5 a day</a> to Ethereum for settlement. A competitive settlement layer would cost even less. (as also highlighted in <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.neelsomani.com/blog/rollups-as-a-service-are-going-to-zero.php">Rollups-as-a-Service Are Going To Zero</a>)</p><p><strong>3. Data Availability -</strong> DA includes broadcasting the ordered transaction data to the rest of the network (also sometimes called Data Publishing). It ensures that anyone can permissionlessly reconstruct the rollup state by simply applying the broadcasted transaction data to some previously finalized state.</p><p>DA costs form a major portion of all rollup costs. Posting data on a highly-secure layer like Ethereum can be quite expensive. Cheaper and faster DA alternatives are being actively developed by protocols like Celestia, Avail, and EigenDA. Rollup frameworks could also consider building their own DA layer, but a fragmented DA has high bootstrapping costs and makes interoperability more complex.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/d547268b640e10191ff9de67bb614a613675dc93dbeedb8f90b778eb3b2b643f.png" alt="High-level value flow" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">High-level value flow</figcaption></figure><p>It might help to think of the Execution layer as a B2C model and Settlement and DA layers as B2B models:</p><ul><li><p><strong>Execution layer</strong> buys block space from the DA layer and sells its execution services directly to the end user (customer). It also buys verification &amp; bridging services from the Settlement layer</p></li><li><p><strong>DA layer</strong> sells block space to another business - the Execution layer</p></li><li><p><strong>Settlement layer</strong> provides settlement services to another business - the Execution layer</p></li></ul><p>In such a setup in competitive markets, the majority of value capture happens directly from the end user in the execution layer of the stack, so it makes sense to break it down further and analyze its value flows independently.</p><h2 id="h-execution-layer-a-b2c-economic-model" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Execution layer: A B2C economic model</h2><p>The execution layer generates revenue by charging users for each transaction and pays operational costs to the other businesses (layers) in the stack.</p><p><strong><em>Revenue</em></strong>: The incoming value can be categorized as follows:</p><ul><li><p>Gas costs paid by end users per transaction</p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/electriccap.eth/SD0wT7qSSfis9gLT_Ki1gY6_oTYEqgwcGE0hDw7kMDY">Intra domain MEV</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/electriccap.eth/SD0wT7qSSfis9gLT_Ki1gY6_oTYEqgwcGE0hDw7kMDY">Cross-domain MEV</a>* (*<em>If the framework provides sequencing for multiple rollups on the same DA layer. Could be tough to extract otherwise</em>)</p></li></ul><p>MEV depends on the transaction flow (the “extractable” value will be different for each set of transactions) and is often hard to predict in advance. The gas costs charged to the users are then usually a margin over the combined predictable costs.</p><p><strong><em>Costs:</em></strong> The value outflows from the execution layer are the following:</p><ul><li><p>Node operational overhead</p></li><li><p>Execution (compute) costs</p></li><li><p>Proving (validity/fraud proofs) costs</p></li><li><p>Data posting costs (variable based on congestion on the DA layer)</p></li></ul><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/a46596b39cad2beb96a34800b4f155d8f88dd9dacde17bfe512c29cb2f05b113.png" alt="Source: Understanding Rollup Value Accrual by Sanjay Shah | Electric Capital" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Source: Understanding Rollup Value Accrual by Sanjay Shah | Electric Capital</figcaption></figure><p>Often, all the execution layer responsibilities are borne by one centralized sequencer node. This single node accrues all the revenue from the users and is responsible for paying the DA and Settlement costs. At other times, the setup can have different nodes for different responsibilities:</p><ul><li><p>Sequencers order transactions and post data on the DA layer. They ‘earn’ the transaction fees paid by users and pay sequencing overhead and data posting costs. Sequencing can also be done by a pre-selected set of sequencers or decentralized sequencers like <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/EspressoSys">Espresso</a>. Sequencers are also responsible for posting state changes to the Settlement layer and paying the settlement costs</p></li><li><p>Prover nodes are responsible for generating proofs. It can be a central prover or a decentralized set of proving nodes. Their costs comprise the proof-generation overhead. Depending on the setup, provers either ‘sell’ the proofs to the sequencer, or post it to the settlement layer directly</p></li><li><p>Rollups can also have other full nodes (or full-verifying light nodes) that execute all transaction batches and maintain the canonical state of the rollup. These full nodes don’t necessarily accrue any direct revenue but indirectly capture value by holding the rollup’s native gas token</p></li></ul><p>The above is a broad differentiation of the responsibilities of different nodes. Which node takes up which tasks can differ based on how the rollup team architectures their setup. For the sake of simplicity in this blog, we will stick to a centralized sequencer setup where one node performs all the required execution tasks.</p><p>The question then is: <em>If the execution layer drives the most value, which participant in the stack is best positioned to capture it?</em></p><p><strong>Anyone who runs the sequencing node and performs the various activities associated with it!</strong></p><p>This can be the rollup team themselves. Or, as mentioned at the beginning of the article, RaaS providers often handle the sequencing for the rollups deployed using them. In fact, this is the majority portion of revenue for the RaaS providers.</p><h2 id="h-how-does-raas-make-money" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">(How) does RaaS make money?</h2><p>There are 3 major areas a RaaS can capture value:</p><ul><li><p><strong>Sequencer Hosting:</strong> The RaaS provider runs the sequencer and associated activities for the rollup. It&apos;s a division of labor where the rollup team brings the innovation (the app they are building) and the RaaS provider does everything else. The sequencer orders transactions, posts data on L1, and creates proofs if/when required</p></li><li><p><strong>Additional Infra:</strong> Block explorers, bridges, etc.</p></li><li><p><strong>Dedicated Support:</strong> Consulting and partnering on infra decisions (how to sequence, MEV, etc.) + other technical support</p></li></ul><p>RaaS is similar to a traditional B2B SaaS business where the business can charge their customers a flat fee or a hybrid-tiered fee based on the services bought and the usage (number of end-user transactions for a rollup, for example).</p><p>RaaS could also provide an integration with a <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://blog.caldera.xyz/caldera-and-espresso-systems-unveil-first-optimistic-rollup-using-espressos-decentralized-sequencer/">shared sequencer like Espresso</a>. However, in this case, they would lose out on the sequencer revenue, which makes up a major portion of RaaS’s profits. These partnerships therefore require contractual profit sharing between the shared sequencer and RaaS provider.</p><p>But if RaaS is a wrapper built on top of an existing rollup framework, it must share revenue with them as well, right?</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/db55835b63b5922f1d861b49c0ecd8425d94137845d3ba31014f63f1058351e1.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Well, <strong>not necessarily</strong>.</p><p>Most of the rollup frameworks released so far have been open-source and permissionless to build upon. RaaS providers can use the framework permissionlessly to build a no-code wrapper on top of it and aren’t obligated to share any profits with the underlying framework.</p><p><strong>Can they have a contractual agreement with the rollup framework to share profits?</strong></p><p>They can, but if they do so:</p><ol><li><p>They lose out on some of their own profits</p></li><li><p>Another competitor RaaS could choose not to share profits with the rollup framework and would be economically dominant in the long term</p></li></ol><p>Therefore, game theoretically, for RaaS provider to survive, the rational decision is to NOT share profits with the underlying framework.</p><h2 id="h-so-if-raas-providers-dont-share-profits-how-does-a-rollup-framework-accrue-any-value" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">So if RaaS providers don’t share profits, how does a rollup framework accrue any value?</h2><p><em>If anyone can permissionlessly build a rollup using the open-source framework, is it even an economically viable decision to develop an open-source rollup framework in the first place?</em></p><p>The answer is not so straightforward. For a rollup framework to be ‘economically viable’, it needs to generate sustainable, long-term value. <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0xidanlevin">Idan Levin</a> shared a good <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://x.com/0xidanlevin/status/1684203289443704832?s=20">mental model</a> to think about how this can be done. Let’s expand on that model here. There are 3 major ways rollup frameworks can accrue value:</p><ol><li><p><strong>Indirect value accrual:</strong> If the framework is good, more and more teams will use it. This will attract developer eyes and more mindshare to the ecosystem. Attracting mindshare is always a net positive as it will help the framework team in developing the tools further. Any enhancements that any of the teams make can be incorporated into the OG framework. This creates a positive reinforcement loop for the entire system.</p></li><li><p><strong>Semi-direct value accrual:</strong> Some rollups building on top of the framework might be incentivized to share revenue with the framework network. For example, Base currently has an agreement with OP Stack where they share part of the sequencing fee with Optimism.</p><p><em>Why are they incentivized to do so?</em></p><p>Because Base doesn’t have the necessary developer ecosystem to keep up with the growth and development of the OP framework. Imagine if the OP framework changes one of the modules completely, they could choose not to provide the developer support to Base to keep up with the changes.</p><p>In addition, being a part of the ‘<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.optimism.io/superchain">Superchain</a>’ provides network effects like cross-rollup composability that chains like Base could find useful (and this could have a requirement to share revenue with Optimism)</p></li></ol><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/556387604a09843f18baf3dd0f6fa883b3a9970d2bd370991a754b6ea9aacf33.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>One important caveat here is that the incentives of rollups and rollup frameworks might not always be aligned. At any point, the rollup could choose to follow its own path by customizing the framework and scrapping any revenue share agreements.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/a102c6caeb6866db7ca42ffa172826ab3b1584443524e627d73217f796804078.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><strong>3. Direct value accrual:</strong> Through the framework’s own rollup (e.g., Optimism mainnet) built using the same framework (e.g., OP Stack). The gas could be in the native token (e.g., OP) and all the MEV from this rollup would accrue to the framework team. In addition, the team could also ‘extract’ some supplementary direct value:</p><ol><li><p><strong>Building their own RaaS -</strong> The framework could choose to compete in the RaaS space and provide its own Sequencer hosting + consulting services. <strong>If a lot of frameworks start doing this, this could make the RaaS business model unsustainable in the long term.</strong> This is because the framework could leverage its credibility and position in the market to outcompete any external RaaS providers built on top of it.</p></li><li><p><strong>Inter-rollup composability as leverage:</strong> Anyone can build a rollup by using the framework as it is or modifying it. However, to gain network effects and interoperability with other rollups built on the same framework, the framework may require adherence to certain defined standards.</p><p>This is what OP Stack does with the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://optimism.mirror.xyz/JfVOJ1Ng2l5H6JbIAtfOcYBKa4i9DyRTUJUuOqDpjIs"><strong>Law of Chains</strong></a>. To be a part of the Superchain, you have to follow certain rules. These rules are defined by the OP governance. For example, one of these rules could be that all rollups in Superchain have to use OP as the gas token. This could also evolve to include MEV share laws, for e.g., X% of cross-chain MEV revenue would go back to the OP treasury.</p></li></ol><p>The rollup framework teams can play with the above 3 segments to tailor their ‘value capture’ mechanism to their goals and ambitions. For them to accrue any <strong>direct</strong> value, a few (non-exhaustive) options could be:</p><ul><li><p>Deploying own rollup</p></li><li><p>Deploying own RaaS</p></li><li><p>Leveraging composability to govern standards for the framework</p></li></ul><h2 id="h-conclusion" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Conclusion</h2><p>The rapid development of rollup frameworks and Rollups-as-a-Service (RaaS) providers in the blockchain space has sparked questions about their value accrual. While the execution layer captures the lion&apos;s share of value, rollup frameworks can gain indirect value through adoption and enhancements. Some rollups may even share revenue, creating a semi-direct value accrual. Furthermore, by deploying their own rollups and leveraging inter-rollup composability, frameworks can directly capture value. As the ecosystem evolves, striking the right balance between competition and collaboration will be vital for the sustainable growth of rollup frameworks and RaaS providers.</p><p><strong>At Stackr, we&apos;re exploring the best ways to build a transparent and sustainable business that opens the gates of crypto to the Web2 world. As we grind towards shipping our rollup framework, we are also experimenting and evaluating the various ways of accruing value to our customers and partners. If you have ideas, thoughts, or arguments, we would love to hear from you!</strong></p><p>Reach out to us <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0xStackr">via Twitter</a> or drop an email at <em>gm[at]stackrlabs.xyz</em>.</p>]]></content:encoded>
            <author>stackrlabs@newsletter.paragraph.com (Stackr Labs)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/02170c076f5d56802489ca53268811f091359fe226c6104840f901c022de1b4c.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Introducing the Stackr SDK to build micro-rollups on Ethereum]]></title>
            <link>https://paragraph.com/@stackrlabs/introducing-the-stackr-sdk-to-build-micro-rollups-on-ethereum</link>
            <guid>49syj5868WCGsDO7n0HH</guid>
            <pubDate>Mon, 10 Apr 2023 15:52:02 GMT</pubDate>
            <description><![CDATA[Stackr Labs’ mission is ambitious yet simple: Empower every developer to build scalable web3 apps. Today, decentralized app development is constrained to a niche subset of crypto-natives. Our goal is to make it accessible for all - to break down the barriers between web2 and web3 by making it easy to build and operate rollups. As our first step towards this goal, we are introducing the Stackr SDK - a framework to build app-specific micro-rollups in web2 programming languages. In the rest of t...]]></description>
            <content:encoded><![CDATA[<p>Stackr Labs’ mission is ambitious yet simple: <strong>Empower every developer to build scalable web3 apps.</strong></p><p>Today, decentralized app development is constrained to a niche subset of crypto-natives. Our goal is to make it accessible for all - to break down the barriers between web2 and web3 by making it easy to build and operate rollups.</p><p>As our first step towards this goal, we are introducing the Stackr SDK - a framework to build app-specific micro-rollups in web2 programming languages. In the rest of this post, we’ll walk through these concepts and our thinking behind the SDK, our long-term vision and near-term focus.</p><h2 id="h-appchains-meet-rollups" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Appchains, meet rollups</h2><p>Ethereum and Cosmos visions are colliding.</p><p>The Ethereum ecosystem has recognized the value of app-specific blockspace for customizability, performance and value capture. Meanwhile, the Cosmos ecosystem has recognized the value of shared security for trust-minimization and easier chain operations. App-specific rollups realize the best of both worlds and are quickly gaining mindshare.</p><p>However, it’s still very hard to build rollups, let alone app-specific rollups. Most existing rollups are general purpose, take a long time to build, require deep crypto expertise and use custom software.</p><p>Stackr solves this problem with an SDK for building app-specific rollups. We let developers easily customize execution environments to fit their use cases.</p><h2 id="h-how-we-think-about-rollups" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">How we think about rollups</h2><p>Before further illustrating our approach, let’s take a step back. The <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://joncharbonneau.substack.com/p/rollups-arent-real">rollup design space</a> is large, complex and dynamic, so it’s important that we first establish a fundamental understanding of the technology.</p><p>Rollups are often misunderstood - they simply compute over transactions off-chain and store the results and input data on-chain. Kelvin from Optimism recently offered a great mental model in <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.youtube.com/live/CAVP16pLQvM?feature=share&amp;t=3695">his ETHGlobal presentation</a>. A rollup is “a function over an input array”. We agree, and through this lens, any finite state machine that computes over an on-chain input array can be considered a rollup. Rollups are not limited to the EVM, SVM, Move VM, or any crypto-native VMs!</p><h2 id="h-break-up-the-monoliths" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Break up the monoliths</h2><p>One thing web2 got very right was the micro-services architecture. The design philosophy involves breaking down a larger system or application into smaller components, each responsible for specific functions. For example, a given application might have authentication, data storage, and messaging functions built as separate micro-services. This approach brings many benefits to developers - agility, flexibility, upgradability, efficiency, reusability, etc.</p><p>For similar reasons, web3 is also adopting this design philosophy. It underlies the shift towards modular blockchains and app-specificity.</p><h2 id="h-here-come-the-micro-rollups" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Here come the micro-rollups</h2><p>Stackr is going a step further - from app-specificity to logic-specificity. We are introducing the concept of <strong>micro-rollups</strong>, where individual functions within a decentralized app are developed, optimized and maintained as independent state machines. Referencing the micro-services analog, you can think about <strong>regular</strong> <strong>rollups —&gt; micro-rollups</strong> similar to <strong>monoliths —&gt; micro-services</strong> or <strong>VMs —&gt; containers</strong>.</p><p>Here are two ways to visualize the differences:</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e2bba787effee896dd72d3a3916302dbce9a369bd01f4168b0a5d5198d4a3e83.png" alt="Stackr enables more efficient state machines" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Stackr enables more efficient state machines</figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/1b83269b60557bdd33f738948da61063ab97a28e9bf130da72d90a6225edb4fb.png" alt="With Stackr, app = state machine" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">With Stackr, app = state machine</figcaption></figure><p>Developers can use the Stackr SDK to define data structures for their application’s state and state transition function. Under the hood Stackr will do the heavy lifting, providing an API to interact with the app, connect it to the aggregator network (more on this later) and finalize on L1.</p><p>As an example application, let’s say you write a merkle tree with leaves that hold account addresses and token balances. You have just built yourself an account-book rollup. Now replace ECDSA with BLS and you have a working version of <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/thehubbleproject/hubble-contracts">Hubble</a>, the most efficient ERC-20 transfer rollup as well as (fun fact!) the first ever app-specific rollup!</p><h2 id="h-program-in-languages-you-already-love" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Program in languages you already love</h2><p>The Stackr SDK is very flexible and allows developers to use programming languages of their choice. We believe that to truly make web3 app development widely accessible, we must meet developers where they are. Python, JavaScript, Go, C, etc. - these are the languages that millions of developers worldwide already know and love.</p><p>Stackr Labs is also developing pre-built state machine and bridging modules that make it easy for micro-rollups of different languages to interact. Imagine an app that uses one Python-based micro-rollup and another JavaScript-based micro-rollup, both optimized for the task at hand.</p><p>Here’s a way to visualize composable micro-rollups leveraging different languages and an aggregator network:</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8a915f1414d27f860aea1e8c027893cb48f6e48cd095d0e03be33c2b86a15159.png" alt="Composable micro-rollups using a shared aggregator network" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Composable micro-rollups using a shared aggregator network</figcaption></figure><h2 id="h-sufficiently-decentralized-apps" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Sufficiently decentralized apps</h2><p>There are many exciting apps in the space, but one we find worth highlighting is <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/farcasterxyz/protocol">Farcaster</a>, a “sufficiently decentralized social network”. The Farcaster team detailed their thinking behind “sufficient decentralization” <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.varunsrinivasan.com/2022/01/11/sufficient-decentralization-for-social-networks">in this post</a>, but the core idea is that sometimes putting entire apps on-chain is “unnecessary and undesirable”.</p><p>Their POV is that “a social network achieves sufficient decentralization if two users can find each other and communicate, even if the rest of the network wants to prevent it” and that “achieving this only requires three decentralized features: the ability to claim a unique username, post messages under that name, and read messages from any valid name.”</p><p>To be very clear - we at Stackr Labs believe in open and permissionless innovation. Build anything you want and put any of it on-chain. However, we do find the Farcaster design approach (and social network use case) interesting and a fantastic match for micro-rollups and the Stackr SDK. We aim to make it easy for developers to decentralize the bits that matter.</p><h2 id="h-example-use-cases-and-applications" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Example use cases and applications</h2><p>The capacity of rollups to validate any off-chain computation represents a remarkable superpower that can be harnessed to create highly efficient use cases for distributed computing. Here are some examples to get the juices flowing:</p><ul><li><p><strong>Games.</strong> Build immersive, interactive games in JS or Unity by converting each user action into an L2 transaction. Rollups provide exciting new opportunities for the development of sophisticated gaming applications with unprecedented levels of interactivity.</p></li><li><p><strong>Databases and cloud services.</strong> Build a full-fledged database system and index structured and unstructured data within L2 nodes or build entire cloud service stacks like Lambda or identity management tools.</p></li><li><p><strong>Oracles and real world data.</strong> Have seamless integration of off-chain data sources such as social graphs, user credit scores, KYC and identity systems. Build attestation applications or run an entire DAO as a rollup with advanced access control and grants processes.</p></li><li><p>Off-chain multi-nodal networks. Develop comprehensive distributed applications. Provide novel on-chain services to users by enabling nodes to interact with each other through a rollup network.</p></li><li><p><strong>Social algorithms.</strong> Build a trending algorithm micro-rollup to power the news feed of your Farcaster client.</p></li><li><p><strong>Machine learning.</strong> Deploy models for inference as Python micro-rollups. Let users verify it’s truly GPT-2 and not GPT or some other flavor.</p></li><li><p><strong>DeFi and NFTs.</strong> Build an AMM DEX in Python or C++ using composable micro-rollups for token transfer + token pool + oracle + AMM logic.</p></li><li><p><strong>Enterprise applications.</strong> Build private and semi-private applications with robust data access controls. For example, an end-to-end supply chain management system with view permissions for the public but write permissions reserved for authorized parties.</p></li><li><p><strong>No limits!</strong> We are only starting to unlock the full potential of rollups for distributed computing. Build secure and reliable communication infrastructure, multi-party compute systems like folding@home, distributed video transcoding systems like Livepeer, privacy-focused transaction ledgers like Aztec or a massive open world game like Minecraft. Build anything from middleware for wallets to entire cloud services like AWS - there’s a huge design space for verifiable compute.</p></li></ul><h2 id="h-product-vision" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Product vision</h2><p>Now let’s talk about our vision for Stackr Labs and the technologies we are building.</p><h3 id="h-modular-and-agnostic-sdk" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Modular and agnostic SDK</h3><p>The Stackr SDK will support many web2 programming languages such as Python, JavaScript, Go, C, Rust and more - our goal is to be language agnostic. The SDK will also be as flexible as possible regarding proofs (fraud and validity), rollup types (classic and sovereign), ordering (centralized and decentralized) and base layers.</p><h3 id="h-decentralized-aggregator-network" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Decentralized aggregator network</h3><p>Stackr Labs is also building an aggregator network that receives interaction data from applications (along with new states and metadata), bundles the data and submits it on-chain. You can think of the aggregator network like bundlers in EIP-4337, except with rollup data.</p><p>We will be sharing much more information about this layer over the coming months!</p><h3 id="h-near-term-focus" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Near-term focus</h3><p>To start, the Stackr SDK will focus on Python and JavaScript programming languages. It will support sovereign rollup mode and ordering will be done by the applications. The initial version will be released without proofs enabled, while we build out the aggregator network, and focus on Ethereum as a base layer.</p><h2 id="h-where-to-find-us" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Where to find us</h2><p>The Stackr Labs mission is to <strong>empower</strong> <strong>every developer to build scalable web3 apps.</strong> It’s an ambitious goal and there’s plenty of work ahead. If the mission resonates with you as a builder or potential team member, please reach out!</p><ul><li><p>We’re hiring! <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://stackr-labs.notion.site/Join-us-Stackr-Labs-eaf9056586d243e688dcfcfbad26d843">Join our team</a></p></li><li><p>Eager to build with us? <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.google.com/forms/d/e/1FAIpQLSearPyI7Mkff7PjJ_r-AtUMlXolk6a_qB1sQKlxlJahKLB3zQ/viewform?usp=send_form">Join the waitlist</a></p></li></ul><p>Whether you’re looking to deploy an existing project as a rollup, starting a new project or still in the idea maze, we’d love to collaborate with you.</p><p>We plan to build in public and will be releasing much more information over the coming months. Excited to have you on this journey with us - let’s “roll” homies 🚀</p><ul><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/0xStackr">Twitter</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://discord.gg/4wChdkN2">Discord</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.stackrlabs.xyz/">Website</a></p></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://mirror.xyz/stackrlabs.eth">Mirror</a></p></li></ul><h2 id="h-special-thanks" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Special thanks</h2><p>Shoutout to our advisors, investors and everyone helping out along the way: <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/litocoen">@litocoen</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/RHLSTHRM">@RHLSTHRM</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/anuragarjun">@anuragarjun</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/arjunbhuptani">@arjunbhuptani</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/norswap">@norswap</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/NoahCitron">@NoahCitron</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/musalbas">@musalbas</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/DannySursock">@DannySursock</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/AshAEgan">@AshAEgan</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/stonecoldpat0">@stonecoldpat0</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/sunnydece">@sunnydece</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/VirtualElena">@VirtualElena</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/guywuolletjr">@guywuolletjr</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/ljxie">@ljxie</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/sanjaypshah">@sanjaypshah</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/nuss_eli">@nuss_eli</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/jacobkxyz">@jacobkxyz</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/jadbc0x">@jadbc0x</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/sjors_lemniscap">@sjors_lemniscap</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/jessziyuezhang">@jessziyuezhang</a> <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/devfolio">@devfolio</a> and many others</p>]]></content:encoded>
            <author>stackrlabs@newsletter.paragraph.com (Stackr Labs)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/6f3ca27fdec57970ac6b27c0fd56555e16d11855b0081ea19aa0e37c2677b0ce.jpg" length="0" type="image/jpg"/>
        </item>
    </channel>
</rss>