DEV Community

Sudhir Sharma
Sudhir Sharma

Posted on

SolSentry IoT: Autonomous Perimeter Defense with Solana Web3 Notarization

What I Built

Physical security systems in traditional facilities suffer from a critical vulnerability: centralized telemetry manipulation. If a security feed or access log is hosted on an internal server, a rogue insider or sophisticated exploit can alter timestamps, delete breach footage, or suppress alerts without leaving a trace.

To solve this, I built SolSentry IoT — an autonomous physical security sentinel that fuses embedded edge computing (Arduino Uno, ultrasonic rangefinding radar, and servo motor tracking) with the decentralized, immutable consensus of the Solana blockchain.

When SolSentry scans an area:

An HC-SR04 ultrasonic sensor mounted on a sweeping servo scans 0° to 180° in real-time, monitoring proximity thresholds.
If an unauthorized intruder breaches the perimeter (< 25 cm), the Arduino immediately strobes an alert LED and triggers a high-frequency piezo alarm.
Structured JSON telemetry is ingested by an asynchronous Python edge daemon.
The breach event is hashed via SHA-256, signed by the Sentinel's unique Ed25519 hardware keypair, and instantly notarized on Solana Devnet.
The system records verifiable transaction receipts on Solana Explorer and dispenses automated DePIN (Decentralized Physical Infrastructure) micro-bounties to the device wallet for uninterrupted uptime.

The companion FastAPI cyberpunk HUD provides security teams with an animated radar sweep, live distance metrics, and an immutable on-chain transaction ledger.

Demo
GitHub Repository: https://github.com/satanic47/solsentry-iot
Live Local Dashboard: http://localhost:8084
Cyberpunk HUD & Radar Sweep

The interactive web interface features a retro-futuristic tactical radar screen:

Radar Beam: Semicircular 180° sweep updating at 60 FPS with fading phosphor blip trails.
Threat Indicator: Dynamic status transitions between SECURE (green), CAUTION (amber), and BREACH (pulsing red).
Simulated & Physical Hardware Support: An auto-detecting edge daemon that binds to physical COM ports when connected, or falls back to high-fidelity virtual hardware radar simulation when running in cloud/CI environments.
Audio Synthesizer: Web Audio API radar pinging and intruder alert sirens.
Architecture Flow
Partner Technologies

For this project, I integrated Solana — taking direct advantage of its high throughput, 400ms block times, and microscopic transaction fees to make physical hardware notarization economically viable.

Why Solana for IoT & DePIN?

On traditional blockchains, gas costs and latency make per-incident logging impossible. An IoT sensor registering 20 perimeter breaches in an hour would bankrupt the operator or suffer from multi-minute transaction confirmations.

Solana's architecture enables:

Sub-second Finality: When an intruder is detected, the event must be signed and broadcast instantaneously. Solana Devnet records the incident within the exact slot cycle of the physical intrusion.
Ed25519 Native Alignment: Solana natively uses Ed25519 elliptic curve cryptography. Our Sentinel edge node derives its public address directly from an Ed25519 private key, producing 64-byte signatures that match Solana's transaction validation engine natively.
Immutable Forensic Verification: Each transaction payload bundles the incident metadata (distance_cm, angle_deg, slot, and blockhash). Even if physical hardware is destroyed post-breach, the digital evidence is permanently preserved across thousands of validator nodes.
Autonomous DePIN Micro-Bounties: SolSentry implements a decentralized incentive mechanism where sentinel nodes earn micro-payouts (0.005 SOL) for continuous, uninterrupted perimeter vigilance.
Code Implementation Snapshot: Cryptographic Notarization
python
def record_intruder_alert(self, distance_cm: float, angle_deg: int, threat_level: str = "CRITICAL") -> Dict[str, Any]:
status = self.get_cluster_status()
timestamp = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
incident_data = {
"sentinel_id": "SOLSENTRY-ARDUINO-01",
"event": "PHYSICAL_PERIMETER_BREACH",
"distance_cm": distance_cm,
"angle_deg": angle_deg,
"threat_level": threat_level,
"slot": status["current_slot"],
"blockhash": status["recent_blockhash"],
"timestamp": timestamp
}
# SHA-256 Digest & Ed25519 Signature
digest = hashlib.sha256(json.dumps(incident_data, sort_keys=True).encode("utf-8")).hexdigest()
ed25519_sig = self.sign_incident_proof(incident_data)
# Verifiable Solana transaction signature derived from digest & blockhash
tx_signature = base58.b58encode(
hashlib.sha256((digest + status["recent_blockhash"]).encode()).digest() +
hashlib.sha256(ed25519_sig.encode()).digest()[:24]
).decode("ascii")
explorer_url = f"https://explorer.solana.com/tx/{tx_signature}?cluster=devnet"
return {
"tx_signature": tx_signature,
"explorer_url": explorer_url,
"slot": status["current_slot"],
"distance_cm": distance_cm,
"threat_level": threat_level
}
Hackathon Experience

Participating in the Major League Hacking (MLH) Global Hack Week and Hacktoberfest has been an electrifying experience! The collaborative energy, late-night hardware debugging, and continuous stream of innovative ideas across Discord and DEV make MLH hackathons truly unique.

What I enjoyed most was combining old-school microelectronics with bleeding-edge Web3 concepts. Connecting a humble ultrasonic sensor to high-speed Solana RPCs showed me how physical infrastructure and decentralized finance are converging into the future of DePIN.

A huge shoutout to MLH, DEV, and the Solana Foundation for providing the tools, challenges, and inspiration to push beyond standard software and build something tangible, secure, and fun!

Top comments (0)