Khata

Invoice financing for small Indian suppliers. A contract checks the e-invoice QR, investors pay USDT

ETHGlobal MumbaiShipped November 5, 2026 Shipping#payments#privacy#zk#infra
Visit Repo
Khata banner

About

Every B2B e-invoice in India is signed by the tax network, and the signed data sits in the invoice's QR code. A small supplier waits 60 to 90 days to be paid. An investor could advance the cash, but worries that the invoice is fake or edited, or that it was already sold to someone else.

Khata checks both on-chain. A contract on Whitechain verifies the RSA signature from the QR and lets each invoice be financed only once. The invoice becomes an ERC-20 note that only investors with a valid credential can hold. Investors pay in USDT, and the money goes straight to the supplier in the same transaction. At maturity the debtor pays the face value and the holders redeem.

Every wallet in the demo is a labelled demo wallet, and the full flow runs on invoices signed with a labelled "DEMO IRP (not government)" key. I built it on my own.

How it's made

The contracts are Solidity 0.8.30, built and tested with Foundry, on Whitechain Sepolia. KhataRegistry checks the NIC RS256 signature with OpenZeppelin's RSA library (it uses the modexp precompile) and binds each invoice's nullifier once. AttesterRegistry holds the accepted attesters, credentials and revocations. KhataFactory creates one KhataNote, an ERC-20, per invoice. The note enforces the transfer rule itself: the receiver needs a valid credential, and nothing moves after maturity. Funding pays the prize USDT to the seller and delivers the notes in one transaction.

Arkiv (SDK 1.0.1, Rabdi testnet) holds credentials, revocations, marketplace listings and an attester heartbeat. The app reads them, but Whitechain cannot read Arkiv, so every credential is a signed message that the note contract checks again. Whitechain never has to trust Arkiv.

The front end is Vite and TypeScript with viem. Reads go through Anon-RPC's browser harness, over Tor with Nym as the fallback. The tests are Foundry for the contracts, 141 browser tests, and a live Playwright test that runs the whole lifecycle on the real chains. The demo wallets' keys stay on a small signer on the server, and the page never holds them.

There is also an optional zero-knowledge path. bindInvoiceZk accepts an UltraHonk proof (a Noir circuit, proved with Barretenberg in the browser in under 15 seconds) that a genuine NIC token with a given nullifier, value and seller exists, without revealing the tax IDs or the document number. It produces the same nullifier as the plain path, so an invoice can't be financed once through each. I treat it as a working experiment: the Noir dependencies it uses are unaudited.

From the public ETHGlobal showcase 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?

ShippingLast push 27 days ago

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.