project screenshot 1
project screenshot 2
project screenshot 3

ZKAttestify

We are making a developer tool that creates ZKP of the attestations from EAS . We are trying to use the RISC Zero ZKVM for proof generation and verification.

ZKAttestify

Created At

Superhack 2024

Winner of

Worldcoin - Pool Prize

Prize Pool

Project Description

This project addresses a problem description given by the EAS team regarding their developer tool track. We developed a web application that utilizes the RISC Zero VM to construct a Zero Knowledge Proof of the attestation data, based on the attestation UID. The generation and verification of proofs are performed by the user's local system.

How it's Made

This project utilizes the RainBow Wallet SDK to connect the wallet widget. This project utilizes the viem and wagmi frameworks to establish a connection between the wallet state and the frontend, which is developed using JavaScript. This project aims to solve a problem described by the EAS team about their developer tool track. Utilized World ID as evidence of human engagement. The EAS SDK is utilized to extract the attestation data by using the UID of the attestation. The attestation data is encoded using the ABI format and does not include any information about the structure or appearance of the fields in the schema. We utilized the schema id within the data to extract the schema format. Additionally, we performed abi decoding on the attestation data and established a one-to-one mapping of the fields to the decoded data. This allowed us to generate a Json file containing all the field names and their corresponding values. The Json file is now stored on the user's local storage using a node.js server. The RISC ZERO VM "Host" (src/main.rs) reads the saved JSON and handles all the public data. It creates an environment for the Groth16 Prover, which proves the field names without revealing the field values. This is done using the ELF Binary generated by running the Guest (methods/guest/src/main.rs), which handles all the computation part of the proof generation. The program extracts the field names from the JSON string obtained from the environment produced by the "Host". It then builds a Merkle root using the SHA256 hashing method and creates a struct that includes the hash of the Merkle tree and the field name. Finally, it commits this data structure to the Journal, which handles the publicly shared out. The guest program is compiled to an ELF binary. The executor runs the ELF binary and records the session. The proof is now generated by the prover using a distinct hash of the field names. The prover checks and proves the validity of the session, outputting a receipt. Anyone with a copy of the receipt can verify the guest program's execution and read its publicly shared outputs

background image mobile

Join the mailing list

Get the latest news and updates