Khoj Progress Update

Sep 21, 2025

ai devlog web3

Khoj is our platform for AI-powered, location-based treasure hunts.

Players solve riddles, visit physical locations, and earn onchain rewards. Each user receives a unique NFT upon registration, and completing hunts grants rewards recorded on-chain.

Since our MVP at ETHIndia β€˜24, we’ve significantly improved usability, stability, and the overall experience.

This milestone focuses on making Khoj more robust, secure, and fun β€” while staying true to our mission of building a Web2-native experience that seamlessly onboards users to Web3.

New Architecture

Khoj Architecture

πŸš€ Major Updates

1. Accurate Distance Algorithm


2. Teams: Secure, Decentralized, and User-Friendly

One of the most requested features during our pilot hunts was support for teams. Designing this was far from trivial:

The original Khoj design assumed solo-only hunts.We needed a way to let users form teams securely, without central storage, and without exposing sensitive invite codes on-chain.The final flow had to balance security, decentralization, and user experience.

After several iterations, here’s the final architecture we built:


πŸ” Smart Contract Responsibilities

The smart contract is the source of truth for teams.
It handles creation, membership checks, and validation when new members join.

struct Team {
    address owner;
    uint256 maxMembers;
    uint256 memberCount;
    mapping(address => bool) members;
}

mapping(uint256 => Team) public teams;
uint256 public nextTeamId;

Validation checks:

  1. Invite not expired (block.timestamp <= expiry).
  2. User not already in team.
  3. Team not full (memberCount < maxMembers).
  4. Signature must match the team owner:
    • Hash: keccak256("TeamInvite", teamId, expiry, chainId, address(this))
    • Verified via ecrecover().

This ensures only legitimate invites signed by the team owner are accepted.


πŸ“± Frontend Responsibilities

The frontend handles user interaction, invite generation, and QR code management, all without relying on a centralized backend.

Creating a team Creating a team

Team invite code &#x26; QR Team invite code & QR

A. Registration
B. Create Team
C. Generate Invite (Multi-use, Ephemeral)

⚠️ Invite is shown once only β€” never stored by backend or on-chain.

D. Join Team

πŸ‘‰ Detailed implementation: PR #59

Joining a team Joining a team

Team Details Team details after joining a team


3. LLM Upgrade: Claude β†’ Gemini 2.5


4. Custom NFT Images for Hunts


5. Hunt Creation UI

khoj_hunt_creation


6. Wallet & Onboarding

khoj_wallet_integration


7. Lit Protocol + IPFS Migration

Note: Lit seems to have a lot of reliability issues and we are considering migrating from the service and explore alternatives.


8. Backend Stability & Testing

Live link: khoj-alpha.netlify.app


9. Miscellaneous Improvements

We also pushed several smaller but important updates:

Hunts Discover Hunts

Hunt States Hunt States

Solving a Clue Solving a Clue

Successful completion of a hunt Successful completion of a hunt


πŸ“– Product Guide

We’ve also added a full product guide with screenshots and step-by-step instructions:

πŸ‘‰ Read it here

Covers:


🧭 Next Steps

We are also actively working on the landing page and other aspects of the product to make it the best in class.


πŸ”— Resources

That’s the progress so far πŸš€. If you’d like to try Khoj or give feedback, hop into a hunt and let us know your thoughts!