ACRA Provenance Verifier
Making "Made in Canada" something a buyer can check
- Role
- Team build with ACRA
- Context
- Verified Canadian Supply Chains Hackathon
- Where
- Bayview Yards, Ottawa
- When
- May 2026
- Status
- Hackathon build, not hosted
Context
The Red Team Hackathon Series stop in Ottawa set one challenge: cryptographic provenance for Buy Canadian procurement, with the Canadian drone sector as the case study. Ten teams, up to five people each, a 20,000 dollar prize pool. ACRA entered as a start-up team.
The problem
Today a "Product of Canada" label is a claim a company prints on a box. Nobody downstream can check it, because origin data is self-reported and lives in whichever spreadsheet each supplier keeps. The challenge asked for a supplier attestation flow, a purchaser lookup, cross-tier provenance linking, and detection of tampering, forgery, and replay, all while computing an actual Canadian-content percentage.
Approach
Every supplier signs their own step
Each tier issues an attestation covering what it did, what inputs it consumed, and where the work happened, signed with its own Ed25519 key and content-addressed. Change one byte afterwards and the signature stops verifying.
Verification walks the graph, not a list
A submission is a multi-tier DAG of attestations. The backend indexes it, resolves parent references by content hash, and verifies every signature against a supplier key registry before any figure is computed.
Two tiers of anomaly detection
Deterministic detectors fire only on certain structural violations, so they never false-positive on a clean chain: signature_invalid, signature_unknown_supplier, parent_hash_mismatch, dangling_parent, unit_mismatch, timestamp_inversion, replay_within_chain, circular_reference, and mass_balance_violation. Statistical detectors for origin, timing, and labour rate run as a second pass only after the chain passes every deterministic check.
Attribution is part of the answer
Each anomaly points at a specific attestation, chosen by a rule per type: a parent hash mismatch is attributed to the consuming child, a mass balance violation to the parent whose budget was over-consumed, a circular reference to the product leaf. Saying the chain is broken is not useful; saying which supplier broke it is.
Content percentage against the real thresholds
Cost is rolled up by country across the chain, then the Competition Bureau thresholds decide the label: 98 percent for Product of Canada, 51 percent for Made in Canada, and both require that the last substantial transformation happened in Canada. The qualifying transformation closest to the leaf wins, measured by hop distance.
A demo built around one moment
The React frontend has an Issue tab where a supplier signs a record and a Verify tab where a buyer scans a QR code and gets a verdict. The demo tampers with one Canadian supplier attestation, re-verifies the same product, and the verdict flips to FLAGGED with the broken signature named. That flip is the whole argument.
Bilingual by requirement, not afterthought
I built the demo’s English/French localization layer, a 350+ line locale module, along with country-flag indicators and UI refinements across the supplier-attestation, purchaser-verification, and live-ledger screens, plus the worked-example seed data used to drive the event demo. A federal-procurement use case that only spoke English wasn’t a serious entry.
How it fits together
Issue
- supplier signs an attestation
- Ed25519, content-addressed
Submit
- DAG of attestations
- parents referenced by content hash
Verify
- every signature against the key registry
- parent links resolved
Detect
- deterministic checks first
- statistical pass only on a clean chain
Answer
- Canadian content %
- last substantial transformation
- verdict + attribution
Tech stack
- Backend
- Python
- FastAPI
- Pydantic
- Cryptography
- Ed25519
- content addressing
- @noble/ed25519
- @noble/hashes
- Frontend
- React 18
- Vite
- html5-qrcode
- qrcode.react
- Delivery
- Docker
- docker-compose
Outcome
- A working end-to-end system inside the hackathon window: supplier issuance, purchaser verification, cross-tier linking, anomaly classification, and a Canadian-content figure.
- The verifier scored 97 percent overall against a 1,000-row labeled evaluation corpus: 100 percent on clean submissions and on every deterministic tamper category, with a statistically fitted anomaly model (robust z-scores per supplier and action type) layered on top of the deterministic signature and structural checks.
- Sample chains covering each failure mode the challenge named: tampered, unknown signer, quantity inconsistency, missing reference, cycle, and both designation outcomes.
- Bilingual interface, matching the procurement context it was built for.
- ACRA was one of 10 teams accepted nationally into the challenge, listed as a participating team for the Ottawa event. No placement.
The build lives in a shared team repository rather than a personal one, so no repo link is published here.
More case studies
- HireTechGenius: Scoring interview answers without asking a human to re-read them
- Educational QA with RAG: Four chunking strategies, one set of questions, one honest comparison
- Resume-Aware RAG Chatbot: Grounding resume generation in real resumes