๐ŸŒณRoot Contracts

This page lists system level smart contracts and explains their role on Galactica.

The overview of addresses in the testnet can be found in Additional resources.

ZkCertificate registry contract

Implementation

The ZkCertificate registry contract holds the information about issued ZkCertificates. Each ZkCertificate is added as a hash to a Merkle tree and is revoked by setting this hash back to the default empty value. The current root of the Merkel tree is stored for verification of Merkle proofs.

Verification SBT contract

Implementation

The verification SBT contract stores successfully completed ZkCertificate verifications. A mapping indexed by the hash of user address and DApp, contains information about the SBT, such as the expiration date and encrypted notes for the Fraud investigation process. Each verification SBT also has a tokenID and information can also be found using this tokenID.

Reputation Root Contract

The reputation root contract is smart contract interface to Galactica's reputation module. Users and DApps can define Reputation functions and configure Contingent Transactions.

First version still in development.

ZkCertificate Guardian Whitelist contract

Implementation

The ZkCertificate Guardian Whitelist contract manages which ZkCertificate Guardians are authorized to issue ZkCertificates.

It is meant as simple first solution to gather feedback. In the long term it will be replaced by a decentralized system based on reputation.

Example zkKYC AgeProof contract

Implementation

This smart contract contains the on-chain verification of a ZKP proving that the holder has a valid zkKYC and that the age is >=18. It demonstrates what verification steps are required to check that a ZKP is consistent with the on-chain state. It integrates the Example ZKP verifier contract.

Example ZKP verifier contract

Implementation

The ZKP verifier contract contains the logic to verify if ZKPs are valid in themselves given the zero-knowledge circuit it is based on. This contract is auto generated from the circom2 circuit.

Example fraud investigation institution

Implementation

A simple contract stating an institution's public encryption keys.

Example DApp contract

Implementation

The example DApp contract shows how to integrate zkKYC. The example mints a Verification SBT for user successfully proving that they are real and unique humans. The uniqueness of the user is based on the DApp specific HumanID.

Airdrop use case example with KYC, age check + fraud investigation

Implementation

The example DApp contract shows how to integrate zkKYC. The example use case airdrops tokens to users proving that they are real and unique humans. The uniqueness of the user is based on the DApp specific HumanID. So every user can receive the airdrop of a token only once.

Wrapped GNET

Implementation

Wrapping GNET as ERC20 token equivalent to WETH on Ethereum.

Poseidon Library

This is a library smart contract that provides the poseidon hash function to the zkKYC registry contract.

Example zkKYC contract

Implementation

This smart contract contains the on-chain verification of a ZKP proving that the holder has a valid zkKYC. It demonstrates what verification steps are required to check that a ZKP is consistent with the on-chain state. It integrates the Example ZKP verifier contract generated from the associated ZK circuit.

RepeatableZKPTest contract

Implementation

This smart contract can be used for testing the ZKP submission. It checks that the ZKP and the zkKYC used for it are valid. After successful validation, a verification SBT is issued in the Verification SBT contract.

Devnet Guardian contract

Implementation

This contract issues zkKYCs on devnet for testing. It has the same interface as the #zkkyc-registry-contract and can be used by everyone. The sender of the transaction does not need to be on the #kyc-guardian-whitelist-contract.

Last updated