💡 Inspiration
As AI agents (like Devin or custom LLM assistants) transition from answering questions to executing real-world tasks, a critical security gap emerges: giving unconstrained credit card access or API keys to AI is a massive financial risk. We realized the future of "Agentic Commerce" needs a Zero-Trust gateway—a system where AI proposes, but deterministic cryptographic code and human biometrics decide.
⚙️ What it does
Nexus is an enterprise-grade middleware that sits between AI agents and financial payment gateways (like PayPal).
- Deterministic Warrants: Agents are issued limited "warrants" (e.g., $20 budget, max 5 transactions/hour).
- Zero-Trust Escrow: If an agent attempts a transaction within its limits, the system auto-captures the funds. If it exceeds the threshold, the transaction is locked in an
ESCALATEstate. - Human-in-the-Loop Biometrics: High-value escalations instantly ping the human operator via Telegram deep-links. The operator approves the transaction cryptographically using a hardware Passkey (WebAuthn via FaceID/Fingerprint).
- Tamper-Evident Ledger: Every decision, transition, and authorization is recorded in an immutable, hash-chained, Ed25519-signed SQLite ledger.
🛠️ How we built it
- Backend Core: Built with Python & FastAPI.
- Ledger Security: We used SQLite with a strict
BEGIN IMMEDIATEtransaction model to eliminate double-spend race conditions. We implemented an offline-verifiable hash-chain using Python'scryptographylibrary (Ed25519 signatures). - Frontend / Operator Dashboard: Built using Next.js, React, and Tailwind CSS. It features a live-sync smart polling mechanism for real-time transaction monitoring.
- Biometric Auth: Integrated WebAuthn (Passkeys) for hardware-backed, phishing-resistant approvals.
- Alerts & Actions: Connected a Telegram Bot for instant alerts with inline deep-links routing back to the dashboard.
- Financial Settlement: Integrated the PayPal REST API (Sandbox) to execute real money movement once a human cryptographically signs the authorization.
🚧 Challenges we ran into
- iOS Safari WebAuthn Restrictions: Apple’s strict security model blocks auto-triggered Passkey prompts. We had to architect a seamless click-gated modal flow to ensure biometric prompts only trigger upon explicit user taps.
- Telegram Link Previews: Telegram bots auto-fetch URLs to generate previews. This background fetching risked prematurely interacting with our deep links. We solved this by hardening the API payload to disable web page previews and ensuring all rejections were strictly POST requests behind a confirmation click.
- React State Cascading Renders: Managing real-time data sync alongside biometric challenge state caused React rendering conflicts, which we optimized using
setTimeoutwrappers to decouple state updates.
🏆 Accomplishments that we're proud of
- Successfully achieving a true Zero-Trust environment where the LLM is completely isolated from the final decision-making logic.
- Building a Standalone JSON Audit Proof. The system generates a cryptographic bundle that a third-party auditor can verify completely offline via a CLI script (
nexus_verify.py), proving 100% chain integrity. - Closing the financial loop seamlessly: Order -> Deterministic Gate -> Telegram -> FaceID -> PayPal Sandbox.
📖 What we learned
- How to implement a single-writer ledger pattern to prevent double-spending without needing heavy infrastructure.
- Advanced WebAuthn protocol mechanics and cross-platform (Desktop vs iOS) behavioral quirks.
- Translating theoretical "Human-in-the-loop" AI safety concepts into a concrete, working codebase.
🚀 What's next for Nexus
- Enterprise Webhooks: Adding signed outbound webhooks to sync ledger events (Captures/Voids) with ERP systems like Slack, SAP, or NetSuite.
- Smart Anomaly Guardrails: Adding deterministic velocity and new-merchant heuristic checks to the warrant definitions.
Built With
- ed25519
- fastapi
- google-gemini
- nextjs
- passkeys
- paypal
- python
- render
- sqlite
- tailwindcss
- telegram-bot
- typescript
- vercel
- webauthn
Log in or sign up for Devpost to join the conversation.