Hedera Integration

MediPact is built on four core pillars of Hedera: HCS, EVM, Accounts, and HBAR.

Core Hedera Services

ServiceUsageImpact
HCSImmutable storage of consent & data proof hashesUnchangeable audit trail, ~$0.0001/message
Hedera EVMConsentManager & RevenueSplitter smart contractsAutomated consent registry & revenue distribution
Hedera Account IDsNative accounts (0.0.xxxxx) for all usersSeamless UX, direct HBAR transfers
HBARMicropayments for 60/25/15 revenue splitLow-cost, instant settlements

Integration Flow

Hedera Account Creation

Hospitals & Researchers

Accounts are created during registration. The platform generates an ECDSA key pair, creates a Hedera account (0.0.xxxxx) with EVM compatibility, and stores the encrypted private key.

Patients

Accounts are created immediately during patient registration (same as hospitals and researchers). The platform generates an ECDSA key pair, creates a Hedera account (0.0.xxxxx) with EVM compatibility, and stores the encrypted private key. This ensures patients have accounts ready for revenue distribution.

Process

Platform generates keys → creates Hedera account (operator pays ~$0.05) → encrypts private key → stores account ID and EVM address in database. All accounts are EVM-compatible for smart contract interactions.

Why Hedera?

✅ HCS is unique

No other blockchain offers immutable message logging

✅ Low fees

Enables micropayments at scale (~$0.0001 per HCS message)

✅ High throughput

10,000+ TPS for thousands of daily queries

✅ Carbon negative

Environmentally sustainable

✅ Native accounts

Seamless UX without complex wallet management

✅ EVM compatible

Smart contracts with low gas costs

HCS Topics

MediPact uses Hedera Consensus Service (HCS) topics to store immutable proofs of consent and data hashes. Each message submitted to HCS is cryptographically signed and timestamped, creating an unchangeable audit trail that can be verified on HashScan.

Consent Topic

Stores consent records with anonymous patient IDs, HCS topic IDs, data hashes, and timestamps. Each consent submission creates a new message on the HCS topic.

Data Proof Topic

Stores cryptographic hashes of anonymized datasets. Researchers can verify data integrity by comparing dataset hashes with HCS messages.

HBAR Micropayments

Revenue distribution is handled automatically by the RevenueSplitter smart contract. When a researcher purchases a dataset:

  1. Payment is received in HBAR by the RevenueSplitter contract
  2. Contract automatically splits: 60% Patient, 25% Hospital, 15% Platform
  3. HBAR is transferred directly to Hedera accounts (0.0.xxxxx)
  4. All transactions are verifiable on HashScan

Benefits: Trustless, Transparent, Instant, Low fees (~$0.0001 per transaction)