feature: Privy MPC Social Vault #185
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MPC Social Vault π‘οΈ (BNB Chain Hackathon)
A Next-Generation Family Treasury secured by Smart Contracts.
Features β’ Architecture β’ Getting Started β’ Deployment
π The Feature
MPC Social Vault solves the "Key Anxiety" problem in crypto. It allows families, DAOs, or small teams to manage shared funds with Social Logic instead of just private keys.
π Architecture
The system consists of three layers:
1. The Vault Contract (
contracts/src/SocialVault.sol)The "brain" of the system. It holds the funds and enforces rules:
withdraw(amount): Checks if the caller is the Owner or a Member within theirdailyLimit.initiateRecovery(newOwner): Allows guardians to vote.addMember/removeMember: Management functions.2. The Auth Layer (Privy)
We use Privy to create a non-custodial wallet for the user using their Web2 credentials (Email, Google, Twitter). This wallet is recognized as the
Ownerof the Vault.3. The Dashboard (
app/)A sleek, BNB-Themed Next.js application that:
π Project Structure
π Getting Started
Prerequisites
1. Smart Contract Setup
2. Frontend Setup
3. Configuration
Open
app/.env.localand configure your keys:NEXT_PUBLIC_PRIVY_APP_ID: Get this from Privy Dashboard.NEXT_PUBLIC_VAULT_ADDRESS: This will be your contract address after deployment (see below).4. Run Locally
npm run dev # Visit http://localhost:3000π° Deployment & Production
Step 1: Deploy Contracts to BSC Testnet
.envincontracts/and add your deployment key:Step 2: Configure Frontend
app/.env.local:npm run dev) or build for production.Step 3: Build for Production
cd app npm run build npm startπ¨ Theme & UX
The frontend is designed with a "Premium BNB" aesthetic:
#F0B90B).π Innovation
This isn't just a wallet; it's a Programmable Bank Account. By combining MPC (for UX) with Smart Contracts (for Logic), we get the best of both Web2 and Web3.