← Back to home

DeFI_Smallcase

Create and invest in curated DeFi strategy baskets with focus on privacy and risk free investment

Problem Statement

Smallcase DeFi is a full-stack monorepo that lets investors discover and subscribe to curated on-chain strategies while maintaining compliant access through zero-knowledge identity checks. The web app (Next.js) renders a catalog of strategies and can overlay live on-chain metrics (NAV, PPS, PnL) sourced from a Uniswap v4 vault contract. Identity verification is handled by the Safe Passport package, which integrates Self Protocol V2 to prove attributes like age and OFAC status for investors and jurisdiction/RIA for portfolio managers (PMs).

Solution

We used the following technologies to build this project:Web App: Next.js 14 App Router, Tailwind CSS, Radix UI components, and Clerk middleware for route protection (apps/web/).Identity:packages/safe-passport/provides a Solidity contract (SafePassport.sol) and a TypeScript SDK to generate Self Protocol QR flows. Investor (age + OFAC) verification. Seeapps/web/components/self/SafePassportWidget.tsxandapps/web/app/investor/kyc/self-verify/page.tsx.On-chain Strategies:packages/uniswap_integration/contains a Uniswap v4 hook (MultiPolicyHook.sol), a strategy vault (UniswapLPVault.sol), and a registry (UniswapStrategyRegistry.sol), plus scripts to deploy/configure and emit snapshots for charts.Database:packages/database/exposes a Postgres/Prisma package with a schema for strategies, users/subscriptions, and analytics; intended for optional persistence and ingestion.On-chain reads: server-sideviemclient in the web app to overlay live metrics onto the existing strategy list via an API route.We used the following partner technologies to benefit our project:Self Protocol V2 (via@selfxyz/*) for ZK identity verification flows and QR code builder.Neon Postgres + Prisma for managed serverless database access (optional for the demo).Clerk/Privy for auth primitives and middleware.We did the following frugal integration in our project:Bootstrapped a curated strategy list from static data (apps/web/data/strategies.ts) and overlaid live Uniswap metrics via an API, so the UI stays fast even when metrics are unavailable.Emitted demo snapshots from scripts to drive charts quickly during testing.Graceful fallbacks: UI renders fine without on-chain metrics or DB connection.

Hackathon

ETHGlobal New Delhi

2025

Contributors