🌟 Inspiration

Chronic patients depend on continuous monitoring, accurate medical data, and immediate interventions—yet most of today’s healthcare systems remain centralized, fragmented, and prone to data loss or manipulation. IoT wearables generate valuable signals, but patients rarely own this data, and healthcare providers cannot verify its authenticity.

We were inspired to build ChainCARE to solve three problems at once:

  1. Decentralized ownership of medical data
  2. Real-time IoT monitoring with automated alerts
  3. Privacy-preserving verification using zk-proofs and on-chain logic

Polkadot’s multi-chain architecture and ink! smart contracts gave us the perfect environment to integrate IoT devices, zero-knowledge verification, and DeFi-style incentives into one secure, interoperable system.


## 🩺 What it does

ChainCARE is a decentralized IoT-health system that connects patient wearables to Polkadot through a hybrid on-chain/off-chain architecture.

✔ Key Features

  • IoT → Blockchain bridge: Wearables stream encrypted readings (glucose, ECG, oxygen, etc.) to an off-chain worker that validates and pushes signed data on-chain.

  • Zero-Knowledge Verification: Medical conditions can be validated using zk-proofs without revealing raw sensitive health metrics.

  • Decentralized Health Profile: Each patient has an on-chain identity with permissioned access for doctors, caregivers, or emergency responders.

  • Automated Medical Alerts: If a reading crosses a danger threshold, the system triggers an on-chain event and optional SMS/email/notification.

  • DeFi-based Incentives: Patients earn rewards for consistent monitoring, with tokens managed by a treasury contract.

  • Hospitals/NGOs Integration: Healthcare entities can verify patient conditions on-chain before issuing aid or prescriptions.


## 🛠️ How we built it

We designed ChainCARE as a modular Polkadot ecosystem application, combining several layers:

1. IoT Layer

  • Wearables send signed data to a secure gateway.
  • An off-chain worker (Rust) preprocesses data and generates zk-proofs (optional).

2. Blockchain Layer (ink! Smart Contracts)

We built multiple ink! modules:

  • Core Patient Registry
  • IoT Data Contract
  • Threshold Alert Logic
  • zk-Verification Module
  • Incentives + Rewards Treasury

We used:

  • cargo contract for building/deploying
  • Polkadot.js API for integration
  • Shibuya/Astar testnet for deployment
  • RPC endpoint wss://rpc.shibuya.astar.network

3. Frontend Layer

  • Polkadot.js wallet integration
  • Real-time dashboard for patients and doctors
  • Data visualization + contract interaction

4. Security Layer

  • sr25519 signing
  • Encrypted IoT payloads
  • Opt-in permissions system
  • ZK-based validation

## ⚠️ Challenges we ran into

1. Integrating IoT streams with blockchain timing

IoT data arrives frequently—blockchains don’t. We had to design batching + off-chain workers to prevent congestion.

2. zk-proofs with medical data

Generating proofs fast enough for real-time monitoring required heavy optimization and pre-processing.

3. Cross-contract calls in ink!

Managing selectors, calldata encoding, and error handling between multiple modules required deep debugging.

4. Secure patient data handling

We needed a privacy-first design that avoids raw data storage on-chain while still enabling verifiability.

5. Web3 UX for non-technical users

We simplified signing flows, permissions, and error messaging to make the system usable by patients and doctors.


## 🏆 Accomplishments that we’re proud of

  • Successfully built a full IoT → zk → ink! → Polkadot workflow
  • Designed a privacy-preserving health identity system
  • Achieved real-time IoT alerting through cross-layer coordination
  • Developed a modular ink! contract architecture for medical data
  • Implemented DeFi-style incentive mechanisms for patient behavior
  • Demonstrated that Polkadot can support life-critical applications, not just financial dApps

## 📚 What we learned

✔ Deep understanding of Polkadot architecture

RPC, parachains, ink!, cross-contract calls, storage optimization, metadata generation, WASM tooling.

✔ IoT + Blockchain synchronization

How to bridge physical-world events to on-chain logic reliably.

✔ ZK integration

Balancing privacy, speed, and verifiability.

✔ Web3 application design

Creating a healthcare system where users don't feel the complexity of Web3.

✔ Real-world decentralized identity

Granular permissioning, revocation, and multi-role access.


## 🔮 What's next for ChainCARE – IoT-zk-DeFi for Chronic Patients on Polkadot

🚀 1. Deploying on a Polkadot parachain

Migration from testnet (Shibuya) toward a dedicated health-focused parachain.

🔐 2. Full zk-SNARK/zk-STARK integration

Reducing proof generation time and expanding supported conditions.

🏥 3. Partnerships with hospitals & NGOs

To enable decentralized, verifiable patient support systems.

📱 4. Native Mobile App

Real-time alerts, QR medical identity, and IoT pairing.

💳 5. Insurance + DeFi Integration

Dynamic health-based premium adjustments, risk scoring, and rewards.

🌍 6. Expand to global low-resource regions

Where decentralized truth and automated healthcare can save lives.

Built With

+ 3 more
Share this project:

Updates