The trust layer for physical reality.
AI needs verified data. Sensors need incentives.
Markets need trust.
SEN turns the physical world into a verifiable economy of data flows β powered by Solana and cryptographic proofs.
- Context
- Architecture
- On-Chain Modules
- Technology Stack
- Prerequisites
- Install & Setup
- Local Development
- Project Structure
- Useful Commands
- Troubleshooting
- Roadmap
- Real-world data is not verifiable
- IoT networks are centralized & siloed
- Sensors lack economic incentives
- AI relies on closed & untrusted feeds
- Environmental data is opaque and gatekept
A decentralized Sensor Data Marketplace where:
| Actor | Capability |
|---|---|
| π Sensor Owners | Register sensors & stream signed data |
| ποΈ Builders / Researchers / AI Systems | Purchase or subscribe to feeds |
| β‘ Solana | Fast micropayments, trust guarantees |
| π Backend | Data ingest, validation, reputation |
Sensors become economic agents.
Data becomes an asset class.
Welcome to the Sensor Economy.
ββββββββββββββββ βββββββββββββββββββββββββββ
β Sensors β ---> β SEN Backend β ----β
β IoT / DIY HW β β Fastify + Prisma + Redisβ β
ββββββββ¬ββββββββ βββββββββ¬ββββββββββββββββββ β
β β β
β β BullMQ Workers β
β βΌ β
β ββββββββββββββ β
β β IPFS βββββββββββββββ β
β ββββββββββββββ β β
β βΌ βΌ
βΌ ββββββββββββββββ
ββββββββββββββββ Hashes / Payments β Solana Programβ
β Frontend β <ββββββββββββββββββββββββββββ β (Anchor) β
β Next.js UI β Reputation Proofs βββββββ¬βββββββββ
ββββββββ¬ββββββββ β
β WebSockets + REST β
βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ
β Real-time UI β <ββββββββββββββββββββββββ> β Blockchain Stateβ
β Subscriptions β β PDA Accounts β
βββββββββββββββββββ βββββββββββββββββββ
- Sensor registration (on-chain PDA)
- Proof-of-data hash commitment
- Pay-per-query + subscriptions
- Treasury (95%) & network vault (5%)
- Realtime WebSockets (incoming telemetry)
- Reputation engine
- Mock sensor scripts for testing
| Module | Purpose |
|---|---|
register_sensor |
Creates PDA + metadata |
submit_hash |
Commits SHA-256 hash of sensor feed |
pay_per_query |
USDC micropayment engine |
subscribe |
Access subscription w/ renewal cycle |
withdraw_earnings |
Withdraw accumulated funds |
update_reputation |
Maintains integrity score |
- Sensor
- Subscription
- Treasury
- Vault
- Reputation
Zero governance, no memecoin gimmicks β pure utility & infra.
- Solana
- Anchor 0.30.1
- SPL USDC
- PDA-based account system
- Fastify
- Prisma + PostgreSQL
- Redis + BullMQ workers
- IPFS (web3.storage)
- Zod validation
- Structured logging (Pino)
- Next.js 14 (App Router)
- Tailwind + Radix UI
- Zustand state
- Wallet Adapter (Phantom)
- Charts + dashboards
node >= 18 docker + docker compose solana-cli >= 2.x (Agave stack) anchor-cli >= 0.30.1
Verify setup:
solana --version
anchor --version
docker --version
## βοΈ **Install & Setup**
Clone repo:
git clone <repo-url>
cd sen-network
pnpm install
docker compose up -d
Set devnet:
solana config set --url https://api.devnet.solana.com
solana airdrop 2
Build:
anchor build
Deploy:
anchor deploy
Copy IDL to frontend:
cp target/idl/sen_network.json app/lib/idl/
Update program ID in:
- `Anchor.toml`
- `app/lib/idl/sen_network.json`
## π» **Local Development**
Backend:
pnpm dev:server
Frontend:
cd app
pnpm dev
Open browser β `http://localhost:3000`
sen-network/
ββ programs/
β ββ sen_network/ # Solana smart contract (Anchor)
β ββ src/
β ββ lib.rs
ββ backend/ # Fastify API + Prisma ORM + Redis queues
β ββ src/
β ββ server.ts # API entrypoint
β ββ workers/ # BullMQ job processors
β ββ prisma/ # Database schema & migrations
ββ app/ # Next.js Marketplace UI
ββ sensors/ # Sensor management UI
ββ market/ # Data marketplace UI
ββ lib/idl/ # IDL imported from Anchor build
solana-test-validator # local chain
solana-keygen new # new wallet
anchor build --idl # rebuild IDL
cp target/idl/*.json app/lib/idl/ # sync IDL to UI
docker compose restart # infra reset
| Issue | Fix |
|---|---|
| Wallet not connecting | Phantom β enable Devnet |
| IDL missing | anchor build && cp idl |
| Program mismatch | Update Anchor.toml & UI IDL |
| Docker errors | docker compose down && docker compose up |
β Phase 1 β MVP
- Sensor registry
- Data proof hashing
- Wallet connect UI
- Mock data ingest + charts
π Phase 2 β Real-World Readiness
- Live sensor firmware script
- Strong reputation scoring
- USDC subscriptions
- ZK-based data integrity (optional)
π Phase 3 β Scale
- Mobile app
- LoRaWAN gateway integration
- Community sensor kits (Raspberry Pi)
- Municipal + research partnerships
Goal: AI-ready real-world data rails.
ValentΓn MartΓnez
Builder β PhD Candidate on Technological Innovation | COO Frutero Club | Cyberpunk Panther πβ‘οΈ
https://github.com/ValenteCreativo
MIT License β **Open source for planetary intelligence & resilience π**s