Guide to Lagrange

June 4, 2024

We are excited to announce that the Lagrange ZK Coprocessor and State Committees will be the next EigenLayer AVSs our Operator will support, with ZK Coprocessor now live. If you’ve restaked ETH or LSTs on EigenLayer, visit our Delegation Guide to delegate to Coinbase’s Operator.

Introduction to Lagrange

Lagrange Labs is the team behind two AVS protocols, the Lagrange ZK Coprocessor and Lagrange State Committees. 

If you need to bridge from an optimistic rollup and do not want to wait for the challenge window, you can use the Lagrange State Committee (LSC) to bypass this. If you need to query data onchain but want to do it more efficiently, you can use the ZK Coprocessor.

Lagrange ZK Coprocessor

What are ZK Coprocessors?

ZK Coprocessors are a technology that combines zero-knowledge proofs (ZK proofs) with coprocessors. They enable offchain computations while ensuring cryptographic integrity and removing the need for trust. ZK Coprocessors allow applications to move heavy computations offchain and use ZK proofs to verify the correctness of the computations onchain. ZK is particularly valuable for new project categories like coprocessors, which facilitate offchain computations while leveraging the security provided by ZK technology. 

Lagrange ZK Coprocessor

Lagrange's ZK Coprocessor allows developers to execute intensive offchain computation and prove the result of the computation to smart contracts onchain. Rather than constrained by onchain gas limits, developers can lift computationally intensive workloads, such as SQL queries over historical data, to a network of offchain provers that will compute the result asynchronously and efficiently. Provers are run by operators such as Coinbase with restaked assets on EigenLayer, guaranteeing the result delivery's liveness.

Suppose you're building an app that requires computing onchain data at a large scale and leveraging the blockchain to access that data; it can quickly become costly and time-consuming. Relying on an intermediary such as an oracle can be efficient, but it comes with security and accuracy risks. Instead, you can use Lagrange's ZK Coprocessor to query for the information you need quickly. The results are sent back to your application as ZK proofs, guaranteeing their validity.

How does it work?

Architecture

Lagrange's ZK Coprocessor transforms blockchain data into an offchain ZK-friendly database. It relies on its Prover Network, a decentralized network of nodes, to prove computation over the data and to deliver it back to smart contracts for onchain use. Coinbase is an operator in Lagrange's Prover Network and participates by running prover nodes.

As a core part of Lagrange's ZK Coprocessor, the Prover Network consists of two primary actors: Gateways and Provers. Each Gateway is responsible for dividing and managing a queue of work that different Provers commit to perform. Each Prover then participates in the proof generation process, and the results are either returned as a single proof or aggregated ZK proof for developers to use in applications. 

Source: Lagrange blog

Lagrange Labs deploys the first Gateway within the Lagrange Prover Network to power its ZK Coprocessor. It performs four essential functions:

  • Indexing blockchain data to create a database as part of the public input to proof requests and constantly monitoring for updates.

  • Receiving queries from applications across different chains where the Gateway has a verifier contract deployed.

  • Planning queries by breaking down requests into smaller, parallelizable tasks distributed to various Provers.

  • Managing the task queue and dispatching these tasks to Provers, who then generate proofs and deliver results.

Source: Lagrange blog

Provers perform the assigned tasks within an allotted time or risk penalties through slashing or non-payment. Once they submit the result of the computation and a proof to a contract onchain, developers can use the data with assurance of its validity without having to trust the offchain provers.

Lagrange State Committees (LSCs)

Optimistic rollups use a fraud-proof mechanism that allows any user to challenge an execution's outcome within a specific time window.

A Lagrange State Committee, or LSC, is a zero-knowledge light client for optimistic rollups that settle on Ethereum.  

This means Lagrange State Committees enable a "fast mode" for protocols to bridge from an optimistic rollup without waiting for the challenge window to close. This specifically addresses a major pain point around cross-chain message latency. 

LSCs are not meant to replace proofs of consensus but are an alternative for chains whose finality is not provable via zero-knowledge. 

How does it work?

An LSC is a decentralized network of nodes, each attesting to the finality of blocks within an optimistic rollup. These attestations generate state proofs, which dapps can use as the source of truth of the state of that optimistic rollup. Each node (backed by EigenLayer restaked ETH) must run a containerized watcher node of a rollup for which it wishes to provide attestations.

Source: Lagrange Node Architecture Docs

Conclusion

With its two new AVS protocols - ZK Coprocessor and State Committees - Lagrange offers a unique solution to some of the most pressing issues in the blockchain space. Lagrange ZK Coprocessor allows applications to move heavy computations offchain while ensuring cryptographic integrity, enabling computing over onchain data at a large scale. Lagrange State Committees address the issue of cross-chain message latency by enabling a "fast mode" for protocols to bridge from an optimistic rollup without waiting for the challenge window to close. 

As one of the operators supporting Lagrange through our participation in the EigenLayer protocol, Coinbase looks forward to continuing to support and extend Ethereum's capabilities in an open and sustainable manner.

To learn how to delegate to Coinbase's Operator, please refer to our Delegation Guide or contact us today to get started.

Disclaimer

This document and the information contained herein is not a recommendation or endorsement of any digital asset, protocol, network, or project. However, Coinbase may have, or may in the future have, a significant financial interest in, and may receive compensation for services related to one or more of the digital assets, protocols, networks, entities, projects, and/or ventures discussed herein. The risk of loss in cryptocurrency, including staking, can be substantial and nothing herein is intended to be a guarantee against the possibility of loss.This document and the content contained herein are based on information which is believed to be reliable and has been obtained from sources believed to be reliable, but Coinbase makes no representation or warranty, express, or implied, as to the fairness, accuracy, adequacy, reasonableness, or completeness of such information, and, without limiting the foregoing or anything else in this disclaimer, all information provided herein is subject to modification by the underlying protocol network. Any use of Coinbase’s services may be contingent on completion of Coinbase’s onboarding process and is Coinbase’s sole discretion, including entrance into applicable legal documentation and will be, at all times, subject to and governed by Coinbase’s policies, including without limitation, any applicable terms of service and privacy policy, as may be amended from time to time.