We're building a dApp based on identity registries that use STARKs (that's why we're using Cairo) to verify identity features.
First, you log in with the Torus open login system to have a smooth and easy onboarding. Then, you have to verify your identity through a KYC process. The KYC provider can then add the user information encrypted by the user to a
In our example, a user wants to prove to a train ticket booking company that they're eligible for a discount. To make sure they're eligible, they execute the Cairo program checking the registry and verifying that the person is actually eligible. Proof is then sent to the prover while programs output will be sent to a smart contract. Based on the Cairo program hash and outputs, we can now compute a fact that can be verified by the prover.
If the prover confirms that the fact is actually one, then the person would have confirmed they are eligible for a discount and proceed to the payment.
We used a Golang backend to handle registries (with a MongoDB database) and the API used by the webapp. We built a React+Tailwind webapp that uses the Torus open login system.
The workflow in details:
Generating an identity through the webapp with several identity features.
Adding the identity to the registry
Proving the registry
When a user tries to prove their identity feature, generating a proof and sending it to the prover
We compiled all the details about this workflow in a Readme: https://github.com/Blockchainpartner/scaling-hackathon-backend/blob/main/readme.md
We're very proud to have successfully used a Cairo program for this project. We had no previous experience on Cairo and it felt a bit difficult to handle at first but we managed to design a solid solution that works well!
All code repositories used are public and available here: