Key Concepts¶
Understanding AirChain's core concepts and architecture.
System Architecture¶
AirChain consists of three main layers:
1. Sensor Network Layer¶
- 1,000+ PMS5003 air quality sensors
- Raspberry Pi Pico-based edge devices
- 4G cellular connectivity (A7670SA modules)
- Solar + battery powered for off-grid operation
2. Data Pipeline Layer¶
- MQTT message broker for real-time data ingestion
- FastAPI backend with PostgreSQL database
- Keycloak OAuth authentication
- Real-time WebSocket updates to dashboard
3. Blockchain Layer¶
- Cardano blockchain for immutable data anchoring
- Merkle tree proofs for data integrity
- AIRQ token rewards for sensor operators
- Smart contracts for automated payouts
Core Components¶
Sensors¶
Each sensor measures: - PM2.5 - Fine particulate matter (≤2.5 micrometers) - PM10 - Coarse particulate matter (≤10 micrometers) - CO2 - Carbon dioxide concentration - Temperature - Ambient air temperature - Humidity - Relative humidity percentage
Readings taken every 5 minutes, 24/7.
Air Quality Index (AQI)¶
AQI is calculated from PM2.5 and PM10 concentrations:
- 0-50: Good (Green)
- 51-100: Moderate (Yellow)
- 101-150: Unhealthy for Sensitive Groups (Orange)
- 151-200: Unhealthy (Red)
- 201-300: Very Unhealthy (Purple)
- 301-500: Hazardous (Maroon)
Blockchain Verification¶
Every hour, all sensor readings are:
- Hashed - Each reading gets a SHA-256 hash
- Merkle Tree - Hashes organized into a binary tree
- Merkle Root - Single hash representing all readings
- Cardano Transaction - Root anchored on-chain
- Proof Generated - Individual proofs for each reading
This allows anyone to cryptographically verify any reading's authenticity.
AIRQ Token¶
- Total Supply: 1,000,000,000 AIRQ
- Blockchain: Cardano (Native Asset)
- Purpose: Reward sensor operators
- Earning Rate: ~10 AIRQ per day per sensor
- Distribution: Automated via smart contracts
Data Flow¶
Sensor → MQTT → Backend → Database
↓
Merkle Tree
↓
Cardano Blockchain
↓
Verification API
- Sensor takes reading every 5 minutes
- Published to MQTT broker via 4G
- Backend validates and stores in PostgreSQL
- Every hour, batch processed into Merkle tree
- Merkle root submitted to Cardano
- Operators earn AIRQ tokens
- Anyone can verify via API
Access Tiers¶
Free Tier¶
- 100 API requests/day
- Real-time dashboard access
- Mobile app (Android/iOS)
- SMS alerts (1 location)
- Historical data (7 days)
Premium Tier (₦5,000/month)¶
- 10,000 API requests/day
- Webhooks for real-time alerts
- Historical data (1 year)
- Bulk CSV downloads
- Priority support
Geographic Coverage¶
Current deployment: - Victoria Island - Lekki - Uyo
Target: 100% coverage of Lagos metropolitan area by Q2 2026.
Trust Model¶
AirChain is trustless - you don't need to trust us:
- All sensor readings are public
- Blockchain anchors are immutable
- Anyone can verify authenticity
- Open-source verification code
- Transparent operator payouts