Skip to content
QORECHAIN
Register

Post-Quantum dApp

LatticePay

Payroll that survives Q-Day: streaming stablecoin salaries guarded by on-chain ML-DSA-87 signatures

Share on X

About

Quantum-safe stablecoin payroll on QoreChain. Salaries stream to employees every second, and every action that could steal money (adding staff, changing pay, moving the treasury, redirecting a paycheck) needs an ML-DSA-87 signature that the contract verifies on chain with QoreChain's pqcVerify precompile. Employees' earned wages are ring-fenced from the employer, and only an employee's own post-quantum key can change where they are paid, which stops payroll-diversion fraud. If Q-Day hands an attacker the employer's ECDSA key, the most they can take is a capped daily allowance, which the employer can freeze instantly.

How it's made

Architecture: a Solidity 0.8 contract (LatticePayroll) on the QoreChain EVM, a TypeScript CLI and a React dashboard, scaffolded with create-qorechain-dapp (hardhat and viem-wagmi templates). Post-quantum design: every sensitive action carries an ML-DSA-87 signature over a human-readable message that the contract builds itself, with a per-signer nonce and a deadline, in QoreSign's message domain. The contract reads the signer's registered key from the pqcKeyStatus precompile, requires proof of possession, and verifies the signature with pqcVerify. No key is stored in the contract, so key rotation just works. Transactions go through a scoped EVM window limited to the payroll and token contracts. The classical key alone can only withdraw a capped daily amount from the free balance; earned wages are ring-fenced. Kits and features: QoreChain SDK (accounts, PQ key registration with proof of possession, hybrid-signed transfers, EVM windows), the EVM kit, QoreSign, QoreX through its RainbowKit connector, and the fUSD test stablecoin. Also OpenZeppelin, Hardhat 3, viem, wagmi. Testing: 19 Hardhat tests including a full Q-Day attack drill. Precompiles are mocked locally; real ML-DSA-87 is verified through the live precompiles by a self-test script. Two-stage QCAI audit in progress. What was hard: keeping the signed bytes identical between the contract, the CLI and the wallet; the SDK's ESM build hit a module cycle on Node 22.14 (the CLI runs as CommonJS); faucet fUSD arrives as a bank coin and needs MsgConvertCoin before a contract can use it. Status: deployed on testnet at qor10uqd7umfhmzq6f4qlycwpgn6j9hg4rxgdsvv7s after audit stage 1 (85/100; every finding fixed or explained with a test, 22 tests). Funding, hybrid PQ-signed employer actions, claims, employee-signed payout change, lockdown and the Q-Day attack all ran live.

Timeline

LatticePayPost-Quantum dApp

Pushed 1 commit to main

  • 084291b docs: project log · Adityass0925
LatticePayPost-Quantum dApp

Pushed 2 commits to main

  • 63845ac chore: remove the temporary video script · Adityass0925
  • b203cc8 docs: demo video link · Adityass0925
LatticePayPost-Quantum dApp

Pushed 1 commit to main

  • e884983 docs: video recording script · Adityass0925
LatticePayPost-Quantum dApp

Pushed 3 commits to main

  • 565ec34 docs(ai): human section, audit loop and live debugging in AI_USAGE · Adityass0925
  • ef798c6 ci(web): publish the dashboard to GitHub Pages · Adityass0925
  • 681255d docs: live dashboard link · Adityass0925
LatticePayPost-Quantum dApp

Pushed 1 commit to main

  • cbe1471 docs: final project-page text and whole-screen recording steps · Adityass0925
LatticePayPost-Quantum dApp

Pushed 3 commits to main

  • d31489a docs(audit): add stage 2 QCAI report and findings · Adityass0925
  • abe09c8 test(contracts): reentrancy, overflow, fail-closed precompiles and flash-loan tests (audit stage 2) · Adityass0925
  • b86a257 docs: audit scores, 26 tests, refreshed banners · Adityass0925
LatticePayPost-Quantum dApp

Pushed 2 commits to main

  • 72df060 fix(web): load full on-chain activity history; linkable tabs · Adityass0925
  • 92c4ee0 docs: dashboard screenshots and final video script · Adityass0925
LatticePayPost-Quantum dApp

Pushed 1 commit to main

  • ad8ff51 docs: QoreX-signed live run; fix(web): QoreX testnet steps and hybrid submission · Adityass0925
LatticePayPost-Quantum dApp

Pushed 1 commit to main

  • d79dc7a docs: add project cover banner · Adityass0925
LatticePayPost-Quantum dApp

Pushed 5 commits to main

  • cadb858 docs(audit): add stage 1 QCAI report and findings · Adityass0925
  • 9dda840 fix(contracts): hybrid employer actions and OpenZeppelin ceilDiv (audit stage 1) · Adityass0925
  • 60408e5 fix(web): show hybrid employer actions in the dashboard · Adityass0925
  • 881ec35 chore(deploy): redeploy audited contract to qorechain-diana · Adityass0925
  • f0fbd3b docs: audited contract address, live run and 22 tests · Adityass0925
LatticePayPost-Quantum dApp

Pushed 1 commit to main

  • 2842275 fix(web): show the exact over-limit amount in the Q-Day drill · Adityass0925
LatticePayPost-Quantum dApp

Newly verified on chain: EVM window (incl. scoped), Test tokens fUSD, fETH, fBTC

LatticePayPost-Quantum dApp

Pushed 9 commits to main

  • 4a2142d docs(readme): contract address and live testnet run · Adityass0925
  • eab2be1 chore(deploy): deploy LatticePayroll to qorechain-diana testnet · Adityass0925
  • 48881ff docs(readme): testnet accounts and verified hybrid-signed tx · Adityass0925
  • bb429d7 docs: README, audit plan, AI usage and hackathon guide · Adityass0925
  • f20af61 feat(web): dashboard with QoreX, PQ signing dialog, Q-Day simulator · Adityass0925

and 4 more commits

LatticePayPost-Quantum dApp

New project.

Comments and questions

  • No comments yet.