Lantern Finance
A crypto-backed lending platform - users pledge crypto as collateral and borrow cash against it, with lending regulated state by state.
- Built the state-by-state compliance engine: one admin-editable source of truth for each state's lending rules, enforced across the loan lifecycle, so compliance changes ship without a deploy.
- Automated crypto withdrawal payouts from BitGo custody: eligible withdrawals submit idempotently and reconcile to on-chain confirmation; anything ambiguous falls back to manual review with funds untouched.
- Hardened authorization across the protected API with per-resource ownership checks and admin-scoped privileged endpoints.
- Made ops self-serve: an admin rates dashboard for per-asset interest and LTV, a post-signup KYC/KYB gate, stablecoin payouts, and a referral program with affiliate tracking.
Show long descriptionHide long description
Overview
Lantern Finance is a US crypto-backed lending platform: users pledge crypto collateral and borrow cash against it. My work sat on the two hardest problems in that business - fifty different sets of lending law, and moving customer crypto safely - plus security and admin tooling. It's a Next.js 14 App Router app, TypeScript end to end, on Prisma + Postgres, with Auth0, OneFootprint for identity verification, and Trigger.dev for scheduled jobs.
Lending is regulated differently in every US state, so the same loan can be fine in one state and off-limits next door. I built the state-by-state compliance system: an admin-managed rules engine holding each jurisdiction's lending parameters, read from one source of truth by every flow that touches them, with a borrower's jurisdiction captured at identity verification so the right rules attach before any loan exists. Parameters are admin-editable, so a regulatory change is a config edit rather than a deploy.
Customer crypto payouts used to be a manual admin task. I automated them from BitGo custody: eligible requests pass a set of inline safety gates, then submit idempotently so a payout can never happen twice, and are tracked to on-chain confirmation through a single finalizer that releases funds exactly once. The design fails toward humans - anything ambiguous drops back into the ordinary manual review queue with funds untouched, and the whole pipeline sits behind admin controls.
I also hardened authorization across the protected API, enforcing per-resource ownership checks and scoping privileged operations behind admin access. The rest was making the business self-serve: per-asset interest and LTV moved from hardcoded constants to an admin rates dashboard, onboarding reworked into a post-signup KYC/KYB gate, a stablecoin disbursement option end to end, and a referral program with affiliate tracking and admin payouts.