project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

zkmap

Developed a unique proof-of-location system allowing users to verify their presence in a designated area without fully revealing their exact location.

zkmap

Created At

ETHGlobal Istanbul

Winner of

trophy

The Graph - Best New Subgraph 🥇 Grand Prize

trophy

Arbitrum - Pool Prize

Prize Pool

trophy

Scroll - Deploy on Scroll

Prize Pool

trophy

Scroll - Best on Scroll

trophy

Push Protocol - Push Chat Conditional Gating Integration for DApps

Project Description

Proof-Generation Mobile App:

This part of the application allows users to create "proofs" of their location. Users can view their past proofs on a map, providing a visual history of their verified locations. The app features QR code scanning, enabling users to generate location proofs specific to the application they wish to use. This is particularly useful for services requiring location authentication. Chat Application:

Based on the proofs generated, users within a certain area can access designated chat rooms. This feature is not only for social interaction but also serves as a platform for localized communication and networking. Versatile Use Cases:

This proof of location system opens up a multitude of applications: Event Attendance Verification: At events, users can generate a single proof to mint Proof Of Attendance NFTs. Geographical Restrictions: Users can prove they are outside certain geographical boundaries, like being outside the USA, which can be crucial for accessing specific launchpads or services. Legal and Security Applications: In criminal investigations, suspects can prove their absence from a crime scene at the time of the incident. Emergency Services Integrity: During disasters, like the earthquake in Turkey, the system can prevent malicious misuse of emergency services through fake calls, ensuring help reaches those actually in the disaster zone.

How it's Made

At the heart of our project lies the assumption of trusted hardware, which provides us with signed location data. We utilize these signed locations in various zero-knowledge (zk) circuits. The first circuit we developed simply takes the signature and GPS location, checks if the trusted hardware has signed this location, and then generates a proof.

We then use the proof generated by the first circuit in another zk circuit to determine if the point is inside a specified polygon. For this, we employed the recursive proof system offered by the Noir language, allowing us to use the proof from the first circuit in various applications to check whether a point is inside or outside of a designated polygon. For instance, the same initial proof can be used to verify whether we are outside the USA border or within the boundaries of Istanbul. Both circuits were developed using the Noir language.

For compiling and creating these circuits on backend or frontend sides (and potentially on mobile in the future), we used NoirJS and Barretenberg libraries. These enabled us to generate intermediate proofs and use them in our recursive proofs.

We securely stored the generated proofs and public inputs on the blockchain using Solidity code. Here, we worked with EVM networks like Ethereum, Polygon, Mantle, and Scroll. For deploying and testing contracts, we utilized the Hardhat tool.

After creating the contract, we used The Graph's subgraph infrastructure to easily access this data for various queries and arithmetic operations. By maintaining various relationships on our data, we could efficiently utilize the Conditional Gateway feature of the Push Protocol. Additionally, this querying feature allowed us to provide feedback to users on the app, such as their total distance traveled and the areas they have been in the past.

Additionally, in our mobile application, we integrated a quick login system using WalletConnect.

Having established the Proof of Location infrastructure, we decided to demonstrate one of its use cases by developing a private group chat program using the Conditional Gateway technology provided by the Push Protocol. With a condition set under our domain, we could check whether users had proofs of being in a specific area and grant access to private chat rooms. Furthermore, we developed a room creation editor where individuals can easily draw an area on a map and create rooms accessible only to those within that area, facilitated by our QR system.

background image mobile

Join the mailing list

Get the latest news and updates