Relic Protocol ports all of Ethereum’s data to layer-2

Starting with zkSync, Relic’s zero-knowledge proofs let smart contracts access historical data without intermediaries

article-image

Dragon Claws/Shutterstock modified by Blockworks

share

Data recorded on the blockchain is often perceived as everlasting, and in many ways, it is. Ethereum, for instance, is expected to operate for as long as the internet exists. Every piece of data in every block is publicly accessible, forming a continuous chain from its genesis in 2015 to the present — 18+ million blocks later.

But when it comes to smart contracts, only the previous 256 blocks — less than an hour of data — are accessible.

Accessing all of Ethereum’s historical data relies heavily on platforms like Etherscan, which indexes the data off-chain, and oracles like Chainlink. While these are essential tools, they require users to trust the data providers.

Relic Protocol, developed by blockchain security firm ChainLight, instead offers a trust-minimized way for smart contracts to call upon Ethereum’s vast history, replacing platforms with pure mathematical precision.

V2, which launched today, will now bring that data to other blockchains as well, starting with zkSync Era.

“We’re trying to build the building blocks for the app developers to build on top of,” Brian Pak, ChainLight’s CEO, told Blockworks.

Bayo Akins, who handles business development at zkSync developer Matter Labs, noted that Relic is the first oracle provider on zkSync to use zk-SNARKs as part of their oracle design.

“This deployment not only improves data accessibility and cost-efficiency in the Ethereum scaling ecosystem but also provides developers with the tools they need to innovate and operate trustlessly,” said Akins.

Relic Protocol enables access to the data on-chain thanks to zero-knowledge proofs, removing the need to trust traditional oracles. It stores historical data in a compressed format, allowing developers to prove certain past facts. For example, a user can verify Uniswap pricing for a specific token from a year ago — all within a smart contract — without needing to push that data on-chain from an oracle.

This could be a boon for applications like borrowing and lending markets. Historical price volatility data could be used to tweak lending parameters trustlessly, minimizing the need for governance involvement.

That’s not possible today. Ethereum’s smart contracts, by design, depend on third-party data sources to access older data, due to the so-called “BLOCKHASH” operation in the Ethereum Virtual Machine (EVM).

The reason for the 256 block lookback period is largely pragmatic: Maintaining the hash of every block ever produced would require substantial and ever-growing storage requirements on every Ethereum node and would be detrimental to the system’s scalability and performance. 

If a smart contract needs access to data from blocks older than that, the workarounds available require trust assumptions and can be costly.

Ethereum’s history has shown the status quo is not ideal. For instance, DeFi protocols have suffered hundreds of millions of dollars in losses due to oracle manipulation attacks.

Similar approaches

Other teams have set out to tackle the same problem.

At the StarkWare Summit in San Francisco, Herodotus, a startup working on storage proof technology, today debuted an “on-chain accumulator” which uses STARK proving and will also make historical Ethereum data accessible on Starknet.

By early October, the whole history should become verifiable, according to StarkWare.

“It’s an innovation that is sorely needed to bring Ethereum in line with the principles of transparency and accessibility that are so central in blockchain communities,” said Kacper Koziol, co-founder of Herodotus.

Starkware president Eli Ben-Sasson noted that the work by Herodotus will boost layer-2 usability and transparency.

“When we started scaling on layer 2, we said to ourselves that this is going to lead to all sorts of out-of-the-box ideas that we can’t yet envisage, and it’s so exciting to see this happening,” he said in the statement. 

A ChainLight spokesperson noted Herodotus is also working on zkSync support.

Fairer airdrops

On the identity front, the Relic Protocol can facilitate the creation of an account’s reputation based on its past interactions with the blockchain. 

That can come in handy for prospective DAOs looking to distribute a governance token using an airdrop scheme. Currently, developers have to use an Ethereum archive node to take a snapshot in time and determine which accounts interacted with a given protocol or had a certain token balance.

From that, they typically build a Merkel tree to determine how many tokens a given account qualifies for, and finally deploy an airdrop contract with that Merkel tree root. Users then connect and provide a Merkel proof to receive their tokens.

Trust is required each step of the way; the archive node or the person deploying the airdrop contract could maliciously corrupt the data in a way that’s hard to detect, ChainLight’s chief technology officer Andrew Wesie said in a presentation last month.

Relic saves those steps. “Instead they just call into Relic to verify that the account should be eligible for the airdrop,” Wesie said, who pointed to the use of a storage or transaction proof, for instance.

“So it’s really about taking something that used to require off-chain centralized trusted service and instead of bringing it on-chain and doing it in a way that is trustless,” he said.

ChainLight envisions a world where the benefits of both Ethereum and zkSync can be seamlessly integrated, offering developers the best of both worlds, and without sacrificing decentralization. Through an open-source SDK, developers can access circuits and smart contracts.

Like Herodotus, ChainLight has plans to extend support to more chains.

“Ultimately, this is not just enhancing options on zkSync Era to meet the differing needs of application developers, but it will open the path for new use cases to be created,” Matter Labs’ Akins said.


Start your day with top crypto insights from David Canellis and Katherine Ross. Subscribe to the Empire newsletter.

Explore the growing intersection between crypto, macroeconomics, policy and finance with Ben Strack, Casey Wagner and Felix Jauvin. Subscribe to the On the Margin newsletter.

The Lightspeed newsletter is all things Solana, in your inbox, every day. Subscribe to daily Solana news from Jack Kubinec and Jeff Albus.

Tags

Upcoming Events

Salt Lake City, UT

MON - TUES, OCT. 7 - 8, 2024

Blockworks and Bankless in collaboration with buidlbox are excited to announce the second installment of the Permissionless Hackathon – taking place October 7-8 in Salt Lake City, Utah. We’ve partnered with buidlbox to bring together the brightest minds in crypto for […]

Salt Lake City, UT

WED - FRI, OCTOBER 9 - 11, 2024

Pack your bags, anon — we’re heading west! Join us in the beautiful Salt Lake City for the third installment of Permissionless. Come for the alpha, stay for the fresh air. Permissionless III promises unforgettable panels, killer networking opportunities, and mountains […]

recent research

AERODROME TEMPLATE.png

Research

Aerodrome is a "MetaDEX" that combines elements of various DEX primitives such as Uniswap V2 and V3, Curve, Convex, and Votium. Since its launch on Base, it has become the largest protocol by TVL with more than $495M in value locked, doubling Uniswap's Base deployment.

article-image

Plus, Imran Khan’s intriguing experiment on the speeds of crypto onramps

article-image

The SEC has signaled a timeline to issuers that could lead to a July 23 launch for the ETH funds, people close to the process told Blockworks

article-image

PayPal has unequivocally made a name for itself as a crypto adopter among fintech giants

article-image

Also, a look into how the highly-debated SAB 121 could end up shaking out for crypto custodians

article-image

Vance, an Ohio Republican, is largely seen as crypto-friendly

article-image

Plus, all the world is green as prices across the crypto space rally, with solana reaching a nearly two-week high