MPC as a Layer 2 Service to Cardano

Project Catalyst #1200045 — Proof of Concept by Profila AG

2
Blockchains
17
Unit Tests
5
On-Chain Secret TXs
0
Individual Values Exposed
◆ Cardano Preprod ◆ Partisia Testnet ● Live Contracts
Architecture

Cross-Chain Privacy Architecture

Cardano provides the on-chain computation request anchor. Partisia Blockchain runs the MPC computation. An off-chain relay bridges the two.

Layer 1 — Cardano

Aiken smart contract records MPC computation request with dataset ID, query type, and initiator signature

Preprod • Aiken v1.1.12

Off-Chain Relay

TypeScript service polls Blockfrost for new UTxOs, parses datum, bridges request to PBC

relay.ts • Blockfrost API

Layer 2 — Partisia

ZK MPC contract receives secret inputs from users, computes aggregate result via multi-party computation

Testnet • SDK v.16.126.0
End-to-End Flow

From Data Request to Privacy-Preserving Result

Six stages demonstrate the complete journey from Cardano initiation to aggregate MPC result.

1

Cardano TX

Aiken validator creates MPC request UTxO with inline datum

2

Relay Detects

Off-chain relay polls Blockfrost, parses datum, bridges to PBC

3

PBC Deploy

ZK MPC contract deployed with dataset params on PBC testnet

4

Secret Inputs

5 real ZK secret-input TXs submitted via PBC TypeScript SDK to 4 MPC engines

5

MPC Compute

ZK kernel counts values > 18 across all secret shares

6

Result

Aggregate count returned. Zero individual data exposed.

Milestones

Four Milestones — All Complete

Each milestone builds on the previous, creating a verifiable chain of evidence from Cardano to MPC result.

M1 — Aiken Smart Contract

✓ Complete

Deployed an Aiken MpcRequest validator to Cardano Preprod. The UTxO carries an inline datum with dataset_id, query_type, and initiator_pkh — creating an immutable on-chain record of the MPC computation request.

6 / 6 tests pass (aiken check)

M2 — PBC ZK Contract + Relay

✓ Complete

Built and compiled a Rust ZK MPC contract with age_threshold and survey_match computations. Created an off-chain TypeScript relay that polls Blockfrost, parses the Cardano datum, and bridges the request to the PBC contract.

11 / 11 tests pass (cargo test)

M3 — Secret Input Flow & Privacy

✓ Complete

Created a synthetic dataset of 50 users and submitted 5 real on-chain ZK secret-input transactions to the PBC contract via the @partisiablockchain/zk-client TypeScript SDK. Each transaction encrypts the secret for all 4 MPC engines. The submission log contains only hashed user IDs, sender addresses, and TX references — zero raw ages or survey answers are recorded anywhere in the system.

M4 — Result Display & Closeout

✓ Complete

Built a result display tool that fetches live PBC contract state via REST API, decodes the on-chain binary to extract all contract fields, and presents the MPC computation result with cross-chain evidence links. 5 real ZK secret-input transactions submitted via the PBC TypeScript SDK are verifiable on-chain.

On-Chain State

Live Contract State — Decoded from Binary

Contract state fetched via PBC REST API and decoded from the serializedContract binary blob.

Cardano Preprod

Transaction50d28fd2bd...d53a57
Script Addressaddr_test1wzut66...hkwaz
Datum dataset_idprofila_test_v1
Datum query_typeage_threshold
Datum initiatorfc1c9932...43224
NetworkPreprod
View on CardanoScan →

Partisia Testnet

Contract039ed921...607634
Administrator00ce80e5...df8337
dataset_idprofila_test_v1
query_typeage_threshold
min_participants3
Secret Inputs5 on-chain TXs
ZK VariablesnextVariableId = 5
Calculation StatusCOMPLETE
computation_completetrue
result5
ShardShard0
View on PBC Browser →  ·  Transactions →
Test Data

Synthetic Dataset — 50 Users

All test data is synthetic. No real personal information. The dataset is designed to demonstrate both queries: age threshold and survey match.

Age Distribution

14
3
15
3
16
3
17
3
18
3
19
2
22
2
25
2
28-75
29

Age > 18 (adults): 35   Age ≤ 18: 15

Survey Q1: “Do you consent to analytics?”

56% Yes
Yes: 28 users
No: 22 users
Countries (6)
CH DE GB US FR AU
MPC Results

Computation Results

The MPC computation produces only aggregate counts. No individual user's data can be determined from the output.

On-Chain MPC Result (Live)
5
of 5 submitted users over age 18

Live ZK MPC computation complete. The ZK kernel counted secret_value > 18 across all MPC shares. All 5 submitted test users had age > 18, producing result = 5. Verifiable on-chain at the PBC contract.

Full Dataset Expected (age_threshold)
35
of 50 users over age 18 in full dataset

If all 50 synthetic users submitted secrets, the expected result would be 35. The PoC submitted 5 users to demonstrate the end-to-end flow.

Survey Match Query (Expected)
28
of 50 users answered “Yes” in full dataset

The ZK kernel sums secret_value (0 or 1) across all shares to get the total “Yes” count.

Privacy Guarantee
0
individual values exposed

Verified across: contract state, secret data tab, submission logs, relay output, and Cardano datum. All 5 submitted secrets encrypted for 4 MPC engines — zero raw values on-chain.

Privacy Verification

Zero Individual Data Exposed

We verified that no individual user data appears at any layer of the system.

🔒

PBC Contract State

Shows only administrator, dataset_id, query_type, min_participants. No individual ages or answers.

🔒

PBC Secret Data Tab

Shows computation status only (Complete). No ZK variables visible to any party.

🔒

Submission Log

Contains only user_id_hash and pbc_tx_id. Zero raw ages or survey answers recorded.

🔒

Relay Output

Shows truncated hashes only. No personal data passes through the relay.

🔒

Cardano Datum

Contains dataset_id and query_type only. No personal user data on Cardano.

🔒

MPC Result

Aggregate count only (5 of 5 submitted). No individual contribution can be determined from the output.

Evidence

Complete Evidence Trail

Every claim in this PoC is backed by on-chain transactions, deployed contracts, and verifiable artifacts.

ItemProofVerify
Cardano MPC Request TX: 50d28fd2bd263a84485b45280afd19bb4c3e20c24e9a4b52b6eac20418d53a57 CardanoScan →
Cardano Script Address addr_test1wzut662xhd8e4jq97fpdsml2pyqerejwzfg24red2n7gceczhkwaz CardanoScan →
PBC ZK Contract 039ed9214602f2a93eb05411f852fa78a476607634 PBC Browser →
PBC Deployment TX d1394ee403db29de119d7b6b9ed9214602f2a93eb05411f852fa78a476607634 PBC Browser →
Secret Input TX #1 7507fd18ef779c459c7248af32bee6e660f6b4ad28c0a92a44b5f87bf82628f0 PBC Browser →
Secret Input TX #2 519859f57ccc1acd44ed73fe80ae2a3c051b15ecf22e450d282891dfeeebaa6a PBC Browser →
Secret Input TX #3 407423fd9996067e8c4b5de9390bdad6c14c1da29a93273c4d4adbdb14bb63cb PBC Browser →
Secret Input TX #4 4bfe3b1466c68f8b2e73376b35677ed2592ffd859538c7ae89794846d9389f12 PBC Browser →
Secret Input TX #5 e4c158dda054b2fc9ba17a38a7fb4f8373c4720e6ce49d5d6aa749fc5b4d5f94 PBC Browser →
Computation Trigger TX d836a6fc075e9ce7f4c77d905975a77a7304818c4c229c77d91a0b36f07c54cc PBC Browser →
Aiken Source Code cardano/validators/profila_mpc.ak GitHub →
PBC Contract Source partisia/contracts/profila_mpc/src/contract.rs GitHub →
ZK Compute Kernel partisia/contracts/profila_mpc/src/zk_compute.rs GitHub →
Relay Source relay/relay.ts GitHub →
Secret Submission Script relay/submit_secrets.ts — PBC TypeScript SDK integration GitHub →
Result Display Script relay/show_result.ts — Live PBC state decoder GitHub →
Computation Trigger relay/trigger_computation.ts GitHub →
Submission Log relay/secret-submissions-log.json (no raw values) GitHub →
Full E2E Run Log docs/evidence/e2e-run-log.json GitHub →
Closeout Report docs/evidence/closeout-report.json GitHub →
MPC Result JSON relay/mpc-result.json — Cross-chain result with TX hashes GitHub →
Full Repository All source code, scripts, evidence GitHub →
Video Demos
M1 Demo — Aiken Contract Unit tests, build, deploy TX, CardanoScan inline datum YouTube →
M2 Demo — PBC Contract + Relay Rust tests, ZK contract, relay detection YouTube →
M3 Demo — Secret Inputs PBC SDK submission, on-chain TXs, privacy verification YouTube →
M4 Demo — Result & Closeout Live state decode, result display, E2E evidence YouTube →
Combined M1-M4 Demo Full end-to-end walkthrough of all milestones YouTube →