Lantern Finance
A crypto-backed lending platform where users borrow against their holdings - lending regulated state by state, with compliance and authorization wired into the core loan flow.
- Built a state-by-state lending compliance system: an admin-managed rules engine that enforces per-jurisdiction lending parameters across the whole loan lifecycle, with notices for restricted regions and jurisdiction capture wired into identity verification.
- Ran a security-hardening pass on the protected API surface, closing a class of broken object-level authorization (IDOR) issues by enforcing per-resource ownership checks and scoping privileged endpoints behind admin access.
- Shipped an admin rates dashboard for per-asset interest and loan-to-value, moving loan interest math onto database-backed, admin-editable rates.
- Reworked onboarding into a post-signup KYC/KYB gate, added a stablecoin disbursement option end to end, and built a full referral program with affiliate tracking and admin payouts.
Show long description Hide long description
Overview
Lantern Finance is a crypto-backed lending platform where users borrow against their crypto collateral - a Next.js 14 App Router app, TypeScript end to end, on Prisma + Postgres with Trigger.dev for scheduled jobs.
The headline work was a state-by-state lending compliance system: an admin-managed rules engine that holds each US jurisdiction's lending parameters and enforces them across origination, upsizing, and fees from a single source of truth. Restricted regions surface the right compliance notices, and a borrower's jurisdiction is captured at identity verification so the correct rules apply automatically. Parameters are admin-editable, so a compliance change doesn't need a deploy.
A security-hardening pass over the protected API closed a class of broken object-level authorization (IDOR) issues - enforcing per-resource ownership checks, scoping reads and mutations to the caller's own records, and moving privileged operations behind admin access.
On the product side: an admin rates dashboard for per-asset interest and loan-to-value, moving interest math off hardcoded constants onto database-backed, admin-editable rates; a refactor consolidating crypto-asset config - metadata, decimals, address validation, LTV tables - into one asset service shared across wallet creation, custody webhooks, and the rate engine; a stablecoin disbursement option end to end; and a referral program with server-tracked codes, affiliate integration, and an admin payout view. Plus the standing backlog: loan-event Slack notifications, scheduled jobs, loan-flow UI fixes, and a performance audit flagging bundle, indexing, and API-parallelization wins.