Skip to content
QORECHAIN
Register

Post-Quantum dApp

Ikrar

Pay the solar installer only when the panels produce: milestone escrow signed with ML-DSA-87.

Share on X

About

Pay for production. The meter is a post-quantum signer: the last and largest share moves only when the meter signs, with its own ML-DSA-87 key, a reading that shows the panels produced the target. A rooftop solar system is paid up front, and the homeowner only learns months later whether it produces what was promised. Splitting the payment into milestones helps, but someone still has to say when a milestone is reached, and today that is a phone call or a paper form. Ikrar puts the deposit in a contract on the QoreChain testnet and releases it in three steps. The installer signs M1 (installed, 30%). The homeowner signs M2 (commissioned, 20%). The meter signs readings of cumulative watt-hours, and the reading that reaches the target before the deadline releases the rest. If the deadline passes first, anyone can close the job and the rest goes back to the homeowner. Every signature is ML-DSA-87, and the contract checks it itself with the pqcVerify precompile, against the key the signer registered on chain with a proof of possession. Try it without a wallet at ikrar.sasateguh.com. Press "Run a job now": in well under a minute the page opens a scoped window, locks a 0.05 QOR deposit, and M1, M2 and a meter reading at the target land one by one, each signed with ML-DSA-87 and linked to the explorer, until the job is released. It runs from separate demo accounts. The meter at the top reads an open job from the chain. Two finished jobs list their real transactions: one paid in full after the meter reached 5,040 Wh of a 5,000 Wh target, one refunded after its deadline. Under "Try to cheat it", each of six buttons asks the testnet contract, right then, to accept a forged meter signature, a replayed signature (two of them resend the exact bytes of real transactions), an installer with no post-quantum key, or an early refund. Nothing is sent; the page shows the contract's own error, the block number and why it was refused. Press "Try to steal it" for a Q-Day drill: the server holds only the secp256k1 key of a practice homeowner with a deposit locked in Ikrar, the key a quantum attacker could recover. It tries to send the account's QOR, open an unlimited EVM window, close the job early through the EVM lane and replace the post-quantum key. The chain refuses all four in its own words, and nothing moves. Every call goes through a scoped EVM window: one allowed target (the Ikrar contract), a transaction count and a value cap. In such a window the chain itself refused a transfer to another address and a deposit above the cap. A hostile campaign sent 575 calls against the live contract, as eth_call simulations: forged and bit-flipped signatures, exact replays of real transactions, parties without a post-quantum key, early refunds, malformed arguments. All 575 were refused with the expected error, and a GitHub Actions job repeats a batch every hour until judging ends. QCAI stage 1 scored the deployed source 82 and stage 2, on the same source, 78. docs/AUDIT.md answers each of their findings with a named regression test or the reason it does not apply. Limits: the meter is simulated, and its key lives on my server. Ikrar proves who signed a reading, not that the reading is true. Testnet only. I'm a solo builder in Malaysia. I built Ikrar with AI coding agents, and AI_USAGE.md says how.

How it's made

One Solidity contract, Ikrar.sol, built and tested with Foundry. No owner, no pause, no upgrade path. Each signed step reads the signer's key from the pqcKeyStatus precompile (0x…0a02) and refuses it unless it is registered, ML-DSA-87 and has a proof of possession. It then checks the 4,627-byte signature with pqcVerify (0x…0a01) over a message that binds a domain tag, the chain id, the contract, the job, the step, the signer, the job's nonce and the reading. A signature works once. createJob requires all three parties to hold a proven key. Every paying function is nonReentrant and writes its state before the transfer. On the testnet (contract 0x333d6dd1d4df71977235e646d073993f37e6a607): the homeowner, installer and meter registered ML-DSA-87 keys with proof of possession; job 0 ran deposit, M1, M2 and two meter readings to release (final reading 0x72fdad8ae9be9c888a21b18c5f8e0c4da41c90cc84f559ba2fea850b86b84681); job 1 was refunded after a 150-second deadline (0x276723a80bea9dbd9f012ab1103024b95f736984bc90d661aee3c4a1d27b64c0); job 2 stays open for the live checks. Every window was scoped to the contract with a transaction count and a value cap; the deployment used an unscoped one-transaction window because the chain refuses a creation in a scoped one. All hashes are in evidence/testnet.json. The "Run a job now" button runs the same flow from the server with three demo accounts (their own phrase, never the project's), one run at a time, limited per visitor and per day, each run capped by its own scoped window. The classical-key drill signs Native messages with signClassicalEth and an EVM transaction with the same secp256k1 key; the chain answers code 20 (hybrid signature required), "window does not admit this transaction" and code 234 (key maintenance needs the hybrid signature). Kits: @qorechain/sdk 0.14.0 for key registration, proof of possession, ML-DSA-87 signing, hybrid-signed Native transactions, the window messages and the classical-only signer of the drill; @qorechain/pqc 0.2.3 in the browser, where "Check every signature again" verifies every recorded milestone signature (taken from its transaction's calldata) against the key on chain, and shows an altered copy fail; @qorechain/qorescan 0.1.0 for the CBOM in docs/cbom, scanned again in CI; viem for the EVM side. Tests: 24 unit tests, 4 fuzz tests and 3 invariants in Foundry (money in equals money held plus money out; paid plus refunded never exceeds a deposit; a forged signature is never accepted), 15 vitest tests for the server, the run button and the drill, and Playwright on Chromium and WebKit (iPhone 13) against the live site, including a real run to Released, the classical-key drill and the in-browser signature check. CI runs Foundry's lints with warnings as errors, and gitleaks. Audit: QCAI in two stages (Testnet, Ethereum EVM/Solidity) on the deployed source scored 82 and 78; each finding is answered in docs/AUDIT.md, with regression tests for the reentrancy and overflow findings. Forge lint, Slither and Sisir ran on the draft and the final contract. Credit: QoreChain's build-before-qday examples (Apache-2.0), Workshop 2 vault for the precompile pattern and the audit layout; my own fest entry Sisir (Apache-2.0) for the key status decoding, the chain helpers and the deploy script.

Timeline

IkrarPost-Quantum dApp

Pushed 1 commit to main

  • baf62b7 Page: the hostile campaign count with links to the evidence and the hourly runs · aimanmalib
IkrarPost-Quantum dApp

Pushed 1 commit to main

  • 65b33ef Hostile campaign: 575 eth_call attacks on the live contract, 0 accepted; hourly GitHub Actions batch until judging ends; README badge and line · aimanmalib
IkrarPost-Quantum dApp

Pushed 1 commit to main

  • 5b424cc Classical-key drill: the reason under each refusal, the node's message labelled as such; fresh recorded run · aimanmalib
IkrarPost-Quantum dApp

Pushed 1 commit to main

  • f653031 README and card: six Playwright tests, as counted · aimanmalib
IkrarPost-Quantum dApp

Pushed 1 commit to main

  • b3bdf4a Film v3: 'to another address', 'in under a minute'; same URL, sha256 recorded · aimanmalib
IkrarPost-Quantum dApp

Pushed 1 commit to main

  • 5639bf3 Run a job now: 60 runs a day for the judging period (per-visitor limit unchanged) · aimanmalib
IkrarPost-Quantum dApp

Pushed 1 commit to main

  • dc661c1 Judging period: 10 runs a day, translated pause messages, demo top-up command; film text fixes · aimanmalib
IkrarPost-Quantum dApp

Pushed 1 commit to main

  • 73747d4 Red team fixes: results re-render on a language switch, Judges in 2 minutes, plain timing and gas wording, internal notes out of the card, English audit headers, media-control styles allowed · aimanmalib
IkrarPost-Quantum dApp

Newly verified on chain: QoreScan

IkrarPost-Quantum dApp

Newly verified on chain: QoreScan

IkrarPost-Quantum dApp

Pushed 39 commits to main

  • 8e02a80 README head: the video and its length first, then the live demo · aimanmalib
  • 6f60154 Kit pass: claims and counts matched across README EN/BM, card, changelog; fresh screenshots of the live page; dates in UTC · aimanmalib
  • 6152677 Film v2 (97 s): the run button, the classical-key drill and the browser signature check, from live captures; same URL · aimanmalib
  • fca9a0c Docs and card: the in-browser signature check, the CBOM, kits and test counts · aimanmalib
  • 7e6a434 Kits in real use: @qorechain/pqc re-checks every recorded signature in the browser (and an altered copy fails); QoreScan CBOM of contract, accounts and TLS, scanned again in CI · aimanmalib

and 34 more commits

IkrarPost-Quantum dApp

Newly verified on chain: QoreScan

IkrarPost-Quantum dApp

New project.

Comments and questions

  • No comments yet.