Click on the image below to watch a demonstration of TruScore in action:
TruScore is the privacy first reputation score generated using on-chain data of the user while keeping the user's identity private.
It's an implementation of the https://onchainscore.xyz/ but with the following differences:
- It doesn't disclose the EVM addresses of the user.
- It doesn't disclose the social handles of the user like twitter,lens, github etc.
- Creates a dynamic NFT which will be minted to the user's choice of wallet.
Everyone has several addresses or social handles which they want to keep private. But keeping them private makes it hard to get a good reputation score.
The flow of generating a reputation score is as follows:
- User connect their wallet.
- User ask to generate a score for a given address (0xabc) by signing a message with the same address(0xabc) ensuring the ownership of the address.
- TruScore fetches the reputation using the onchain score api for the requested address.
- TruScore generates a dynamic NFT with the score and mints it to the user's choice of wallet.
- User connects their public address (megabyte.base.eth) and generate a profile if (101)
- User add their private address (0xabc)
- Now, the user needs to switch their wallet for signing to prove ownership of the wallet address.
- After signature generation, a commitment and nullifier will be generated on the client and nullifier will be stored in the local storage.
- The commitment hash will be stored in a Merkle tree, and the root of merkle tree will be stored on Smart Contract.
- When a user request to update their onchain score, they will be requested to prove that they own any one of the linked wallet address(s).
- The zk proof will be generated using circuit build with Noir. The circuit will verify the merkle root and generate proof.
- The NFT will be minted after verification of the proof to the public wallet.
makenargobb
- Clone the repository
- Run
make compile-cirto compile the circuits - Run
make execute-cirto execute the circuits with the given inputs in./circuit/Prover.toml - Run
make gen-proofto generate the proof - Run
make gen-vk-solto generate the verification key for solidity - Run
make gen-verifier-contractto generate the verifier contract


