Asli
Asli - you can't photocopy the proof
Created on 18th October 2026
•
Asli
Asli - you can't photocopy the proof
The problem Asli solves
In India, roughly one in five medicines sold is estimated to be counterfeit or
substandard (ASPA–CRISIL, "State of Counterfeiting in India", 2025; Deccan
Herald, 20 February 2026). Fake strips have real batch codes — they have been photocopied
Labels, with realistic printing. QR codes were made compulsory on the packs in 2023, but
the QR resolves to whoever printed the label, not to who vouches for the
And in the case of batch numbers, hospital pharmacies usually don't check. GLP-1 pens—quite a new kind of
counterfeit wave (Reuters, Apr 2026) — sell at ₹1,600 vs ₹13,000 offline;
There is no means for buyers to check before injecting.
Asli ("real") lets anyone — a patient, a pharmacist, a delivery rider —
Scan the batch code to see which individuals have actually signed for that batch on-chain.
You may photocopy the strip but not the proof.
Challenges I ran into
- Arkiv's query layer has no server-side ordering (no
orderBy); custody
Trails had to sort on the client side. This was the first problem. - A type-mismatched query predicate is silent:
eq("severity", str("2"))
Returning nothing when given ani32(friction #2). One shared
The fix consists of maintaining constructor discipline on both the read and write sides. - "Live" events over HTTP silently poll; a real socket needs a WebSocket
Transport and not a 'fromBlock' (friction #6). - The one that cost real blood: a "renew for 150 days" Lifetime Extension
against a batch whose creation pinned its printed expiry (2027) is a
shortening — and the engine correctly rejected it on-chain
(ExpiryNotExtended, friction #14). Solution: set renewal to the current expiry plus N days,
Read the atBlock() function then. This became a product rule in that every verified scan adds
30 days of life. - Plain string attribute values are a shared namespace on a shared testnet —
another team'stype = "registry"entities matched ours until we namespaced
Each type (such as 'asli.batch' etc.) is also filtered on it (friction #13). - The one that cost us most of submission day: pages froze for minutes and we
assumed "testnet stalls" — one render loggedGET / 200 in 180014mswhile
The response foreth_blockNumberon that endpoint was returned in less than a second. The real
cause only surfaced when we probed the WebSocket endpoint, which returned
The actual error in 1.9 s was 'unauthenticated query budget exhausted'—the
shared anonymous RPC budget was empty, and the HTTP gateway hangs instead
There's no point in saying that. Solution: use an Arkiv access key (by including it in theX-API-KEYheader; in the browser)
live feed: key in the WS URL path), plus a 6 s read deadline with retry, a
stale-while-revalidate cache persisted to disk with a committed cold-start
snapshot, writes that mark cache stale instead of clearing, and a
self-healing warmer (friction #15).
The complete list, including the various versions and the steps to reproduce the issue, is available at https://github.com/Aritra7070/Asli/blob/main/arkiv/friction.md.
Tracks Applied (3)
Censorship Resistance
Open Source
Best Indian Use Case
Technologies used
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.