Inspiration
The secondary loan market is a multi-trillion-dollar industry plagued by inefficiency. When a bank wants to sell a loan on the secondary market, the process typically takes 60+ days to complete—a timeline filled with manual paperwork, opaque communication channels, and unexpected delays that frustrate both buyers and sellers.
We witnessed how stock trading was revolutionized by digital platforms that brought transparency, speed, and intelligence to what was once a slow, phone-based process. We asked ourselves: Why can't the same transformation happen for loans?
The loan market deserves better. Traders deserve to know exactly where their deals stand. Buyers deserve intelligent tools to make informed decisions. The entire ecosystem deserves a platform built for the modern era—and that's what inspired us to build LoanChain.
What it does
LoanChain is a comprehensive loan trading platform that reimagines every step of the secondary loan market:
Settlement Tracker (Our Core Innovation)
The heart of LoanChain is our visual Settlement Tracker that transforms the opaque 60-day process into a transparent, manageable journey. It breaks down settlement into four clear phases:
- KYC & Compliance - Buyer verification and regulatory checks
- Documentation Review - Credit agreements, assignment documents, legal review
- Agent Bank Processing - Transfer registration, record updates
- Final Settlement - Payment processing and ownership transfer
Each phase shows real-time progress, task completion, and blocker alerts that surface issues before they cause delays.
AI-Powered Risk Analysis
Every loan displays an instant AI-generated risk score analyzing credit ratings, sector risks, pricing fairness, and maturity considerations. Traders get professional-grade insights in seconds, not days.
AI Deal Negotiator
Our most innovative feature—an intelligent negotiation assistant that:
- Analyzes market conditions and comparable loans
- Recommends optimal starting prices and walk-away thresholds
- Simulates seller responses to different offer strategies
- Provides talking points and identifies deal breakers
Buyers can test unlimited negotiation scenarios before making real offers.
AI-Verified KYC Onboarding
Instead of weeks of manual document review, our AI instantly verifies identity documents, extracts key information, and provides confidence scores. Documents meeting the 70% threshold are approved immediately—dramatically reducing onboarding friction.
Real-Time Trading Board
A modern marketplace interface with advanced filtering, live updates via WebSockets, and comprehensive loan details. Every action—new interests, phase changes, blocker resolutions—updates instantly across all connected users.
How we built it
We architected LoanChain as a modern TypeScript monorepo with clear separation of concerns:
Backend Stack:
- Express 5 REST APIs with resource-based routing
- MongoDB + Mongoose for flexible document storage of complex loan structures
- Socket.IO for real-time bidirectional WebSocket communication
- JWT + Passport.js for authentication with OAuth support
- OpenAI GPT-4o-mini powering all AI features (risk analysis, chat, document verification, negotiation intelligence)
- Zod for runtime schema validation
Frontend Stack:
- React 19 with TypeScript for type-safe UI development
- Vite for lightning-fast builds and hot module replacement
- TanStack Query for intelligent server state management with caching
- Zustand for lightweight client state
- Tailwind CSS for rapid, consistent styling
- Socket.IO Client for real-time updates
AI Integration Architecture:
- Vision API for document image analysis during KYC
- Structured JSON responses for risk scoring with explainable factors
- Context-aware chat system that understands loan and trade specifics
- Market-intelligence prompts for negotiation simulation
We followed a feature-based folder structure, making each domain (loans, trades, interests, notifications) self-contained with its own models, services, controllers, and routes.
Challenges we ran into
1. Real-Time State Synchronization When multiple traders view the same loan simultaneously, ensuring everyone sees consistent data required careful WebSocket room management, optimistic UI updates, and conflict resolution strategies. We implemented user-specific and trade-specific rooms to scope updates appropriately.
2. AI Document Verification Limitations We discovered that OpenAI's Vision API only accepts image formats—not PDFs. This required us to redesign our upload flow, guide users to submit photos/scans of documents, and build graceful error handling when analysis fails. We also added a "Demo Mode" that generates realistic mock documents for judges who don't want to upload personal information.
3. Complex Trade State Modeling A loan trade has dozens of possible state combinations: 4 phases × multiple tasks each × various blocker states × document statuses. Modeling this complexity while keeping the UI intuitive required multiple design iterations and careful state machine thinking.
4. Making AI Decisions Explainable Financial professionals need to understand why an AI recommends something. We invested significant effort in making every AI output transparent—risk scores show contributing factors, negotiation strategies explain their reasoning, and verification decisions highlight what was found (or not found) in documents.
5. Balancing Demo-ability with Real Functionality Building something that works end-to-end while also being impressive in a 3-minute demo required tough prioritization. We focused on making the "happy path" polished while ensuring edge cases fail gracefully.
Accomplishments that we're proud of
1. The Settlement Tracker Actually Works It's not just a mockup—the tracker reflects real trade state, updates in real-time, and the blocker system actually surfaces actionable issues. This is the feature we believe can genuinely transform how banks manage loan settlements.
2. AI That Adds Real Value Our AI features aren't gimmicks. The Deal Negotiator provides genuinely useful market analysis and strategy recommendations. The risk scores surface insights that would take analysts hours to compile manually. The KYC verification actually reads and validates documents.
3. Production-Quality Architecture Despite hackathon time constraints, we built a properly structured application: TypeScript throughout, proper error handling, authentication/authorization, real-time updates, and clean separation between frontend and backend.
4. Demo Mode for KYC The "Demo Mode" button that generates realistic mock documents was a late addition that we're proud of—it shows we thought about the judge experience, not just the end-user experience.
5. End-to-End Flow Completion You can actually: browse loans → analyze with AI → negotiate prices → express interest → track settlement → complete trades. The entire flow works, not just isolated features.
What we learned
Domain Complexity is Real The loan market has nuances we didn't initially appreciate: chain of title verification, assignment execution status, borrower consent requirements, agent bank roles. Understanding these concepts well enough to model them correctly required research and iteration.
AI Amplifies, It Doesn't Replace The best AI features augment human decision-making rather than hiding it. Our negotiation simulator lets traders explore scenarios and understand trade-offs—it doesn't just say "offer this price." This approach builds trust and adoption.
Transparency Builds Trust in Financial Services Every AI score includes explanations. Every trade action is logged in the activity feed. Every document is tracked with status. In finance, showing your work isn't optional—it's essential for adoption.
Real-Time Changes Everything Once you have WebSocket updates, users expect everything to be live. The investment in Socket.IO infrastructure paid off in user experience, but required rethinking how we manage state throughout the application.
TypeScript is Worth the Investment End-to-end type safety caught countless bugs during development. Shared types between frontend and backend eliminated an entire category of integration errors.
What's next for LoanChain
1. Advanced Document Management Integration with cloud storage (S3), in-browser document preview, version comparison, and eventually e-signature integration for fully digital loan assignments.
2. Mobile Application A React Native app for traders who need to monitor settlements and respond to blockers on the go. Push notifications for critical trade events.
3. Expanded AI Capabilities
- Predictive analytics for settlement timeline forecasting
- Automated blocker detection from document analysis
- Market trend analysis and pricing recommendations
- Natural language search across loan portfolios
4. Integration APIs Webhook support for external systems, bulk import/export capabilities, and OAuth2 for third-party integrations with existing bank infrastructure.
5. Regulatory Reporting Automated compliance reports, audit trail exports, and templates for regulatory submissions—making LoanChain not just a trading platform but a compliance tool.
6. Multi-Currency and Global Expansion Support for loans denominated in different currencies, region-specific compliance requirements, and localization for European and Asian markets.
Log in or sign up for Devpost to join the conversation.