[Cycle 11] - Herodotus - Storage Proofs

Basic Details

Project name: Herodotus

Author name and forum name (please provide a reliable point of contact for the project): Kacper Koziol co-founder (@kacperkozi Twitter)

Optimism GovernanceForum: @kozi

E-mail address: kacper@herodotus.dev

L2 recipient address: 0x17C2D875CB397D813eAE817DaFD25807E348Df07

Which Voting Cycle are you applying for?: Cycle 11

I confirm that I have read the landing pages for the Builders 29 and Growth Experiments 29 Sub-Committees and that I have determined my proposal is best suited to be reviewed by the Builders Sub-Committee: [Yes/No]: YES

Project Details

What are you going to build?:

Storage-proof verifiers that will allow smart contracts deployed on Optimism to access current and historical Ethereum on-chain data in a trustless manner.

These codebases would allow anyone to verify any past or current headers, state, and storage values of contracts deployed on Ethereum to other contracts deployed on Layer 2 chains in a trustless manner.

Why is what you are going to build going to succeed?:

  • Smart contracts on Optimism do not natively have access to historical state data. Storage-proof verifiers would allow smart contracts to unlock a new dimension - time. There is a wide variety of applications that can be built on top of this, such as deadman switches and governance solutions that enable voting based on historical balances (such as SnapshotX).
  • Most current solutions for accessing data from outside Optimism rely on some off-chain attestation to prove the data is valid. Storage verifiers will enable on-chain verification that the data received is valid without having to trust a third party. (Exception: if your application is latency sensitive).

We believe that giving our technology into the hands of developers will unify the fragmented L1/L2 ecosystem and result in better and more secure applications.

Is your project likely to bring new builders to the Optimism ecosystem? If so, please describe how:

Herodotus can help to improve the accessibility and availability of data on the Optimism network. With the help of the developer tools and documentation to make it easier for developers to integrate. These tools and resources can help to lower the barriers to entry for new developers who are interested in building on the Optimism network.

We plan to build a community of developers and users who will help us to refine and improve over time. This community can serve as a resource for new developers who are just getting started with Optimism and can help to foster a sense of collaboration and shared purpose within the ecosystem.

Not only will we bring new builders to the Optimism ecosystem, but we will help retain existing builders as they will be able to build on top of projects found on different Layer 2s without exiting the Optimism ecosystem.

Is your project likely to improve the quality of developers in the Optimism ecosystem? If so, please describe how:

It is unlikely to directly affect the quality of developers in the Optimism ecosystem, however, making our tool available can enable developers to create more sophisticated on Optimism.

Is your project likely to improve the commitment of developers in the Optimism ecosystem? If so, please describe how:

We are aiming to help to attract developers who are looking for innovative solutions to address critical needs within the space. By providing smart contracts with the ability to access current and historical state data on-chain, Herodotus will unlock new use cases and opportunities for developers building on Optimism.

We have a long-term vision and are committed to building and growing over time. This long-term commitment can help to install confidence in developers considering building on Optimism and can help to ensure the continued growth and success of the ecosystem.

Provide us with links to any of the following for the project:

Who are your competitors?:

At the current stage, we don’t see direct competitors to Herodotus, who provide the exact same services. However, it’s important to acknowledge that there may be alternative solutions that developers could use instead of Herodotus to achieve similar results.

What differentiates you from your competitors?:

Overall, we are focused on reducing the complexity of working with storage proofs in an easy-to-use API. Furthermore, we believe that the unique combination of features and benefits provided by Herodotus - including the use of Storage Proofs and ZKProofs for increased security, the ability to access historical state data on-chain, and the tailored infrastructure for developers building on Optimism - sets it apart from other solutions and makes it a highly valuable offering for the Optimism ecosystem.

Will your project be composable with other projects on Optimism? If so, please explain:

Yes, Herodotus is designed to be composable with any project on Optimism, allowing devs easily integrate. We see ourselves as an important building block to enable true interoperability.

Team

Who are your founders?: Kacper Koziol, and Marcello Bardus,

What makes your founders well-positioned to accomplish your goals with this project (1-2 sentences on each)?:

Marcello: Previously worked at Nethermind and was a researcher at Geometry. Has a very strong technical background, particularly in zero-knowledge cryptography.

Kacper: Previously worked at Nethermind as a Software Engineer at Oiler Network. Has a background in economics and math. Is an advocate for cross-chain interoperability and privacy solutions.

Tell us about the rest of your team (if there are more teammates):

Maciej (Twitter): Maciej Sulecki is the lead backend engineer at Herodotus. With a background in computer science, Maciej has been passionate about blockchain since 2020. beeinger (Maciej Sulecki) · GitHub

Tiago (Twitter): Research engineer at Herodotus, focusing on applying zk to enable cross-chain data access. Has strong knowledge of Rust, Solidity and Cairo.

Is this your first Web3 project?: NO

If not, what else have you built? (Share links, Github repository, or any other useful information.):

The first implementation of the keccak hashing function in Cairo

Reading Ethereum State on Starknet

Storage Proof powered bridge between the post-merge Ethereum PoW chain and the post-merge Ethereum PoS chain

https://www.mergeswap.xyz/ https://github.com/marcellobardus/mergeswap-contracts

Merkle Mountain Ranges implementation in Cairo

Merkle Mountain Ranges in TypeScript using the Pedersen hashing function https://github.com/HerodotusDev/merkle-mountain-ranges

Herodotus API Demo (uses a similar style storage verifier but is Starknet specific)

I understand that Builders grants are subject to a 1-year lock-up, as explained further in this post 3: [Yes/No]: YES

Is your project funded? If so, provide an estimate of how many months of funding runway your project has:

YES, the project is funded by top investors such as Geometry and Fabric Ventures. We still have more than a year of funding runway.

Grant Request

What is the size of the grant request? (50k OP max):

50’000 OP

We plan to use 20% of this for incentives to get people building with the Storage Verifier. For the remaining 80%, Herodotus is not planning to sell the grant tokens(if granted). Instead, we intend to keep the tokens in a treasury, which will be used to fund ongoing development efforts and to support the long-term sustainability of the project.

How do you justify the size of the grant?

The requested grant amount is based on several factors;

  1. Technical complexity translates to higher development costs, as well as the complexity of integration and maintaining a specialized infrastructure. While the scope of this grant proposal outlined in the project details is simple, it will set the foundations for hundreds of different project use cases.
  2. Innovation, by providing a unique and valuable service to the Optimism ecosystem, filling the gap in the current offering for on-chain data access, adds significant value to the ecosystem and justifies the grant amount as a means of incentivizing the development.
  3. Impact. The ability to access current and historical on-chain data will have a significant impact on the development of Optimism, improving the quality and security of applications. This impact justifies the grant amount as a means of supporting the development of a tool that can provide lasting value to the ecosystem.

Roadmap

Describe in discrete steps your plan for accomplishing your project:

  • Develop the necessary infra to give smart contracts on Optimism access to on-chain data (current and historical) between Optimism <> Ethereum
  • Integrate Herodotus with projects on Optimism (deFi, DAOs, NFTs etc.). This will involve testing and ensuring full composability.

Overall the plan involves a combination of research, development, testing and integration with a focus on delivering reliable, secure and valuable tools for devs and users in the Optimism ecosystem.

Please provide any additional information that will facilitate accountability:(smart contract addresses relevant to the proposal, relevant organizational wallet addresses, etc.)

Does your plan depend on the receipt of OP tokens?: No

What is your plan for the use of the OP token after the 1-year lock-up?:

We intend to hold the tokens and participate in Optimism Governance.

Please define critical milestones for this project. Critical milestones are meant to show good-faith efforts to accomplish the project. Non-completion of these milestones could lead to the revocation of remaining grant rewards.

For the purpose of this proposal, we will build a sample project that allows a smart contract deployed on Optimism to verify a user’s ownership of DAI tokens on Ethereum. This project will use the Optimism Storage Verifier contracts to cryptographically verify that the balance is correct at two points in time. One that is recent (~15min old), and one that is much older (~3 weeks).

Optimism Relationship

Does your project solve a problem for the Optimism ecosystem?:

  • Security
  • Data-accessibility
  • Data-verification
  • Interoperability

How does your proposal offer a value proposition solving the above problem?:

We eliminate the need to trust off-chain third parties when accessing on-chain data which makes the applications that use our storage verifier secure.

We can enable access to historical data, which is currently very difficult to do from a smart contract level. This is huge for data accessibility, unlocking completely new use cases.

Storage proofs will allow applications on Optimism to access data from outside of Optimism, which means that in the future we will be able to support data access between Optimism and many more rollups. Interoperability for on-chain data is coming!

Why will this solution be a source of growth for the Optimism ecosystem?:

The storage verifier will allow projects to bring data to optimism which will help retain users. Allowing importing data from external sources will help with user retention as they can use their data, NFTs within the Optimism ecosystem.

How committed are you (and your team) to building on Optimism?:

Due to the nature of our business and the vision to re-unify the ecosystem, we will always need to maintain neutrality regarding the chains we work with. But by virtue of Optimism’s advantages and the attractive governance structure, we are more than committed to bringing storage proofs to Optimism as one of the first L2s in the ecosystem.

Is your project Optimism Native?: NO

Confirmations

I understand that I will be required to provide additional KYC information to the Optimism Foundation to receive this grant: [Yes/No]: YES

I understand that I will be expected to following the public grant reporting requirements outlined here: [Yes/No]: YES

9 Likes

Hey @kozi, giving you a heads up that this will be the formal comms channel with the grant council builders subcommittee, which consists of @jackanorak @kaereste @danelund.eth, and myself. We’ll make sure we’re around to address any questions you have in this process.

Will this project be a DAO. If not how will votes be decided in the future?

Analyse if you can request 10k OP (20% of the grant) to amplify the chances of being selected, and applying for future grants. Not mandatory.

Critical Milestones must be trackable, for example: “DAI history smart contract deploy on July 2023”

Benchmark milestones missing, for example: “10 forks in 1 year, or 100 users in 2 months”. Things you aspire to accomplish to show your contribution to the ecosystem but not critical to the functionality of your project.

For more on milestones link here

1 Like

Hello @Gonna.eth, I appreciate the feedback on our proposal and have taken it into consideration while updating our project milestones.

To address the governance structure, Herodotus will not be structured as a DAO. The decision-making process regarding votes on Optimism will be managed by the founding team, Marcello Bardus and myself (Kacper Koziol). We are committed to the long-term vision of the ecosystem and will actively participate in the governance process.

Please find below our proposed Benchmark and Critical Milestones:

Project Milestone Type Milestone Source of Truth Deadline
Herodotus Storage Proofs Benchmark Develop a proven off-chain compressor for historical Ethereum blockhashes HerodotusDev GitHub August 31, 2023
Herodotus Storage Proofs Benchmark Develop a circuit that accesses the compression accumulator - Merkle Mountain Range. HerodotusDev GitHub August 31, 2023
Herodotus Storage Proofs Benchmark Storage proof verification against hashes retrieved from the accumulator. HerodotusDev GitHub August 31, 2023
Herodotus Storage Proofs Benchmark Complete Herodotus codebases to support the Optimism chain. HerodotusDev GitHub October 31, 2023
Herodotus Storage Proofs Critical Project report on development, integration, and usage in SnapshotX. HerodotusDev GitHub October 31, 2023
Herodotus Storage Proofs Critical Complete detailed documentation of the developed Optimism codebases. docs.herodotus.dev & HerodotusDev GitHub October 31, 2023
Herodotus Storage Proofs Critical Integrate Herodotus with SnapshotX for usage on Optimism L2, completing Storage Proof elements. HerodotusDev GitHub & written confirmation from Snapshot team October 31, 2023

Please note that the given timelines include a buffer for potential roadblocks. We are confident in our ability to achieve these milestones faster than outlined above but wanted to be on the safe side with our deadline dates. All components of the grant will be completed by October 31, 2023.

Regarding the suggestion to decrease the grant size, we would like to emphasize that due to the significant company resources, we will spend on salaries for our current 12-person team and our commitment not to sell the tokens we are granted, we believe that the 50,000 OP token allocation is fair and will allow us to participate in shaping the Optimism ecosystem in the future. Our solution will drive considerable value to the Optimism ecosystem, help retain projects and developers, and unlock new application designs.

For the “Integrate Herodotus with SnapshotX for usage on Optimism L2” milestone, the source of truth will be the HerodotusDev GitHub and written confirmation from the Snapshot team stating they have received everything they need to complete their integration. Please note that SnapshotX going live in production on Optimism is dependent on engineering from the Snapshot team. Our milestone pertains to completing all necessary Storage Proof elements that the Snapshot team will require.

I hope this updated response addresses your questions and demonstrates our commitment to the Optimism ecosystem. Thank you for your consideration.

4 Likes

Yes, thank you.

Keep watch on the forum, more questions can come from other council members.

2 Likes

Hi there, Nathan from Snapshot here. I’d like to confirm that we plan on using Herodotus’ solution to facilitate voting on Optimism with tokens on L1. We believe that this can be a major unlock in terms of cross-chain governance and security for all DAOs on Optimism.

5 Likes

Hi, @kozi we are suggesting a few projects to consider lowering the requested OP grant size to improve the chances to finish on the top 10 of the final list.

Also if you have any demo apart from your docs where the API is working that would be great. Even if it’s not on Optimism.

The sooner your edits, the greater the chance they will be considered in the final review. We are looking to wrap up on Monday. Please tag me if you make any changes.

1 Like

Hello @Gonna.eth ,

We have a simple API demo demonstrating how storage proofs can be used to generate an inactivity proof for a starknet account. Storage proofs are generated for the accounts nonce at two distinct block numbers. As the nonces are the same at both times, these proofs could be used to trigger a deadman switch or other account recovery mechanism.

You can watch the short YouTube video demo from Starkware Sessions 2023 here: https://youtu.be/PZLjhUDG-NY?t=234 (the demo starts at 3:54).
The GitHub repository for the demo can be found at https://github.com/HerodotusDev/account-inactivity-proof.
This diagram might also give you some insight into how such a recovery process could look: https://twitter.com/HerodotusDev/status/1614172762108751874.
I think it is worth mentioning that even though we specified account abstraction wallets in that diagram, this would also be possible for an EOA! Maybe someone will build this in the future!

Regarding grant size, we firmly believe that the 50,000 OP token allocation is fair, considering the resources and team size we plan on dedicating to complete our proposed deliverables. The Snapshot integration is a common good as it will help in governance and help uphold the vision and values of the Optimism Collective :slight_smile:

3 Likes

Hello @Gonna.eth

We have successfully completed all of the required benchmarks for the cycle 11 grant.

Focusing on our deliverables, we have:

Develop a proven off-chain compressor for historical Ethereum blockhashes

This repository unlocks Ethereum historical block hash access for smart contracts. The codebase has also been Audited by ABDK.

Develop a circuit that accesses the compression accumulator - Merkle Mountain Range.

Our proposal was originally written in March 2023. Back then we thought that we will build this Merkle Mountain Range only with Poseidon. However, as we saw the efficiency of the Keccak256 built-in significantly improve, we decided to build two MMRs. One using Keccak and one using Poseidon. Because we have a MMR with Keccak, we decided to skip this part. We realized that it is much cheaper to verify an MMR proof against a root built with Keccak rather than verify on Optimism a Groth16 proof that proves to the valid verification of an MMR built with Poseidon. Ultimately, we have still achieved the same goal but with a different approach.

Storage proof verification against hashes retrieved from the accumulator.

This has been completed and the tests for this have been written.

https://docs.google.com/document/d/1Cr-nqwMQEa2jswIo6MdsO3bdZl-gnwFNAEwuy2zF6jk

Project report on development, integration, and usage in SnapshotX.

We have achieved feature parity between the Herodotus Cairo smart contracts and Herodotus Solidity contracts which would be needed by the SnapshotX team.

We have also built a Timestamp-to-Block Number Mapper in Solidity which Snapshot has specifically requested as a prerequisite for their deployment on EVM chains. The repository and corresponding documentation/research can be found here:

Complete detailed documentation of the developed Optimism codebases.

Completed.

https://docs.google.com/document/d/1Cr-nqwMQEa2jswIo6MdsO3bdZl-gnwFNAEwuy2zF6jk/edit?usp=sharing

Integrate Herodotus with SnapshotX for usage on Optimism L2, completing Storage Proof elements.

Pending Snapshot integration. All required codebases have been completed. This includes:

  • Ethereum Historical Block Hash Accumulator has been completed and audited by ABDK.
  • Timestamp-to-Block Number Mapper has been implemented in Solidity.
  • Herodotus on EVM has been completed (MVP, as we intend to optimize the codebase over the next few months)

Please let me know if additional information is needed.

2 Likes

HEy, thanks! are all critical milestones completed too?

Yes, all the critical milestones have been completed.

3 Likes

@kozi - I’m one of the members of the grants council evaluating your project milestones. Thanks for the update.

Can you provide an update on this last critical milestone?

  • Integrate Herodotus with SnapshotX for usage on Optimism L2, completing Storage Proof elements.

Hi here!

Super excited about this integration. Here is Fabien, founder of Snapshot Labs. I can confirm we’ve developed a solution on Starknet in collab with Herodotus to allow using data from L1 to calculate voting power on L2 using storage proof, both Snapshot X and Herodotus have developed the same codebase on EVM chains, we looking forward to work on the integration of Optimism.

2 Likes

Thanks for the update. This integration is a critical milestone and has to be completed for the grant to be marked as complete. Do you have an ETA for the integration?