Smart Contracts

Smart contracts of DApps on Galactica are based on the Ethereum Virtual Machine (EVM). So developers can utilize the same libraries, frameworks and IDEs as on Ethereum.

This part of the documentation focuses on how to integrate Galactica specific features into smart contracts.

ZkKYC Integration

Integrating zkKYC in a DApp can be achieved by the following steps:

    1. Check on-chain consistency. Because the ZKP itself has no access to the outside world, the consistency of it's parameters needs to be checked against the on-chain state. The public inputs of the ZKP disclose these parameters. This includes the root of the Merkle tree that supposedly includes the user's zkKYC, public keys of the fraud investigation institutions, and custom selective disclosures.

  1. After checking the points above for compliance with zkKYC, the user can proceed with the DApp logic.

Example DApp

The zkKYC repository includes an example smart contract DApp that you can use as a reference. It implements an airdrop use case that requires a zkKYC and age proof from recipients.

Last updated