Skip to content

docs: Qash EVM migration technical plan - #304

Open
Huygon764 wants to merge 1 commit into
developfrom
docs/qash-evm-migration-plan
Open

docs: Qash EVM migration technical plan#304
Huygon764 wants to merge 1 commit into
developfrom
docs/qash-evm-migration-plan

Conversation

@Huygon764

@Huygon764 Huygon764 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Technical plan for the PolyPay to Qash EVM migration.

Decision

Fork the Qash monorepo and replace its Miden chain layer with PolyPay's EVM stack — not the other way round. Qash's backend already has every business model we need (Company, TeamMember, Employee, Invoice, Bill, Payroll, Proposal); PolyPay's has none of them. Both are NestJS 11 + Prisma 7 + Postgres, so the transplant is mechanical rather than architectural.

What the plan covers

  • Target architecture — Qash UI + qash-server + PolyPay's zkVerify / relayer / MetaMultiSigWallet on Base. Guardian/PSM, the Miden note lifecycle, and client-side transaction proving are all removed.
  • Identity and auth — Para for the session, passkey (WebAuthn PRF) for secret custody, and a commitment-bound Noir circuit for approvals.
  • Schema changes — the three multisig tables move from Miden fields to EVM + zkVerify fields. The business layer is untouched.
  • Phase 1 scope — end-to-end batch bill payment on Base Sepolia. Target 3 weeks.
  • Workstreams, effort, risks.

Two findings worth review

The transaction circuit's ECDSA check currently constrains nothing. pub_key_x / pub_key_y are private inputs recovered from the prover's own signature, and nothing binds them to secret or commitment — the contract stores only commitments. A prover holding secret can generate a throwaway keypair, sign with it, and pass. The check costs most of the proving time and buys no security. The plan fixes this by binding commitment = poseidon2(secret, hash(pubkey)), which makes the intended two-factor property real. This applies to PolyPay today, not only to Qash EVM.

PolyPay's secret derivation cannot work with Para. secret = keccak256(sign("noir-identity")) assumes deterministic ECDSA. Para is a 2-of-2 MPC wallet: no party holds the full private key, so RFC 6979 is mathematically unavailable and every signature differs. Hence the passkey-based custody design.

Plan document: QASH-EVM-PLAN.md

Plan for forking the Qash monorepo and replacing its Miden chain layer
with PolyPay's EVM stack (zkVerify signer privacy + relayer +
MetaMultiSigWallet on Base).

Covers target architecture, identity/auth design (Para session, passkey
PRF secret custody, commitment-bound Noir circuit), schema changes to the
three multisig tables, Phase 1 scope (end-to-end batch bill payment on
Base Sepolia), workstream breakdown, and risks.
@Huygon764
Huygon764 force-pushed the docs/qash-evm-migration-plan branch from 9c24bc5 to cfc6df5 Compare July 14, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant