Basics
Relic Protocol was built to give on-chain applications easy trustless access to all historical Ethereum state, including account balances, storage slots, log emissions, and more. All of this data is easy to access with an archive node or on Etherscan, but it is difficult to access trustlessly on-chain due to limitations of the Ethereum Virtual Machine (EVM). Relic Protocol was designed to simplify this data access, making it easy to build novel applications taking advantage of this wealth of new data.
How it works
Ethereum block headers cryptographically commit to all state contained on-chain at that block. This state is either directly in the block header, or in a data structure called a Merkle-Patricia Trie (MPT) whose root is stored in the header.
What this means is that all state can be trustlessly verified using a cryptographic proof. Specifically, verifying any piece of data requires only the block header and a reasonably short “witness” string, and is efficient enough for some use-cases to be done entirely on-chain.
One minor issue is that verifying the legitimacy of a block header on-chain can be difficult. The EVM BLOCKHASH opcode only provides access to the most recent 256 block hashes, so older blocks require more clever verification techniques (e.g. zk-SNARKs).
Relic Protocol simplifies state proof verification for on-chain applications while remaining completely trustless. Trust is rooted in an on-chain cache of all historical block hashes, which are verified using a simple zk-SNARKs circuit and compressed into Merkle trees.