MPC as a Layer 2 Service to Cardano

Project Catalyst #1200045 — Proof of Concept by Profila AG

2
Blockchains
15
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.

9 / 9 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

Contract0395e785...c31417
Administrator003942bd...605712
dataset_idprofila_test_v1
query_typeage_threshold
min_participants3
Secret Inputs5 on-chain TXs
ZK VariablesnextVariableId = 5
Calculation StatusWAITING
computation_completefalse
ShardShard1
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.

Age Threshold Query (Expected)
35
of 50 users over age 18 in full dataset

The ZK kernel counts secret_value > 18 across all MPC shares without revealing any individual age. 5 real secrets submitted on-chain via PBC TypeScript SDK — computation pending trigger.

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 (Waiting). 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 (35). 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 0395e78580157893cde88165d1340e0b9992c31417 PBC Browser →
PBC Deployment TX 8e8ea840a7bb7c7a98c0df0a95e78580157893cde88165d1340e0b9992c31417 PBC Browser →
Secret Input TX #1 c4c0450bbb06a9ce5fcce56229e88e0e51ec5aa5a1d706dde1c4313340635e96 PBC Browser →
Secret Input TX #2 d774f1f5e64cc14cb220b5d324fe47d319c9f5ceb56eb5a7dd75d3f861f811eb PBC Browser →
Secret Input TX #3 d4ce72e1952064735132d629a3fd3d57f27c8914e57c05ead53111408e2b01a1 PBC Browser →
Secret Input TX #4 a61222941b834e8b3cb5afcadaae7ca50b2b273136a266b0a04e5786335390dd PBC Browser →
Secret Input TX #5 9556d0f653e53de13f3ac4d29338d2ff6c4145cc95a78c1a553a77d880313c8d 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 →