Z

ZkLoan

Quickly verify your eligibility without having to share most of your data. A complete ZK algorithm from scratch based on Garden Path Trajectory making use of Merkle trees.

The problem ZkLoan solves

In the current scenario, we are aware of phishing scams, we are aware of targeted advertising, and marketing which are at times very annoying. This is generally the case when we tend to share more than required information online with third-party companies. These third-party companies then either use this data for their needs or sell it to other companies.

Along with that, it is often seen that people find it intimidating to share most of their personal information for regular trivial tasks. Hence, it was here that was needed a solution that would get the job done using personal information yet no one gets to know about it.

Using ZKPs this thing gets done. Built directly into the NEAR Protocol, the algorithm is fast and verifies a user's personal information in seconds. This is done by using a Merkle Tree Data Structure using a SHA256 hashing algorithm. The path derived from this tree is our solution to the problem of privacy. Having a valid path generated from a witness which varies as per condition is what convinces the verifier about the user's data. The verifier, however, has no clue what the initial data was as the prover shares only an encrypted tree path.

This is a small effort to develop ZKPs on NEAR Blockchain to tackle the issue of privacy on a fast network. The algorithm is built on a smart contract that is accessed from the frontend. Once the data is verified and the user knows whether he/she is eligible or not, they can choose to store their eligibility status on-chain or not.

Challenges I ran into

  1. Inadequate documentation for a relatively new tech stack.
  2. Developing a ZeroKnowledge algorithm from scratch and deploying it on-chain.

Discussion