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.

Tags

Upcoming Events

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

aptos cover3.jpg

Research

A fragmented liquidity landscape across L2s has led to newfound appreciation for predominantly monolithic L1 architectures over the past year, especially when considering qualifying capabilities like high throughput and low latency. Despite Aptos being a relatively young blockchain when compared to other L1s, a combination of design choices, network adoption, partnerships, and dApp development proves that the network is primed for breakout momentum over the coming years.

article-image

The number of “active users” is actually quite difficult to measure

article-image

The world’s largest asset manager sees BTC fund outflows for the first time, while the most money left Fidelity’s product

article-image

Binius operates over binary code and is designed to store information using bits

article-image

The Fed once again opted to not surprise markets on Wednesday, moving to hold interest rates

article-image

Celebrity crypto ads should only exist if they do something really creative or really silly — Eminem’s ad did neither

article-image

The profits were driven by interest earned on US Treasury holdings, as well as market gains on bitcoin and gold