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

Permissionless is a conference for founders, application developers, and users. Come meet the next generation of people building and using crypto.

recent research

Research Report Templates (1).png

Research

Solana Mobile is a highly ambitious foray into the mobile consumer hardware market, seeking to open up a crypto-native distribution channel for mobile-first applications. The market for Solana Mobile devices has demonstrated a phenomenon whereby external market actors (e.g. Solana-native projects) continuously underwrite subsidies to Mobile consumers. The value of these subsidies, coming in the form of airdrops, trial programs, and exclusive NFT mints, have consistently covered the cost of the phone and generated positive returns for consumers. Given this trend in subsidies, the unit economics in the market for Mobile devices, and the initial growth rate and trajectory of sales, it should be expected that Solana mobile can clear 1M to 10M units over the coming years. As more devices circulate amongst users, Solana Mobile presents a promising venue for the emergence of killer-applications uniquely enabled by this mobile-first, crypto-native distribution channel.

article-image

Mt. Gox has made decent headway with repayments, but they could ramp up from here

article-image

Firm known for crypto hardware wallets set to bring another touchscreen option to consumers

article-image

Plus, BlackRock’s BUIDL is paying out steady yield — and those dividends are growing

article-image

Solana’s biggest liquid staking provider takes a meaningful step towards restaking

article-image

BLAST token skids as Season 2 points plan earns mixed reviews

article-image

Plus, a look at the top asset-gathering ETH ETFs after two days of trading