Reimagining Trust. Unlocking Opportunities. A decentralized, AI-powered lending protocol bridging the gap between underserved borrowers and global liquidity.
TrustBridge is a P2P micro-lending platform that eliminates the need for traditional credit scores. By leveraging Generative AI (Gemini) for alternative data analysis and Web3 for settlement, we create verifiable on-chain reputations (TrustScores) from off-chain real-world assets (utility bills, tax returns, government IDs).
We empower individuals to own their financial identity and provide lenders with transparent, high-yield opportunities in a permissionless environment.
Traditional banking excludes millions due to lack of formal credit history. TrustBridge solves the trilemma of Identity, Trust, and Access:
- Document Vision: Uses
Gemini 1.5 Flashto extract financial health indicators from non-standard documents (ITR, Gas/Electricity Bills, Rent Receipts). - Biometric Liveness: Compares live camera selfies with government ID (PAN/Aadhaar) to prevent fraud using advanced computer vision.
- Smart Contract Escrow: Loans are requested, funded, and repaid directly on the Sepolia Testnet, ensuring immutability.
- Web3 Integration: Seamless wallet connection via Wagmi + RainbowKit creates a frictionless "Login with Ethereum" experience.
- Dynamic Reputation: A 0-100 score calculated in real-time based on verified identity (+15 pts), financial doc validity (+60 pts), and on-chain repayment history (+25 pts).
- Portable Identity: Your score lives on-chain, allowing you to carry your reputation across the DeFi ecosystem.
- Hybrid RBAC: Strict separation between Borrower (Request/Repay) and Lender (Invest/Track) dashboards using Firebase Auth + Custom Claims.
- Secure Storage: Sensitive PII is encrypted and stored off-chain (Cloudinary/Firestore), while only transaction hashes and scores are committed to the blockchain.
- React (Vite)
- Tailwind CSS
- Wagmi + Viem (Ethereum wallet integration)
- Flask (Python REST API)
- Firebase (Authentication + Firestore)
- Gemini Vision โ document parsing
- Gemini 2.5 Flash โ TrustScore computation
- Ethereum Sepolia Testnet
- Wagmi library (wallet connection)
โ ๏ธ No smart contracts in MVP โ payments are simulated
- Upload income or bill documents (PDF/images)
- AI extracts data and computes a score (0โ100)
- Score improves with on-time repayments
- Sign up and upload KYC
- Get TrustScore
- Apply for loan
- Receive ETH via Sepolia wallet
- Repay within 30 days
- Register and post loan offers
- Review borrower requests and TrustScore
- Approve or reject requests
- Access documents if borrower defaults (after 2+ months)
| Home Page | Dashboard | Trust Score Calculation | Profile |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
- ๐ KYC and loan data stored in Firestore (not on-chain)
- ๐ AI scoring processed server-side
- ๐ Borrower docs shared only after default
Register โ Upload Docs โ Get TrustScore โ Apply for Loan โ Connect Wallet โ Receive ETH โ Repay
Register โ Post Offer โ View Requests โ Review TrustScore โ Approve/Reject โ Track Loan
POST /vision/first-trustscoreโ Upload docs and generate TrustScore
POST /trustscore/update/<uid>โ Update score post-repayment
POST /loan/requestโ Request a loanGET /loan/user/<uid>โ Fetch all user loansGET /loan/status/<uid>/<loan_id>โ Get loan statusPOST /loan/decision/<uid>/<loan_id>โ Lender approves/rejects
POST /lender/registerโ Register lenderPOST /lender/offerโ Post a loan offerGET /lender/offers/<uid>โ View own offersGET /lender/borrowersโ View pending borrowers
users/
โโโ {uid}/
โโโ loans/ # Subcollection: stores all loans requested by this borrower
โ โโโ {loan_id} # Individual loan documents with amount, purpose, status, etc.
โโโ trust_score/ # Subcollection: stores TrustScore records
โ โโโ {score_id} # Contains score value, explanation, and timestamp
โโโ profile/ # Subcollection (or a document if simpler)
โโโ metadata # Contains user info like name, email, KYC flags, wallet
lenders/
โโโ {lender_id}/
โโโ info/ # Subcollection: stores registration info of the lender
โ โโโ metadata # Contains PAN, interest preference, email, phone, etc.
โโโ offers/ # Subcollection: list of loan offers posted
โโโ {offer_id} # Offer details like max amount, interest rate, wallet, etc.
- Frontend: Vercel
- Backend: Render
- Testing: Firebase Emulator + SepoliaETH
- NFT-based identity badges
- Full loan escrow via smart contracts
- Android-first mobile app
- Real-world pilot (e.g., rural areas)
- ๐ง Email: Arnab Ghosh
- ๐ค LinkdIn: Arnab Ghosh
- ๐ GitHub: Trust-Bridge
- ๐ฌ Discord: Coming Soon



