SENTINEL — Midnight Hackathon Submission
Project Story
Inspiration
Your AI agent just visited a wallet-drainer. It didn't know.
AI agents are browsing the internet without security awareness. They click links, visit sites, and approve transactions — with no way to know what's safe. One malicious URL. One wallet drainer. Your users pay the price.
We built SENTINEL to fix this. But we realized that security itself needs to be private. Users shouldn't have to expose their browsing history, URL patterns, or security habits just to be protected. That's where Midnight comes in.
What SENTINEL Does
SENTINEL is an AI Security Layer for the Agentic Internet. Any agent — or any user — can call one API to get clearance before navigating to a URL.
Key Capabilities
| Feature | Description |
|---|---|
| 🎣 Phishing Detection | Identifies fake login pages and credential stealers |
| 💰 Wallet Drainer Protection | Detects malicious scripts that drain crypto wallets |
| 🦠 Malicious Script Detection | Scans DOM for suspicious JavaScript patterns |
| 🔍 DeFi Scam Detection | Identifies fake airdrops and rug pull patterns |
| 🚨 Real-Time Threat Scoring | AI-powered risk scores from 0-100 |
Privacy-First Architecture
With Midnight's zero-knowledge technology:
- URL data is processed confidentially — your browsing patterns stay private
- Payments are shielded — transaction history is never publicly visible
- User-controlled data — all security logs are encrypted, accessible only by your wallet
- ZK proofs verify threats — we detect dangers without revealing what you searched for
How We Built It
Tech Stack
| Layer | Technology |
|---|---|
| Frontend | Next.js 16+, TypeScript, React 19, Tailwind CSS |
| AI/ML | Groq Llama 3.3 70B (multi-agent orchestrator) |
| Security | Playwright (sandbox browser isolation) |
| Governance | Civic AI (guardrails, audit trails) |
| Blockchain | Midnight (DApp Connector API, private payments) |
| Deployment | Render, Vercel |
Midnight Integration
We integrated Midnight's DApp Connector API to handle:
- Wallet Connection — Users connect their Lace wallet to SENTINEL
- Confidential Payments — Pay 0.5-2 MID per security scan
- Transaction History — View all payments in the Midnight Ledger
- Privacy Dashboard — Full control over encrypted security data
Payment Costs
| Service | Cost (MID) |
|---|---|
| URL Clearance Check | 0.5 MID |
| Sandbox Scan | 1.0 MID |
| Threat Forecast Analysis | 0.3 MID |
| Audit Report Export | 0.2 MID |
| Deep Scan (Advanced AI Model) | 2.0 MID |
Architecture Flow
User connects Lace wallet ↓ Requests URL clearance ↓ Payment verified on Midnight (0.5-2 MID) ↓ Playwright sandbox scans URL in isolation ↓ Groq AI analyzes threat patterns ↓ Civic AI logs with full audit trail ↓ Threat verdict returned (safe/warning/block) ↓ Privacy-preserving record stored on Midnight
text
Challenges We Faced
1. Real Midnight Integration
Learning the DApp Connector API and wallet integration was our biggest technical challenge. We built the fake integration first, then systematically replaced it with real Midnight SDK calls. The key was understanding the window.midnight API and the getShieldedBalances() and makeTransfer() functions.
2. Multi-Agent Orchestration
Getting multiple AI agents (ThreatScout, SandboxAgent, CivicGovernanceAgent) to coordinate through Groq's LLM was complex. We used a specialized orchestrator prompt that reads threat context and decides which agents to invoke in what order.
3. Privacy-First Design
Balancing real-time security with zero-knowledge privacy required careful architecture. We used Midnight's shielded state to keep user data private while maintaining verifiable security checks. The key insight: only the threat verdict is recorded on-chain, never the raw URL data.
4. Sandbox Performance
Playwright scans take 2-5 seconds, which felt slow. We added streaming SSE updates so users see real-time progress instead of waiting for a full result.
What We Learned
- Midnight's DApp Connector API makes wallet integration straightforward with
connect(),getShieldedAddresses(), andmakeTransfer() - Zero-knowledge proofs can power real-world privacy applications — users get security without sacrificing privacy
- AI + blockchain privacy is a powerful combination — secure AI inference with private payments
- Ship fast, iterate smarter — building fake-first then replacing with real integration is a winning hackathon strategy
- Privacy is a feature, not a limitation — Midnight's architecture proves this
What's Next
- 🚀 Deploy SENTINEL on Midnight mainnet
- 🤖 Add more AI threat detection models (MEV detection, smart contract vulnerabilities)
- 📱 Build a mobile app for on-the-go URL scanning
- 🤝 Partner with DeFi protocols for integrated security
- 🔒 Add social recovery for wallet users
- 📊 Expand the Privacy Dashboard with more data controls
Try It Out
- Live Demo: https://sentinel-sandbox.onrender.com
- GitHub: https://github.com/atuljha-tech/SENTINEL
Built With
- cybersecurity
- groq
- midnight
- nextjs
- playwright
- sandbox
- tailwindcss
Log in or sign up for Devpost to join the conversation.