About
## Wave 1 submission
Wave 1 — Foundation & Architecture
Completed the full protocol design and technical architecture for TrialVault, a FHE-native clinical trial infrastructure platform built on Fhenix CoFHE.
Deliverables this wave:
- System architecture defined across 3 layers: Client (Next.js + fhevmjs SDK), Fhenix FHE Blockchain (6 smart contracts), and decentralized storage (IPFS + The Graph)
- Smart contract interfaces designed for all 6 modules: PatientVault.sol, TrialMatcher.sol, LicenseMarket.sol, MultiHospitalTrial.sol, ResultIntegrity.sol, EventReporter.sol
- Full FHE matching logic specified: FHE.and(FHE.gte(patientAge, minAge), FHE.lte(patientAge, maxAge)) — blind eligibility evaluation returning only encrypted ebool per patient
- Patient data flow documented end-to-end: client-side encryption → IPFS upload → on-chain CID commitment → ERC-721 Data NFT mint
- Result integrity mechanism designed: Merkle root committed on-chain before analysis runs — suppression cryptographically impossible
- Technical whitepaper published covering FHE type system, all module workflows, security threat model, and market analysis
## Wave 2 submission
FHE Clinical Trial Contracts Live on Testnet Clinical trial data cannot go on transparent rails. HIPAA, GDPR, and FDA 21 CFR Part 11 all require that patient records stay private — even from the institutions running the analysis. TrialVault is the first on-chain clinical trial platform where patient eligibility is computed over fully encrypted data. No raw records ever touch the chain. What we shipped this wave: → PatientVault.sol deployed on Arbitrum Sepolia — patient health records stored as FHE-encrypted euint128 values. Only the patient holds the decrypt permit via FHE.allowSender(). → TrialMatcher.sol — encrypted eligibility scoring using FHE comparison operators. Pharma researchers receive a pass/fail result; zero underlying patient data is ever revealed. → ResultIntegrity.sol — on-chain Merkle commitment to trial outcome hashes. Tamper-proof audit trail without exposing trial data. → Full @cofhe/sdk integration: useEncrypt(), useWrite(), useDecrypt() hooks working end-to-end. Patient Portal (Next.js) — wallet connect, FHE permit flow, encrypted record submission live. → Fully migrated from fhenixjs to CoFHE SDK.
## Wave 3 submission
🧬 TrialVault — Multi-Hospital FHE Compute + Adverse Event Engine Live TrialVault is FHE-native clinical trial infrastructure. Under HIPAA multi-site trial protocols, a hospital in Delhi cannot share patient records with a hospital in Mumbai — but both need to jointly determine patient eligibility for the same trial. 🔗 GitHub: https://github.com/arpit2222/trialvault 📦 Contracts Deployed on Arbitrum Sepolia: TrialRegistry.sol (Wave 1 — repo now fully populated per judge feedback from Wave 1) — encrypted patient consent as ebool ciphertext. ACL: FHE.allow(handle, hospitalAddr) for permissioned hospital-only access. MultiHospitalTrial.sol (Wave 3) — multi-party FHE compute. Each hospital calls submitCohort() with encrypted eligibility metrics: inEuint32 (age range flags), inEuint8 (condition code), inEuint64 (treatment history hash). Contract runs FHE.add() across all hospital cohorts on ciphertext. joinTrial() eligibility query checks encrypted criteria — no hospital cohort is readable by any other party, including the contract operator. EventReporter.sol (Wave 3) — encrypted adverse event tracking. Hospitals submit encrypted event severity as inEuint32. FHE.gte(encEventCount, encThreshold) fires an on-chain alert if aggregate adverse events cross the safety threshold — without revealing which hospital submitted which events or how many individual events triggered the alert. Threshold set by the trial coordinator as encrypted parameter. 🛠 Wave 3 — What We Built: Multi-hospital eligibility flow working end-to-end on Arbitrum Sepolia testnet: 3 simulated hospital wallets each submit encrypted cohort data, MultiHospitalTrial.sol aggregates via FHE.add(), researcher calls getEligibleCount() — receives encrypted result, decrypts locally via permit. No cross-hospital data leakage at any step. Adverse event alerting live: FHE.gte() threshold comparison runs entirely on ciphertext. Alert fires on-chain (EventReporter.sol emits AlertTriggered event) without revealing underlying event records. ACL model: FHE.allowSender() per hospital for their own cohort data, FHE.allow(handle, regulatorAddr) for regulatory audit access, FHE.allowThis() for contract-internal aggregation. Multi-party trust model with no single point of exposure. 20+ passing Hardhat tests: cohort submission, eligibility query, adverse event threshold, multi-hospital ACL isolation, regulatory audit permit flow. 📈 Why Only FHE Solves This: HIPAA multi-site trial rules require that patient records cannot be shared between institutions. ZK proofs can verify a patient meets a criterion — they cannot aggregate eligibility counts across multiple encrypted hospital cohorts. Trusted execution environments require hardware trust assumptions that hospitals and regulators reject. Commit-reveal requires a reveal phase that exposes records. FHE.add() across multiple hospital ciphertexts is the only primitive that satisfies the legal requirement while producing a usable research output.
## Wave 4 submission
Patient Data Vault Licensing (Live): Patients mint encrypted health data as ERC-721 NFTs. Pharma purchases decryption keys via atomic swap. Patient receives USDC royalties instantly. → Multi-Institution Matching: 3+ hospital networks can now pool encrypted cohort data without exposing individual records. FHE.add() aggregates matches on-chain. Zero inter-hospital data leakage. → Adverse Event Threshold Alerts: Encrypted event counts trigger on-chain alerts if safety threshold breached — without revealing which hospital or which events triggered it. Alert fires on ciphertext. → Full @cofhe/sdk: Client-side encryption, encrypted record submission, permit-based decryption. No server ever touches plaintext. HIPAA & FDA 21 CFR Part 11 compliant. Testing & Validation:
30+ Hardhat tests: data licensing, multi-hospital aggregation, royalty distribution, threshold logic Live deployment on Arbitrum Sepolia with 5 simulated hospital wallets Merkle root of full dataset committed pre-analysis (suppression cryptographically impossible)
Deliverables:
🔗 GitHub: https://github.com/dehixorg/trialVault 🎯 Live Demo: https://dehix-frontend.vercel.app/ Why This Matters: $54B clinical trial market. 57% of pharma cite data privacy as #1 blocker to AI adoption. TrialVault solves the legal impossibility: patients own their data, institutions share encrypted insights, AI trains on encrypted cohorts. Only TrialVault makes this happen without trusted intermediaries.
## Wave 5 submission
We vastly expanded the core FHE compute architecture to deliver a complete, end-to-end decentralized application ready for enterprise pharma adoption.
1. zkKYC & On-Chain Identity Verification To prevent Sybil attacks and ensure trial integrity, we built an Identity Verification layer. Patients undergo simulated zkKYC (mock-linking EHR or Government ID) which generates a cryptographic hash. This sets isVerified: true on their profile, emitting an on-chain event and boosting their trust score for Pharma sponsors—all without revealing their actual identity.
2. The Global Ledger (Network Explorer)
We built a live, transparent Network Explorer that tracks the heartbeat of the TrialVault ecosystem. It aggregates:
Trial Deployments: Showing new clinical protocols (Phase I-IV) entering the network. Patient Enrollments: Tracking when a patient matches criteria and enrolls (displaying encrypted ciphertexts). Verification Events: Real-time stream of zkKYC identity proofs. This proves the ecosystem is deeply interconnected and functioning as a global, trustless ledger. 3. Patient Vitals Vault (Self-Custody) Patients now have a dedicated portal to input their core vitals (Age, Heart Rate, Blood Pressure). Using the Fhenix CoFHE stack, these values are mathematically encrypted into FHE ciphertexts (euint8/euint32). The platform sees zero plaintext. The patient retains complete self-custody of their encrypted health data.
4. Deep Pharma Trial Parameterization
Pharma sponsors can now create deeply parameterized clinical trials. They define Phase, Protocol, and encrypted eligibility thresholds. TrialMatcher.sol receives only ciphertext. When patients apply, FHE comparison operators (FHE.and, FHE.gte) run entirely on the encrypted data, returning a boolean eligibility flag without exposing the underlying patient vitals.
📈 Why Only FHE Solves This
HIPAA multi-site trial rules require that patient records cannot be shared between institutions.
ZK Proofs can verify a patient meets a criterion, but cannot aggregate eligibility counts across multiple encrypted cohorts. Federated Learning is susceptible to gradient inversion attacks. TrialVault using FHE is the ONLY primitive that satisfies the legal requirement of absolute data privacy while producing a mathematically guaranteed, usable research output for Pharma.
From the public Akindo product page. Votes, swipes and the judge score are hackfeed's own.





