Kloak

Settle Privately. Disclose Selectively.

About

## Wave 1 submission

Kloak is a privacy-first system for grants, payroll, access control, and institutional distributions built natively on Aleo's zero-knowledge execution model. Complete end-to-end flow: distribution creation, private applications, ZK eligibility verification, and distributor review.

LIVE: https://kloak.vercel.app/

>> CORE PRIVACY ARCHITECTURE

  • Aleo ZK programs for eligibility verification
  • Client-side encrypted submission
  • Wallet-based identity (no accounts/PII)
  • Eligibility proven cryptographically without revealing data
  • No public applicant lists or funding trails

>> ALEO INTEGRATION & ZK PRIMITIVES

Eligibility Verification (eligibility.aleo)

  • Leo program verifies contribution count and join-date thresholds
  • Uses Aleo's native ZK execution
  • Private inputs (actual metrics) stay encrypted on-chain
  • Public inputs (eligibility rules) are verifiable
  • Generates SNARK proofs without exposing private values
  • Immutable verification (@noupgrade)

Program assertions:

- contribution_count >= min_contributions (private vs public) - joined_at < joined_before (private vs public)

Result: Distributors verify qualifications without learning metrics.

>> IMPLEMENTATION

Private Distribution Creation

- Multi-step wizard - Public eligibility rules with deterministic rendering - Deadline-based lifecycle

Private Application Submission

- Proposals: title, description, category, links - Clear UX separation between proposal and verification - Privacy disclosures throughout

Zero-Knowledge Eligibility Gate

- Dedicated verification step - Mock verifier simulates Aleo proof generation - Ready for direct Aleo SDK swap

Distributor Review

- View distributions - Review proposals and metadata - Check eligibility status - Preserve applicant anonymity

>> TECHNICAL ARCHITECTURE

Data Model

- ApplicationRecord: distribution, proposal, metadata, proof, status - DistributionRecord: metadata, rules, deadline-aware status - Designed for on-chain registry

Verification Layer

- Mock verifier behind stable interface - Ready for Aleo SDK swap - Isolated from UI logic

Frontend

- Next.js 14, TypeScript - Modular components - Clear layer separation

Aleo Layer

- Leo program defines eligibility constraints - Immutable verification - Extensible for multi-rule composable proofs

>> KEY VALUE

  • Eligibility proven without revealing metrics
  • No centralized visibility
  • No public traceability
  • Native ZK execution (not bolted-on)
  • Institutional compliance ready

>> ROADMAP

Immediate: Live Aleo proof execution

Near-term: On-chain registry, multi-criteria eligibility Long-term: Confidential distributions, selective disclosure, institutional integrations, Sybil resistance

>> WHY KLOAK ON ALEO

Legacy systems rely on trust and exposure. Kloak replaces both with cryptographic verification powered by Aleo's ZK architecture.

Private by default. Verifiable by design. Built for institutions.

## Wave 2 submission

In this wave, we focused on the actual technical implementation of a fully private distribution claiming system using Aleo. The goal was to build an end-to-end flow that allows users to claim grants without revealing eligibility data, allocation amounts, or claim linkage.

We implemented deterministic secret generation, Merkle inclusion proofs, nullifier-based replay protection, and private record minting, all verified on Aleo Testnet.

Full Claim Flow

1. Deterministic Secret Generation

Each eligible user derives a secret locally:

secret = hash2(address_field, distribution_salt)

This requires no database storage. The secret is deterministic per wallet and per distribution, meaning it can be recomputed anytime without being stored.

2. Commitment and Leaf Construction

We implemented BHP256 hashing fully aligned between Leo and the Aleo SDK. A key milestone was fixing canonical field encoding to ensure exact parity with Leo’s hash_to_field behavior.

commitment = hash1(secret)

leaf = hash2(commitment, payout as field)

After correcting the hashing implementation, we rebuilt the entire Merkle tree to ensure consistency.

3. Merkle Tree and Proofs

We constructed a depth-3 Merkle tree and generated inclusion proofs for eligible users. Proof reconstruction was verified directly in Leo using debug transitions to ensure the JS and Leo roots matched exactly.

4. Claim Transition

The claim transition performs:

* Recompute commitment

* Recompute leaf * Verify Merkle inclusion * Derive nullifier * Enforce single-use * Mint private Grant record

All validation happens inside Aleo’s zero-knowledge VM.

5. Replay Protection

We implemented nullifier-based replay protection:

nullifier = hash2(secret, merkle_root)

The nullifier is stored on-chain to prevent double claiming without revealing identity.

Aleo Integration

Program ID: kloak_distribution.aleo

Testnet Transaction: https://testnet.aleoscan.io/transaction?id=at1agzewr6u9allj3wcsxppeedvl5yzwgvkagx5kzsruynkef5rmuxqw2vg7d

Claims are executed using Shield Wallet. Proofs are generated client-side, and execution results in a private Grant record owned by the caller.

Live Claim Portal to Test:

https://kloak.vercel.app/claim

Technical Highlights

  • Canonical BHP256 hashing parity between Leo and SDK
  • Deterministic, stateless secret generation
  • Fully rebuilt Merkle tree after encoding correction
  • On-chain nullifier enforcement
  • Private record minting via Aleo

This system enables private airdrops, anonymous grants, DAO reward distributions, and confidential eligibility proofs all without exposing wallet lists, allocation data, or claim history linkage.

## Wave 3 submission

Kloak: Private Financial Infrastructure on Aleo

- Live Demo: kloak.vercel.app

- Program Deployment: https://testnet.explorer.provable.com/program/kloak_protocol_v5.aleo

The current update demonstrates two core features:

1. Private Campaign Distributions

Creators can distribute rewards to many recipients privately using Merkle trees. Recipients and payout amounts are not revealed on-chain. Campaign flow: - Creator creates a campaign with a Merkle root. - Creator deposits funds using credits.aleo. (public pool through transfer_public_as_signer) -. Eligible users claim rewards with a Merkle proof. (transfer_public_to_private)

Claim verification:

- secret → commitment - commitment → leaf - leaf + Merkle proof → reconstructed root

If the reconstructed root matches the campaign root, the claim is valid. Double claims are prevented using a nullifier derived from the secret.

- Test campaign creation at: http://kloak.vercel.app/campaigns - Test claiming at: http://kloak.vercel.app/claim Get the actual link from your campaigns page once you create a campaign IMPORTANT NOTE: While testing, the claim transaction may currently be rejected. This is expected. We are actively debugging the final payout step where funds are transferred from the program’s campaign pool to the claimer privately (similar to an escrow payout model)

2. Private Payment Links

Creators can generate private payment links and share them with clients. Clients can send private payments without revealing balances or transaction history. Payment links include metadata like title and description.

Flow:

1. Creator generates payment link. 2. Creator shares link with client. 3. Client opens link and sends private credits. (using transfer_private) 4. Creator receives private payment record.

Create payment links here http://kloak.vercel.app/payment-links Get the actual link (/pay) from your /payment-links page once you create a payment link. Example: http://kloak.vercel.app/pay/[id]

Technical Highlights

• Integration with credits.aleo for fund transfers • Deterministic secrets for private claim generation • Merkle proof verification inside Leo circuits • Nullifier mapping to prevent double claims • Browser-side proof preparation and verification tools

Current Status

- Merkle proof verification and claim validation are functioning correctly. - We are currently debugging the final payout step from the program’s campaign pool to the claimer (similar to an escrow payout model). - The proving through the Merkle tree works and has been verified.

~~ Guidance from the Aleo team on the recommended pattern for program held funds → claimer payouts using credits.aleo would be very helpful. ~~

Vision and roadmap

Kloak aims to become a full privacy financial layer for Aleo.

Core next components include:

- Selective Disclosure Prove payments to auditors without revealing full wallet history. - Automation Ready Programmatic APIs for bots and autonomous agents to handle financial workflows.

## Wave 4 submission

🔗 Important Links > Demo Video (Payment link creation, pay flow, and Telegram bot feature showcase side by side): https://youtu.be/b1AdffOf_PM > Full Changelog: https://github.com/M4N4N22/Kloak/blob/main/Wave4_Updates.md > Leo Program: https://github.com/M4N4N22/Kloak/blob/main/programs/kloak_protocol/src/main.leo > Updated Readme: https://github.com/M4N4N22/Kloak/blob/main/README.md > Live App: https://kloak.vercel.app > Create Payment: https://kloak.vercel.app/payment-links > Telegram Bot: https://kloak.vercel.app/bots > Webhooks: https://kloak.vercel.app/webhooks

🚀 Wave 4: Major Updates & Automation Hub This wave represents a strategic shift for Kloak, transforming it from a private payment tool into a fully automated ecosystem. We have focused on bridging the gap between Aleo’s privacy-preserving on-chain actions and real-world business workflows.

🤖 Fully Functional Telegram Bot (@KloakBot) We’ve launched a comprehensive Telegram "Control Center" that allows users to manage their financial privacy on the go. > Wallet Linking: Secure authentication via JWT tokens to pair your Aleo wallet with Telegram. > Interactive Inbox: View, manage, and track payment links via /inbox. > Instant Alerts: Real-time push notifications for payment successes and failures.

⚡ Webhook Integration System

Kloak now supports event-driven automation, allowing developers to treat Aleo payments as triggers for their existing tech stack. > No-Code Ready: Connect Kloak to Zapier, Make.com, or n8n to trigger Slack alerts, update Google Sheets, or unlock digital content post-payment. > Developer First: Manage multiple endpoints with unique signing secrets. > Secure Delivery: Payloads are secured with HMAC-SHA256 signatures to ensure authenticity.

💳 Enhanced Payment Infrastructure

> Stablecoin Expansion: Added support for USDCx and USAD, allowing users to avoid volatility while maintaining privacy. > Advanced Link Management: Links now support expiration tracking, sharing analytics, and bulk operations. > Privacy Core: Refined ZK-proof integrations to ensure selective disclosure, only the information you want to share is visible.

📊 Analytics & API 2.0

> Business Dashboard: A revamped UI providing deep insights into conversion rates, volume tracking, and geographic distribution. > RESTful API: A standardized API with consistent error handling and rate limiting, making it easier for third-party devs to build on top of Kloak.

🛡️ Architecture & Security

Backend optimized with Prisma refinements and connection pooling. The kloak_protocol_v6 Leo program improves status tracking. Campaign distribution remains on hold due to Aleo escrow limitations.

Note: The payment flow currently uses kloak_protocol_v5. While v6 builds successfully locally, it cannot be broadcast to testnet due to a consensus height mismatch caused by recent Leo breaking changes. Migration is pending updated documentation, and this has already been communicated via Telegram and Discord.

## Wave 5 submission

Detailed Wave 5 Technical updates: https://github.com/M4N4N22/Kloak/blob/wave5/wave5_updates.md Updated Root README: https://github.com/M4N4N22/Kloak/blob/wave5/README.md Updated Program README: https://github.com/M4N4N22/Kloak/blob/wave5/programs/README.md Updated Main Leo program: https://github.com/M4N4N22/Kloak/blob/wave5/programs/kloak_protocol/src/main.leo Product Walkthrough: https://youtu.be/3ka14-c_PEs Test USAD pay: https://kloak.vercel.app/pay/cmnvx9g5q000m38gqge936cuy Test USDCx pay: https://kloak.vercel.app/pay/cmnvw5b7j000f38gq9eamwly3 Test Proof Generation afterwards: https://kloak.vercel.app/compliance/generate

Wave 5 is where Kloak became a more complete Aleo-native private payments and compliance system.

This wave includes a major upgrade of the on-chain program and the surrounding product architecture. The protocol is now aligned to Leo v4.0.0, with updated syntax, refreshed program structure, and a clearer receipt-based design in kloak_protocol_v10.aleo. The program now supports payment requests and private settlement across ALEO credits, USDCx, and USAD, with payer and receiver receipts anchored directly in the Aleo flow. That gives Kloak a stronger base for private payments while also supporting stablecoin-denominated payment use cases inside the same system.

We also expanded the proof system significantly. Kloak now supports a fuller compliance lifecycle around wallet-held receipts, including proof generation, proof verification, revocation, portable proof packaging, and proof recovery when a payment succeeded on-chain but the app missed the final sync step. That recovery flow lets users reconstruct a proof-ready payment record from the original transaction hash and the wallet receipt instead of forcing a second payment.

A major Wave 5 improvement was verification. Kloak now uses a layered verification model that starts with proof package integrity, then checks public Aleo transaction references, and finally adds Kloak record status such as revocation and proof history. This keeps the Aleo chain as the primary trust anchor while still giving verifiers a clean product experience.

We also hardened the app across the API layer. Creator and compliance routes were updated to use signed access flows instead of trusting raw client-supplied addresses. Webhook management, payment recording, proof actions, dashboard data, bot data, and payment-link data are all more tightly protected now.

On the product side, Wave 5 upgraded payment links, the pay page, compliance UX, pricing, docs, trust pages, and support pages. Payment links now support templates, better post-payment behavior, clearer flow states, and a more production-ready payer experience. Compliance now has better verification UX, clearer sharing flows, and stronger recovery tools.

Thank you to Alex and the Aleo team for the consistent feedback throughout the buildathon. It helped shape and build the product in the right direction.

Prizes

  • Wave 5 grant · 1,304 USDT

From the public Akindo product page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

No public repo linked, so we can't tell.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.