Exploring the Integration of Zipline

Exploring the Integration of Zipline

A Trustless, Fault-proof Based Blockchain Bridge

ChainSafe engineers Eric, Willem, and Cayman put together an exciting new bridge prototype at last year’s EthBogota hackathon. This creation, dubbed Zipline, borrows elements from various concepts and projects to create a seamless and trustless block header relay from Gasper-based chains to EVM-based chains.

What is Zipline?

Inspired by the work on ZK bridges by Succinct Labs, the fault-proof code from Optimism Cannon, and the Eth2 light client code from Snowbridge, the team’s goal was to build a trustless block header relay for Capser-based chains (like Ethereum and Gnosis Chain) to EVM-based chains (like Avalanche and Polygon).

To simplify, think of Zipline as a communication line. It allows different blockchain systems to understand and verify each other's information, enhancing interoperability and fostering a more connected blockchain ecosystem.

How does it work?

When originally developed, Zipline utilized a light-client protocol, allowing devices with limited resources to follow the blockchain's progression with minimal computational effort. However, this mechanism was still too costly to execute within an EVM runtime, so the team decided to employ fault proofs to allow offchain execution of the light client protocol with onchain settlement, significantly reducing the cost.

The Zipline protocol lets anyone submit updates, provided that they supply a bond (a security deposit). These updates are subject to a challenge period, during which anyone can dispute their validity. If a dispute arises, a game begins to identify where potential fraud may have occurred.

This process uses a technique called bisection of the execution trace to pinpoint the suspicious instruction, which the chain then executes to determine if there was fraud.


Zipline functions similarly to fault-proof-based rollups like Optimism and Arbitrum. These Ethereum L2 rollups improve scalability by executing transactions offchain and then posting the results to mainnet, hence rolling up the results of many transactions into one.

They achieve this through Optimistic Rollup, which assumes the transactions are correct unless proven otherwise. However, Zipline's approach differs in focus. Instead of processing transactions themself, it verifies the finality of another chain.

In essence, Zipline acts as a verifier or auditor of another chain's finality protocol, checking for correctness and integrity. This distinct role focuses on security and verification, which is crucial in decentralized networks where trust in the validity of transactions and data is paramount.

Challenges: implementing the Casper consensus protocol

While using a light client protocol provides Zipline with many benefits, it isn’t without challenges. The economic security of the beacon chain light client provides is far less than the value bridges typically expect to secure. One could imagine a yet-unseen attack where the light-client sync committee members collude to exploit a light-client-based bridge and share the proceeds.

To counter this, we’re currently developing a version of Zipline that verifies Ethereum’s Casper finality protocol in full. While this would require more complexity in the state and inputs, it would provide a more secure protocol. It is important to note that this would require updates 256 times faster to follow the chain accurately.

Challenge period delays

Another issue Zipline faces, as well as other fault-proof-based systems, is the challenge period delay. Before an update is accepted, it must undergo a period during which anyone can observe and report fraud. This time must be long enough to allow for verification and to include a transaction showing fraud. The cost of a denial-of-service attack to prevent the inclusion of a fraud-proving transaction must be greater than the value secured by the bridge.

Balancing this period length is tricky as it hinges on factors like gas price, chain congestion, and the value at stake. Most systems, including Zipline, adopt a standard seven-day period, which may be too long for some users, such as traders pursuing DeFi arbitrage opportunities.

The good news? Zipline allows for fast exits in certain cases, such as token swaps. Any offchain observer can know if the system is committing fraud, allowing liquidity providers to front funds to bridge users, knowing they will receive their tokens within seven days with no additional risk. LPs can even begin to charge fees for their service, opening up new earning opportunities.

Moving forward

As we gear up to further develop Zipline, our focus is on addressing these concerns. Our primary goal is to switch Zipline to follow the full Casper consensus protocol rather than the light-client protocol.

This shift should allow us to develop a cost-effective and user-friendly token bridge based on the Zipline block header relay with minimal extra cost, as all of the computation and data remain offchain. Implementing a Casper consensus protocol would also help mitigate potential attacks, as it inherits the same economic security as the originating chain.

This shift to the full consensus protocol will get coupled with an effort to fine-tune the challenge period delay. We are considering several factors, including gas price, chain congestion, and the value at stake, to strike the right balance. While the current standard is seven days, it could potentially be much shorter. We want to ensure the system is user-friendly without compromising security or integrity.

Another area of focus is data availability. Fraud proofs require all input data to have guaranteed availability so that anyone can replicate the computation. This requirement creates a significant amount of data for each update, which, if persisted using call data, can be gas expensive. As a solution to this problem, we have proposed a system where the data is primarily provided by the originating blockchain, reducing the data needs and making Zipline significantly cheaper to run.

Sygma: Zipline’s role on the road to trust-minimization

As a trustless bridge protocol, Zipline has the potential to greatly enhance the functionality and efficiency of the Sygma interoperability protocol. By enabling the execution of Ethereum's Casper finality protocol offchain and verifying it onchain, Zipline can provide a trustless bridge between Gasper-based chains and EVM chains, reducing the resource and computational requirements for Sygma.

This opens up more opportunities for seamless interactions and transactions across various blockchain platforms, enhancing Sygma's flexibility and interoperability.

Sygma contributors, including ChainSafe, are exploring the integration of Zipline into Sygma. Focusing on leveraging the Zipline protocol to facilitate the transfer of block headers from the Ethereum 2.0 blockchain to EVM chains, the team aims to improve the efficiency and trustlessness of the process.

The integration will also minimize the data needed for each update, making the system more cost-effective. By incorporating Zipline, Sygma will be better equipped to handle the increasing complexity and demands of cross-chain transactions and interoperability in the evolving blockchain landscape.

Gnosis Builders

This work is supported by a grant from Gnosis Builders, which has been instrumental in helping us address these challenges and continue to develop Zipline. Gnosis Builders is known for their commitment to investing in projects that enhance the accessibility and decentralization of the Gnosis Chain.

Their support will enable us to advance Zipline. And as we work towards a more interoperable, secure, and efficient ecosystem, we’re grateful for the support and the opportunity to contribute to the growth and potential of this transformative technology.

Community👥

Sygma connects you with the chains you want, making it possible to compose applications that work across EVM, Substrate, and Cosmos.

The strength of our project lies in our builder community. We're always looking for contributors, and Sygma’s modular architecture is designed to foster contributions and extensions.

Check out our documentation or GitHub to get started.

Have a question? Hop into our Discord
👋


Website | Twitter