Terms and Conditions
- I agree to the Grant Agreement terms if funded
- I agree to Provide KYC information if funded above $50,000 USD
- I agree to disclose conflicts of interest
- I understand that this grant program is only eligible for completed work, as it is a retroactive grant program. Applications for planned or partially completed work will not be considered. All completed work will be verified and accepted by its intended users or their representatives, who will confirm that the outputs meet the required quality, functionality, and usability before the work is listed as an option for Coinholder voting.
- I agree that for any new open-source software, I will create a CONTRIBUTING.md file that reflects the high standards of Zcash development, using the librustzcash style guides as a primary reference.
- I understand when contributing to existing Zcash code, I am required to adhere to the project specific contribution guidelines, paying close attention to any merge, branch, pull request, and commit guidelines as exemplified in the librustzcash repository.
- I understand all grants are valued in USD but will be disbursed in Shielded ZEC. I acknowledge and accept that disbursement amounts may fluctuate based on the ZEC/USD exchange rate at the time of payment.
Application Owners (@octocat, @octocat1)
@predge-ai
Organization or Individual Name
Predge (applicant: Amir Latypov)
Additional Team Members
None. Amir Latypov (founder, Rust developer) designed and built the project and ran every regtest and testnet case himself. Commits are published from the project account predge-ai.
How did you learn about the Lockbox: Coinholder Retroactive Grants Program?
The Zcash Community Forum (FPF's Q4 call for proposals, t/58598).
Requested Grant Amount (USD)
$2,500
Category
Research & Development
Project Summary
An open-source (MIT) shielded 2-of-3 FROST escrow for Zcash: buyer, seller and a neutral arbiter each hold one share of a per-deal Ironwood address, any two can pay out, and the arbiter co-signs only the exact payment named in its signed verdict. It ran end to end on the public Zcash testnet on 31 Oct 2026, including a case where the arbiter refused to sign a payment that did not match its verdict.
Project Description
FROST makes shielded multisig possible, but there was no public, runnable example of the most common three-party pattern in commerce: escrow with a neutral third signer. We built one and ran it on public testnet.
How it works:
- Each deal gets its own FROST group and its own Ironwood address. Buyer, seller and arbiter each hold one share.
- If the deal goes fine, buyer + seller sign and the arbiter never hears about it.
- If there is a dispute, the arbiter issues an Ed25519-signed verdict (canonical JSON: decision, reasons, evidence hashes, the exact payment) and co-signs only that payment, together with the winning party.
- Before releasing a share, every signer re-derives the sighash from the PCZT itself with ZF zcash-sign and checks that the outputs pay the agreed address at least the agreed amount and nothing else. The arbiter has no wallet and no seed, and cannot move funds alone.
- On chain this is an ordinary shielded v6 transaction. The payment memo carries the verdict hash so the recipient can link the two.
What is finished and public:
- Repository: per-party FROST CLI over ZF reddsa / frost-rerandomized (no crypto of our own), escrow protocol, verdict format and verifier, demo UI, regtest chain setup (Zebra 7.0.0 + Zaino 0.10.2), build scripts pinned to ZF frost-tools and zcash-devtool.
- Regtest: three escrows (release, refund, delivery-proven) plus the refusal case, end to end.
- Public testnet, 31 Oct 2026, NU7, v6 Ironwood transactions via the zec.rocks lightwalletd: three funded escrows and three mined payments (refund, release, delivery-proven), plus the arbiter's refusal (B'). Txids are listed under Proof of completion.
- A patch (scripts/zcash-sign-nu7.patch) that moves zcash-sign's signing path to the librustzcash revision that knows the testnet NU7 branch id. Without it, the pinned zcash-sign fails on testnet with UnknownConsensusBranchId.
- README answers to the committee's earlier FROST questions (signer messaging, transaction delivery, share backup, recovery) and a list of the upstream limits we hit (frost-tools #591, orchard #475 fork pin, zaino #1655 NU7 branch id).
What it is not: it is not on mainnet, it uses a trusted dealer instead of DKG, and signer messages are relayed as files instead of over frostd. The adjudication rule in the demo is a deliberately simple stub. ZCG declined our milestone application to take this further (#529, 9 Nov 2026) because dispute resolution and real deployers were missing. This retroactive request covers only the work already done and published, which other FROST teams can reuse: the per-signer PCZT policy check, the verdict-to-sighash binding and the NU7 testnet signing patch.
Technical Approach (how you did it)
- Keys: 2-of-3 rerandomized FROST, ZF reddsa generate_with_dealer. Each share is written to its party's directory and the dealer copy is deleted.
- Address and viewing key: ZF zcash-sign generate from the FROST group key. Funds land in Ironwood.
- Payment: zcash-devtool pczt create-max → pczt prove → zcash-sign (sighash + randomizer) → FROST rounds in the per-party CLI (crates/zescrow-frost) → zcash-sign applies the signature → pczt send.
- Signer policy: every signer recomputes the sighash with zcash-sign and checks the outputs against the agreed terms or the verdict before contributing a share. Nonce files are deleted on use.
- Verdicts: predge.zescrow.verdict/1, Ed25519 over canonical JSON, verifiable offline (zescrow verify). Unit tests in app/src/verdict.test.ts.
- Chains: regtest with Zebra 7.0.0 + Zaino 0.10.2 (NU5..NU6.3 at height 2); public testnet with NU7 via the zec.rocks lightwalletd, signing with a patched zcash-sign build (same frost-tools commit, librustzcash rev from zcash-devtool).
- Stack: Rust (stable 1.90+), TypeScript/Node 20, Docker. License MIT.
- Process: every testnet run and txid was checked on chain before publishing. Dates: first commit 30 Oct 2026 (regtest MVP), testnet run and commit 2158457 on 30–31 Oct, README 66bcde1 on 31 Oct, repository public 31 Oct 2026.
Time Period of Work Completion
October 2026 (research from mid-October; build and public testnet run 30-31 October 2026)
Total Budget (USD)
$2,500
Budget Breakdown
- Compensation:
- $(USD): 2000
- Justification: The applicant's own time: protocol design, implementation of the per-party FROST CLI and the verdict-gated signer policy, regtest and public-testnet runs (each testnet escrow took 15-25 minutes of confirmations), checking every txid, the NU7 signing patch, README and upstream-issue research.
- Technology/Software:
- $(USD): 500
- Justification: Development tools and compute used to build and run the project.
- Infrastructure/Hosting:
- $(USD): 0
- Justification: Local machine; public testnet lightwalletd (zec.rocks).
- Services/Contractors:
- $(USD): 0
- Justification: None.
- Other:
- $(USD): 0
- Justification: Testnet TAZ only.
- Total $(USD): 2500
Previous Funding
No
Previous Funding Details
No previous funding from the Coinholder program or ZCG. Our ZCG milestone application #529 ("Shielded 2-of-3 FROST escrow for P2P commerce", $15,000 for future work: spec, DKG, frostd, mainnet) was declined on 9 Nov 2026. This request is retroactive and covers only the work already completed and published. It does not ask for any of the declined future milestones.
Other Funding Sources
No
Other Funding Sources Details
N/A. No other funding was received for this work.
Success Metrics
- A complete shielded 2-of-3 FROST escrow flow ran on public testnet: 3 funded escrows, 3 mined v6 Ironwood payments (refund, release, delivery-proven) and 1 refused mismatched payment, all reproducible from the README (npm run testnet).
- The refusal case is the useful part for other teams: it shows a co-signer that inspects the PCZT and refuses to sign a transaction that does not match what it agreed to.
- An open, working recipe for driving ZF zcash-sign and zcash-devtool end to end with FROST on NU7 testnet, including the patch needed for the NU7 branch id. Other builders can reuse it today.
- Upstream issues documented with references (frost-tools #591, orchard #475, zaino #1655) so other FROST builders can see where the stack currently stops.
- MIT licence, no closed parts. Honest limits: no external users yet, and it is not on mainnet.
Proof of completion
- Repository/Commit:
- predgeAI/zcash-escrow - MIT, public since 31 Oct 2026
- 00a83e8 - CONTRIBUTING.md
- 5ad0635 - regtest MVP: per-party FROST CLI, verdict-gated arbiter, demo UI (30 Oct)
- 2158457 - testnet mode: escrows A, B, B' and C on public testnet (30–31 Oct)
- zcash-sign-nu7.patch - zcash-sign signing on NU7 testnet
- Publication:
- README - design, verdict format, answers to ZCG's FROST questions, known upstream limits
- Forum thread for #529 - public description, 1 Nov 2026
- Deployment/Release (public testnet, 31 Oct 2026):
- B refund (buyer + arbiter): funding 9be35e8ee4e8ac867e29f7bd3929161fb1cc5b6043a29adafc5360a201ced80d (height 4560069), payment 2bc943804f1b30eb256a3f33b79a60677621c01e4cb41320ba7a32ee70c1f711 (4560131)
- B' arbiter asked to pay the other side: refused, no tx ("PCZT pays 0 zat to the agreed address, expected >= 9980000")
- A release (buyer + seller): funding b3287844c5f166ba93b2511c5827dc5feab8537fe7ddceca5639d6a517e3e807 (4560131), payment a22f6d89cb456f2613a077114f47ae220efae147aa3cbf7763ef647d365b40f9 (4560141)
- C delivery proven (seller + arbiter): funding 0ef86d4ef8450af48b15f9f0e10ea02b72ecf185da71f1c1e1e366781aeb5e19 (4560174), payment 1e54334c4ee9afdd0c678548fdfc9da71a638b090377589ecd30eea39a5899d9 (4560212)
- Other Evidence:
- ZCG #529 - prior application, declined 9 Nov 2026 (disclosed for context)
Conflict of Interest Disclosure
The arbiter in the demo is operated by Predge, the applicant's own project. The protocol does not depend on it: any arbiter that runs the same verdict-and-co-sign check can be used. No relationship with FPF, ZCG or any keyholder organization.
Community Forum Posting
- I understand it is my responsibility to post a link to this issue on the Zcash Community Forums after this application has been submitted so the community can give input. I understand this is required in order for the community to discuss and vote on this grant application.