> For the complete documentation index, see [llms.txt](https://docs.nearby.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nearby.finance/protocol-layers/proof-of-location-location-layer/how-it-works.md).

# How It Works

### The Verification Process

The Proof of Location Layer follows a structured process designed to verify physical presence while minimizing information exposure.

Instead of transmitting raw location data, devices convert verified location signals into cryptographic proofs.

### Step 1: Signal Collection

The device gathers multiple sources of location-related information.

These may include:

* GPS and GNSS signals
* Network positioning data
* Device motion information
* Temporal consistency measurements
* Environmental observations

Using multiple signals reduces dependence on any single source and improves resilience against spoofing attempts.

### Step 2: Device Validation

Before proof generation begins, the protocol verifies that the request originates from an authentic device environment.

This validation process relies on device attestation and secure hardware mechanisms.

### Step 3: Trusted Processing

Location signals are processed within a Trusted Execution Environment.

Sensitive computations occur inside a protected hardware boundary isolated from the broader operating system.

This helps ensure that collected signals have not been modified by malicious software.

### Step 4: Rule Evaluation

The system evaluates whether the user satisfies the required geographic condition.

Examples include:

* Inside a city boundary
* Within an event perimeter
* Located in a specific region
* Present within a reward zone

The evaluation occurs before proof generation.

### Step 5: Zero-Knowledge Proof Generation

The validated location result is encoded into a zkSNARK circuit.

The circuit generates a cryptographic proof that confirms the location condition is true without revealing the underlying coordinates.

### Step 6: Proof Submission

The resulting proof can be:

* Stored locally
* Shared with applications
* Submitted on-chain
* Used to access Nearby services

Only the proof is transmitted. Raw location data remains under user control.

### Step 7: Verification

Applications, smart contracts and protocol services verify the proof through cryptographic verification.

Verification confirms the claim without requiring access to sensitive location information.

### End Result

The outcome is a verifiable location assertion that preserves privacy while maintaining trust.

Users prove where they are without revealing where they are.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nearby.finance/protocol-layers/proof-of-location-location-layer/how-it-works.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
