About
A hacked account can copy your words. It can't copy your key.
When a Telegram account gets hacked, the hacker messages every friend: "I'm stuck, please send money." It works because the hacker has the name, the photo and the whole chat history. Friends have no way to check.
Alat gives them one. You link your Telegram account to your QoreChain key once, with QoreX. When a message asks a friend for money, they forward it to @alatAppbot. The bot answers "Waiting for the owner. Do not send money until this turns green." Only the real owner's key can answer, from the Alat site, outside the chat app, so it works even if they are locked out of Telegram. The friend's message turns green ("Confirmed by the real owner") or red ("The owner says this is NOT them").
A hacker who has the Telegram account can't answer with their own key (refused), can't replay an old answer, and can't move the account to their key: the contract makes any change wait 7 days in public, and the real key can cancel it.
Try it in 2 minutes, no wallet needed: https://alat-silk.vercel.app/demo
How it's made
Architecture
- AlatRegistry (Solidity, QoreChain testnet EVM): binds HMAC-SHA256(secret salt, Telegram id) to the owner's account. Never stores the id or username. Enforces the 7-day re-link wait, cancel and consent on chain, and checks that a new owner has an ML-DSA-87 key registered with proof of possession, through the PQC Key Status precompile (0x0A02). 14 Hardhat tests.
- Owner actions are hybrid-signed (secp256k1 + ML-DSA-87) native transactions sent with QoreX signAndBroadcast: a 1 uqor self-transfer whose memo carries the action (link, answer, cancel). The server reads each transaction from the chain and requires the chain's pqc_hybrid_verify event AND re-verifies the ML-DSA-87 layer against the key registered on chain (QoreSign inspectTransaction). Then it checks the signer is the linked key, the single-use nonce, and the expiry by block time.
- Server: Hono API, grammY Telegram bot (webhook, buttons), relayer that writes the registry inside a live EVM authorisation window, Postgres (Neon). Hosted on Vercel.
- Site: React + Vite, scaffolded with create-qorechain-dapp (viem-wagmi; contracts from the hardhat template).
Kits: create-qorechain-dapp, @qorechain/sdk, @qorechain/evm, @qorechain/qoresign, @qorechain/qorex-types, @qorechain/qorex-wallet-mock (end-to-end tests with real hybrid signing on testnet).
What was hard (all in docs/FINDINGS.md)
- QoreX can't sign messages (signArbitrary) or EVM transactions yet, so Sign In With QoreChain and message proofs weren't possible. We redesigned: owners answer with hybrid-signed memo transactions, which are public and re-checkable by anyone, and a relayer writes the registry while the contract still enforces the 7-day rule itself.
- The Telegram Bot API can't look up a user by @username, so checks use the forwarded message's sender id.
- On Vercel, the Telegram client's default 500 s timeout and keep-alive sockets hung every request; fixed with a short timeout and no keep-alive.
Tests: 14 contract, 16 rule, 27 server/bot tests, plus live Playwright runs on testnet (link, refused wrong key, "not me", "yes", hacker re-link held 7 days then cancelled). Built with an AI coding agent; see AI_USAGE.md.