
Quantum Pass
Abadi
An endowment whose gift never leaves, released only by 2 of 3 post-quantum trustees.
About
A school, a mosque or a charity that runs an endowment (waqf) makes donors two promises: the gift itself is never spent, and only a modest benefit is paid out, for a stated purpose. Donors rarely see either promise kept, trustees can be pressured, and the keys that guard money meant to last for generations have to outlast today's elliptic-curve signatures. Abadi puts both promises in a contract on the QoreChain testnet and gives donors and trustees an installable app in English and Malay. AbadiFund has no owner, no admin key and no upgrade. The principal never leaves: every release must leave at least the principal behind, even when all three trustees agree. Income leaves only when two different trustees sign the exact recipient, amount, purpose and release number with ML-DSA-87 keys. The contract reads each key from the chain's key registry (pqcKeyStatus: registered, ML-DSA-87, proof of possession) and checks both signatures with the pqcVerify precompile. The signatures are QoreSign messages, the format QoreX's signArbitrary produces, and each works once. At most a fixed share of the principal can leave per period (1% per hour in the demo, so you can watch it reset). Try it without a wallet at abadi.sasateguh.com. The first screen has three buttons. "Try to empty it" builds six releases that should not pay and asks the real contract: one bit of a signature changed, one trustee signing twice, a stranger with a real registered ML-DSA-87 key, more than the rate, the whole balance, and a replay of a paid release. All six are refused with the contract's own error. "Release with 2 trustees" makes a real release with two ML-DSA-87 signatures checked on chain, and "Give 0.01 QOR" sends a gift as a demo donor; the figures update in place. A seventh test plays an attacker who stole a trustee's classical secp256k1 key: its signature is refused by the contract, and its classical-only transfer of the trustee's own QOR is refused by the chain. The ledger shows every gift and release from the contract's records. With QoreX on testnet you can give from your own wallet in one hybrid-signed transaction, and a printable poster's QR code opens the Give page in the QoreX app. Trustee 3 is a real QoreX wallet: a release co-signed with QoreX signArbitrary is on chain. Limits: the demo trustees' keys live on the demo server so judges can play them; in a real fund each trustee signs in their own QoreX, as trustee 3 does. The chain gives no yield, so income comes from gifts. Trustees are fixed at deployment. "Endowment (waqf)" names the practice that inspired the design; Abadi gives no religious ruling. I'm a solo builder in Malaysia. I built Abadi with AI coding agents, and AI_USAGE.md says how.
How it's made
Abadi started from create-qorechain-dapp 0.14.0 (template viem-wagmi): the first commit is its unmodified output in web/, which keeps the wagmi, RainbowKit and @qorechain/qorex-rainbowkit setup and grew into the PWA. AbadiFund is one Solidity contract, built and tested with Foundry, deployed on diana at 0xb7cde6ff51faa72841495ee10c16e5f730b0b7fd. release needs two distinct trustees; checks the amount against booked income (PrincipalLocked) and the epoch's cap (OverRate); then builds the QoreSign message-signing-v1 bytes "qorechain-msg-v1|qorechain-diana|" + "0x" + keccak256(domain, chain id, contract, nonce, recipient, amount, purpose hash) and checks each trustee's signature with pqcKeyStatus and pqcVerify. The chain refuses funds on a cross-VM call into the EVM lane, so a gift is one Native transaction with a bank MsgSend to the contract and a MsgCrossVMCall that books it as principal or income. Gifts and releases are kept in contract storage because events of Native-lane calls are not served by eth_getLogs. The PWA connects QoreX through RainbowKit, sends gifts with QoreX's Native signAndBroadcast, and asks trustee 3 to sign with signArbitrary. A small Node server plays the demo donor and trustees 1 and 2 with @qorechain/sdk's hybrid signer, sends from the Native lane, and runs the six attack checks with eth_call; the contract's own refusal is what the page shows. Tests: 31 Foundry tests (29 unit, 2 fuzz at 512 runs) and 4 invariants (principal never leaves, epoch cap, no forgery or replay pays, accounting), 12 vitest tests including the official QoreSign vectors and real ML-DSA-87 signatures, and a Playwright run that presses the demo path on the live site in WebKit on an iPhone 13 profile and in Chromium. CI runs gitleaks. Credit: create-qorechain-dapp and the workshop examples (Apache-2.0), the QoreSign test vectors (Apache-2.0), and my earlier fest entries Mentari, Sisir and Tirai for Pqc.sol, the QoreSign message format and the deploy scripts.
Timeline
Pushed 21 commits to main
- 4f032cf Attack page: say that the seventh test broadcasts one transfer the chain refuses · aimanmalib
- 6c0fd2f Poster PDF and PNG (QR decoded), Chrome installability evidence, README section · aimanmalib
- 67d9b69 A4 poster with a QR code that opens the Give page in the QoreX app; install button on the fund page · aimanmalib
- 10e85e7 README: laluan imej relatif (URL mutlak 404 dalam repo private) · aimanmalib
- d88965e Film notes: wording · aimanmalib
and 16 more commits
New project.
Comments and questions
- No comments yet.