About the Project
What Inspired Us
We came to the Paris Fintech Hackathon 2026 asking a fundamental question: why is capital formation for European SMBs so broken?
Founders face Kafka-esque 50-field forms. Investors spend weeks on due diligence. Capital moves through intermediaries, friction, and delays. Yet the AI tools that could unlock this — conversational interfaces, semantic understanding, autonomous agents — had barely touched fintech distribution.
We saw a 24-hour window to prove that AI-native capital markets weren't just possible, but better — faster, fairer, and frictionless. The goal was simple: let founders describe themselves in plain language, give investors a thesis-matching feed with instant due diligence, and actually move real capital on-chain, all within a single afternoon.
What We Built
Loanly is a two-sided marketplace that collapses the entire capital-raise funnel into conversation:
- Founder side: A 5-turn conversational onboarding (no forms), spin up multiple companies and campaigns, deploy a real Solidity escrow contract, and raise capital in real-time.
- Investor side: Describe your thesis in plain language. Get a ranked feed of European SMBs, run AI due diligence on any deal in seconds (web search + SIRENE registry lookups + PDF analysis), and commit capital directly into an escrow.
- Settlement: Each campaign deploys to a local Hardhat EVM with a factory contract that auto-disburses when funding target is hit, and handles pro-rata repayment with integer-division precision.
The tech stack is full-stack modern:
| Layer | Tools |
|---|---|
| Frontend | Next.js 15, TypeScript, Tailwind v4, shadcn/ui, Recharts |
| Backend | Node.js API routes, SQLite (better-sqlite3) |
| Auth | Clerk (role-based access) |
| AI | Mistral Large 2 (primary) + Cerebras Llama 3.3 70B (automatic fallback) via Vercel AI SDK |
| Search | Tavily, SIRENE V3.11 (French SMB registry), pdf-parse |
| On-chain | Solidity 0.8.24, Hardhat, viem, custodial wallets (AES-256-GCM) |
The codebase breaks down to:
$$ \begin{align} \text{TypeScript} &: 687{,}965 \text{ bytes (%) } \ \text{Solidity} &: 12{,}904 \text{ bytes (%) } \ \text{CSS} &: 8{,}528 \text{ bytes (%) } \ \text{JavaScript} &: 70 \text{ bytes (%) } \end{align} $$
How We Built It
Hour 0–2: Architecture & Foundation
We designed a monolithic backend — SQLite for fast iteration, Next.js API routes for streaming (perfect for AI agent traces), and Clerk for frictionless auth. On-chain, we burned through Solidity patterns and settled on a single factory contract with a state machine per campaign: Open → Funded → Repaying → Repaid.
Hour 2–8: AI Agent Pipeline
We wired Mistral Large 2 with tool-calling to power three critical agents:
- Conversational onboarding: Extracts company, traction, and campaign metadata in 5 turns; materialises the structured profile live in the right pane.
- Due diligence agent: Calls Tavily for web search, SIRENE for registry data, pdf-parse for collateral extraction. Produces analyst-style briefs with risk flags and real cited URLs.
- Portfolio constructor: Takes investor capital, risk tolerance, and sector preferences. SQL hard-filters, then Mistral re-ranks and allocates across campaigns with sector donut and per-pick rationale.
All outputs were Zod-validated (one retry on schema failure) and cached in SQLite.
Hour 8–16: On-Chain + UI Binding
Compiled the Solidity contracts and spun up a local Hardhat node. Built custodial wallet infrastructure — every Clerk user gets a server-managed EVM account, private key encrypted with AES-256-GCM. Investors receive €1M mock EURC; SMBs get funded when commitments hit target, all in the same transaction. The backend reconciles on-chain state into SQLite on every API write and read, so the UI always shows live numbers.
Built the founder and investor dashboards with Next.js Server Components streaming AI results in real-time.
Hour 16–24: Polish, Edge Cases, Demo Prep
Wired Cerebras as an automatic fallback (critical for a 24-hour demo). Added collateral upload + AI verification (PDF → text → plausibility scoring). Built end-to-end test suites (pnpm chain:e2e, pnpm chain:scenarios) for cancellations, partial repays, and repeat commits. Pre-cached hero due-diligence briefs and seeded 20 realistic companies, campaigns, and investors with real deal flow data.
The Challenges We Faced
1. Structured Output Under Time Pressure
Streaming JSON from Mistral is fragile — incomplete tokens, schema mismatches, hallucinated fields. We solved it with temperature 0 + Zod validation + one automatic retry. Still, we added a Cerebras fallback on every critical path because at a 24-hour hackathon, two APIs are better than one.
2. On-Chain State Coherence
The hardest problem: keeping SQLite and Hardhat in sync. Investors see their balance in the UI — but if a commit tx confirms off-chain and the DB hasn't reconciled yet, you have a race condition. We fixed it by:
- Reading state from the Hardhat node on every API write and read (viem calls).
- Storing an append-only
chain_eventstable as the source of truth. - Using tx hashes as idempotency keys so double-clicks don't double-commit.
3. AI Agent Reliability
Tool-calling agents hallucinate, timeout, and fail silently. Our due-diligence agent calls Tavily + SIRENE + pdf-parse in sequence — any one can fail. We wrapped every tool call in a try-catch, logged the failure, and surfaced it to the investor (e.g., "SIRENE lookup timed out, but here's what we found from web search"). Users appreciate transparency over silence.
4. PDF Collateral Verification
Founders upload PDFs (bank statements, contracts). We extract text with pdf-parse and ask an LLM: "Does this bank statement really show €500k AUM?" The risk: founders upload blurry screenshots or irrelevant docs. Our scoring (0–100 plausibility) flags red flags in concrete terms (e.g., "Date range is 2 years old") so investors can decide whether to trust it.
5. Mock EURC Realism
A mock ERC-20 on a local Hardhat node is ephemeral — it dies when you restart the node. We needed a frictionless reset story: pnpm chain:reset wipes stale wallet/contract/event rows and redeploys. But it also means the demo is non-persistent. We mitigated by pre-seeding a rich fixture (20 companies, real SIRENE data, campaigns with various stages).
6. Time-Zone Agnostic Seed Data
We seeded campaigns with real interest rates (8%), durations (90 days), and commit deadlines (30 days). But calculating created_at + 30 days in code is brittle — timezones, DST, daylight savings. We stored absolute Unix timestamps and let the frontend format them in the user's local time.
What We Learned
- AI agents are powerful but fragile: Temperature 0, structured output, and fallback APIs are non-negotiable.
- Crypto is a UI problem as much as a technology one: Most users don't care about gas fees or tx hashes. They care that their capital is safe and their returns are clear. We optimized for clarity, not technical depth.
- SQLite + Node.js + AI is a complete full-stack: No need for Redis, Postgres, or microservices at hackathon pace. Simplicity wins.
- Conversational interfaces reduce friction exponentially: A 5-turn chat beats a 50-field form, even if the form is faster to code.
- Real on-chain settlement changes the mental model: Mockups feel hollow. Watching capital actually move across a contract, with events and timelines, makes the whole system feel real.
This was a 24-hour sprint where we proved that AI-native capital markets are not a vaporware dream — they're achievable, and they're better.
Built With
- ai
Log in or sign up for Devpost to join the conversation.