BitSpend is an innovative self-custodial payment card solution that bridges the gap between cryptocurrency and real-world payments. Built on Mezo Testnet, BitSpend enables seamless MUSD token transactions through NFC-enabled cards, combining the security of blockchain technology with the convenience of traditional payment methods. Our project consists of three main components:
- BitSpend Smart Contracts π: Secure on-chain card management and transaction processing using Shamir Secret Sharing
- BitSpend Console π₯οΈ: A user-friendly web interface for card registration, top-ups, and transaction management
- BitSpend Backend API βοΈ: Secure intermediary server handling card authentication and transaction authorization
At the core of our project is a revolutionary approach to self-custodial payments: customers maintain full control of their funds through split-key cryptography, while merchants enjoy the simplicity of tap-to-pay transactionsβno complex wallet interactions required at the point of sale.
Cryptocurrency adoption for everyday payments faces significant barriers: customers struggle with complex wallet UIs during transactions, merchants require technical expertise to accept crypto, and existing solutions compromise either security (custodial services) or usability (non-custodial wallets). While physical payment cards offer familiar UX, current crypto card solutions are custodialβusers don't truly own their funds. BitSpend solves this through Shamir Secret Sharing, enabling truly self-custodial payment cards that are as easy to use as traditional debit cards, making cryptocurrency payments accessible to everyone without sacrificing security or user control.
- Track: Financial Access & Mass Adoption - For everyday users and underbanked communities
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β Customer ββββββββββΆβ Merchant ββββββββββΆβ Blockchain β
β (NFC Card) β Tap Cardβ (Phone/POS) β Submit β (Mezo) β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β β β
β Share 2 (NFC) β Share 1 (Encrypted) β
ββββββββββββββ¬ββββββββββββ β
β β
βΌ β
ββββββββββββββββ β
β Share 3 βββββββββββββββββββββββββββββββ
β (PIN-derived)β Transaction Confirmed
ββββββββββββββββ
β
βΌ
Key Reconstructed
Transaction Signed
- Shamir Secret Sharing (SSS): Private key split into 3 shares
- Share 1: Encrypted and stored in database
- Share 2: Written to NFC card
- Share 3: Derived from user's PIN
- Self-Custodial: Users maintain complete controlβno third party can access funds
- PIN Protection: Transactions require customer's PIN for authorization
- Daily Spending Limits: Built-in protection against unauthorized use
- Tap to Pay: NFC-enabled cards for contactless payments
- Familiar Flow: Works like traditional debit cardsβtap, enter PIN, done
- No Wallet Required: Merchants don't need crypto walletsβjust a phone
- Instant Settlement: Transactions confirm in seconds on Mezo Testnet
- Manual Entry Fallback: Works on devices without NFC support
- One-Click Card Registration: Register new payment cards in under 30 seconds
- Easy Top-Ups: Add MUSD tokens to cards instantly
- Dual Payment Modes: NFC scan or manual card entry
- Transaction History: Complete analytics for both merchants and cardholders
- Real-Time Balance Tracking: Monitor card balances and spending limits
- Multi-Wallet Support: MetaMask and WalletConnect integration
- CardManager Contract: Handles card registration, balance management, and spending limits
- MUSD Token: ERC-20 stablecoin for payments
- On-Chain Verification: All transactions recorded on Mezo blockchain
- Gas Optimization: Efficient contract design for minimal transaction costs
- Daily Limit Enforcement: Automatic reset at midnight UTC
- Merchant Dashboard: Track sales, revenue, and unique customers
- Card Transaction History: View all payments and top-ups
- Spending Analytics: Monitor daily limits and spending patterns
- Export Capabilities: Download transaction history for accounting
- CardManager.sol: Core contract managing card lifecycle
- Card registration with owner verification
- Balance tracking and transfer logic
- Daily spending limit enforcement
- Card activation and deactivation
- MUSD.sol: ERC-20 stablecoin for payments
- Deployed on: Mezo Testnet (Chain ID: 31611)
- React 18 with React Router for navigation
- Ethers.js v6 for blockchain interactions
- WalletConnect v2 for mobile wallet support
- TailwindCSS for responsive design
- NFC Web API for contactless card reading
- Hosted on: Vercel
- Express.js REST API
- PostgreSQL database for card data
- Shamir Secret Sharing implementation
- PIN rate limiting and security
- Transaction processing and validation
- Hosted on: Render
- User connects wallet and registers card
- Smart contract records card address and owner
- Private key split into 3 SSS shares
- Share 2 written to NFC card
- User approves MUSD spending
- Transfers tokens to card address
- Balance updated on-chain
- Customer taps NFC card on merchant's phone
- Merchant enters payment amount
- Customer enters PIN on merchant's device
- Backend reconstructs private key from 3 shares
- Transaction signed and submitted to blockchain
- Confirmation returned to both parties
- End-to-End Encryption: Sensitive data encrypted in transit and at rest
- No Single Point of Failure: Key cannot be reconstructed without all 3 shares
- PIN Rate Limiting: Protection against brute force attacks
- Transaction Verification: All payments validated on-chain
- Audit Trail: Complete transaction history on blockchain
- True Self-Custody: First payment card solution that's genuinely non-custodial
- Zero Learning Curve: Familiar payment UXβno crypto knowledge required
- Merchant-Friendly: Accept crypto payments with just a smartphone
- Blockchain Transparency: All transactions verifiable on-chain
- Flexible Entry: Works with or without NFC support
- Retail Payments: Coffee shops, restaurants, convenience stores
- Peer-to-Peer Payments: Send money between friends
- Micro-Transactions: Small purchases under daily limits
- Remittances: Cross-border payments with instant settlement
- Event Payments: Festivals, conferences, farmers markets
- β Card registration and management
- β NFC tap-to-pay functionality
- β Manual entry fallback
- β Basic transaction history
- β MetaMask & WalletConnect integration
- Multi-currency support (ETH, USDC, DAI)
- Mobile app (iOS & Android)
- QR code payment option
- Advanced analytics dashboard
- Merchant API for POS integration
- Physical card manufacturing partnership
- Multi-chain support (Ethereum, Polygon, etc.)
- Recurring payment subscriptions
- Loyalty rewards program
- Integration with existing POS systems
- Decentralized card issuance network
- Zero-knowledge proof authentication
- Hardware wallet integration
- SDK for third-party integrations
- Governance token for ecosystem participants
Jay Shitre π¨
- Role: Full-Stack Developer
- Expertise: React, Solidity, Node.js, Blockchain Integration
- Responsibilities: Frontend development, smart contract development, backend API
Nidhi Tikone π¨
- Role: Full-Stack Developer
- Expertise: React, Node.js, UX Design, Blockchain Integration
- Responsibilities: Frontend development, backend API
- Live Demo: bitspend.app
- GitHub Repository: github.com/your-repo
- Smart Contracts: Mezo Explorer
- Documentation: GitBook/Docs
- Demo Video: YouTube
- React 18
- React Router
- TailwindCSS
- Ethers.js v6
- WalletConnect v2
- Web NFC API
- Node.js
- Express.js
- PostgreSQL
- Shamir Secret Sharing library
- Solidity 0.8.x
- Hardhat development environment
- Mezo Testnet (EVM-compatible)
- Vercel (Frontend)
- Render (Backend)
- GitHub Actions (CI/CD)
- PostgreSQL (Managed Database)
bitspend/
βββ frontend/ # React web application
βββ backend/ # Node.js API server
βββ contracts/ # Solidity smart contracts
βββ README.md # This file
- Node.js v18+
- PostgreSQL
- MetaMask wallet
- Git
# Clone the repository
git clone https://github.com/your-username/bitspend.git
cd bitspend
# Install frontend dependencies
cd frontend
npm install
# Install backend dependencies
cd ../backend
npm install
# Install contract dependencies
cd ../contracts
npm installREACT_APP_API_URL=http://localhost:5000
REACT_APP_CARD_MANAGER_ADDRESS=0x...
REACT_APP_MUSD_ADDRESS=0x...
REACT_APP_WALLETCONNECT_PROJECT_ID=your_project_idPORT=5000
DATABASE_URL=postgresql://...
JWT_SECRET=your_secret
ENCRYPTION_KEY=your_encryption_key
MEZO_RPC_URL=https://rpc.test.mezo.org
CARD_MANAGER_ADDRESS=0x...# Terminal 1 - Start backend
cd backend
npm run dev
# Terminal 2 - Start frontend
cd frontend
npm start
# Terminal 3 - Deploy contracts (if needed)
cd contracts
npx hardhat run scripts/deploy.js --network mezo-testnet# Run frontend tests
cd frontend
npm test
# Run backend tests
cd backend
npm test
# Run contract tests
cd contracts
npx hardhat testWe're excited to present BitSpend and demonstrate how it can revolutionize everyday cryptocurrency payments. Our solution combines the security of self-custodial wallets with the simplicity of traditional payment cards, making blockchain technology accessible for real-world transactions. BitSpend proves that crypto payments can be both secure and user-friendlyβno compromises necessary.
Built with β€οΈ for the future of payments
If you find BitSpend interesting, please consider giving us a star β on GitHub!