DeFi social app: pay and connect using PYUSD—your crypto, your community.
This project is a comprehensive DeFi Social Hub dedicated to secure KYC verification and compliant payments using cutting-edge blockchain primitives, built for the ETHGlobal hackathon. It features an advanced 8-step KYC architecture, leverages Soul Bound Tokens (SBTs) for identity verification, and integrates a PYUSD payment gateway for on-chain, compliant financial transactions.
Expanded System Description:
KYC Verification Flow (8 Steps):
Login: Users onboard using Privy wallets/identity (supporting embedded wallets for ease of access).
PII Submission: Users provide personal information including name, date of birth, address, and government IDs, with support for image uploads via Privy UI.
KYC API Submit: Sensitive data is securely relayed to the Bridge sandbox API for verification.
AML Screening: Automated off-chain Anti-Money Laundering compliance checks run in parallel to ensure eligibility.
Review: KYC service provider returns the verification status, flagging issues or confirming success.
SBT Issuance: Upon passing verification, a Soul Bound Token is minted for the user via the JSC Mizuhiki Protocol – this SBT is non-transferable and proves KYC completion.
Access Control: Smart contracts use the SBT to gate access, ensuring only verified users can interact with sensitive dApps or DeFi services.
Monitor/Renewal: The system continually performs compliance checks, alerting users when re-verification is required, enabling ongoing regulatory adherence.
Soul Bound Tokens (SBTs):
SBTs are implemented using EIP-5192 as non-transferable NFTs, solidifying identity without risking unauthorized transfer.
They form the backbone for gating access and streamlining compliance across platform features.
PYUSD Payment Gateway:
Enables verified users to process payments in PayPal USD on-chain, with hard compliance checks using the KYC status.
Transaction limits and fee structures are implemented transparently, with real-time monitoring and status updates.
Monitoring & Compliance Features:
Every action—from KYC step progression to AML results and payments—is tracked and logged.
Supports real-time risk assessment, compliance history logging, renewal management, and robust event monitoring for both users and admins.
Smart Contracts (Solidity):
Core contracts include the SBT (EIP-5192 compliant), PYUSD Payment Gateway contract (with compliance gating), and a dedicated KYCVerification contract.
Extensive use of access control modifiers and admin methods for contract-based permissions, minting, and revocation.
Event logging for monitoring compliance actions.
Contracts deployed and tested on the Ethereum Sepolia testnet.
Frontend (Next.js + React):
Uses the latest Next.js App Router, React with custom hooks and reusable components.
A multi-page KYC flow guides users through each verification step with modern UI/UX, powered by Tailwind CSS and Framer Motion for smooth animations.
Wallet integration is handled by RainbowKit, enabling wallet connection and embedded wallet creation.
All off-chain and on-chain status updates are surfaced in real-time.
Backend Services:
Bridge API Service: Orchestrates KYC process, interacting securely with the Bridge provider.
Smart Contract Service: Mediates all SBT and payment gateway interactions.
Payment Gateway Service: Manages PYUSD transactions and compliance gating.
Monitoring Service: Tracks compliance and renewal status, facilitating dynamic updates and admin oversight.
Technologies Used:
Solidity (v0.8.20) and OpenZeppelin Contracts for secure smart contract development.
Next.js (v15.5.5), React (v19.1.0), Tailwind CSS, Framer Motion, RainbowKit, Wagmi for frontend design and blockchain interfacing.
Hardhat for local Ethereum development, testing, deployment automation, and Sepolia configuration.
Node.js, npm/yarn, and Git for project management and infrastructure.
Project Structure:
/contracts: Smart contracts (SBT, Payment gateway, KYC verification)
/src/app: Next.js application routes, mapping to each KYC flow step and dApp feature
/src/components: Modular React components for all UI flows
/src/hooks: Custom React hooks
/src/services: API and smart contract integration logic
/scripts: Hardhat deployment scripts
/test: Smart contract and integration tests
Security and Compliance:
Adheres to smart contract best practices, with heavy use of EIP standards, role-based access control, and secure Bridge API integration.
Implements both real-time and periodic compliance monitoring, with robust off-chain and on-chain event tracking.
Ensures privacy, security, and non-transferability via Soul Bound Tokens and integrated AML checks.

