Inspiration
The Indian FinTech market has a massive trust problem. Between rampant fake transaction screenshots, malicious "collect requests," and physical QR hijacking, businesses are bleeding revenue. Current solutions rely on reporting fraud after the money is gone. I was inspired to build ShieldLedger to shift the paradigm: an active, intelligent gateway that intercepts and kills fraudulent transactions before the network ever settles them.
What it does
ShieldLedger is an AI-powered Full-Stack Ledger Security platform. It operates as an active anomaly engine to protect merchants and P2P transfers using five core defense layers:
- Fake Collect Request Blocking: OpenAI intent parsing catches scammers masking DEBIT requests as "cash back prizes."
- QR Hijack & Geo-Velocity Tracking: Dynamic rotating QRs cross-reference the scanner's GPS against the merchant's physical terminal to kill remote attacks.
- Remote Screen Injection Killswitch: Instantly freezes the wallet if an active AnyDesk/TeamViewer session is detected during authorization.
- Deepfake & Mule Detection: Analyzes peer-cluster vector distances to flag synthetic authorizations.
- Agentic Anomaly Engine: Utilizes OpenAI's reasoning and embedding models to score device fingerprints and spend patterns in real-time.
How we built it
We engineered a production-grade architecture built for high-speed transaction verification.
- Frontend: React, Vite, and TailwindCSS for a highly responsive merchant dashboard.
- Backend: Node.js API with a PM2 daemonized environment deployed on an AWS EC2 (
t3.micro) instance. - Database: CockroachDB integrated with PGVector to store and query the Agentic Memory Stream.
- AI Engine: Powered exclusively by the OpenAI API (GPT-4o for real-time text/intent reasoning and
text-embedding-3-smallfor vectorizing transaction behaviors).
The Math Behind the Anomaly Engine
To detect Mule Clusters and Deepfake Transfers, ShieldLedger converts transaction metadata (device fingerprint, geolocation, merchant baseline) into high-dimensional embeddings using OpenAI. We then compute the Cosine Similarity between the active transaction vector $\mathbf{A}$ and the trusted historical baseline vector $\mathbf{B}$:
$$\text{Similarity}=\cos(\theta)=\frac{\mathbf{A}\cdot\mathbf{B}}{|\mathbf{A}||\mathbf{B}|}$$
Simultaneously, the engine evaluates the randomness of the transaction timing to prevent bot-driven brute force attacks. We calculate the Temporal Entropy $H(T)$ of the user's request frequency:
$$H(T)=-\sum_{i=1}^{n} P(t_i) \log_2 P(t_i)$$
If the cosine similarity drops below our safety threshold while the temporal entropy spikes, the smart contract flags an anomaly and the account is immediately locked.
Challenges we ran into
Deploying a modern Vite/React build directly to an open AWS instance without a reverse proxy like Nginx initially triggered strict DNS Rebinding security blocks. Vite's underlying server aggressively rejected our custom domain and dynamic IP. I had to deep-dive into Vite's backend configuration to manipulate the allowedHosts array and hard-reset the PM2 background processes to finally expose the production build securely to the internet. Additionally, managing the state lifecycle of the 6-second rotating dynamic QR codes required precise synchronization between the frontend timers and the backend cryptographic session tokens.
What we learned
I leveled up significantly in cloud infrastructure and AI integration. I learned how to manage production-grade cloud deployments on AWS using PM2 process managers, debug active port forwarding/firewall rules, and properly link domain records. More importantly, I learned how to move beyond basic LLM chat prompts and use OpenAI's embedding models in conjunction with a vector database (PGVector) to perform complex, mathematical anomaly detection on live data streams.
Built With
- amazon-web-services
- claude
- cloud
- cockroachdb
- java
- mcp
- node.js
Log in or sign up for Devpost to join the conversation.