Giggle

Instant crypto payments through WhatsApp chat. Crypto payments as easy as sending a message.

Giggle

Created At

ETHOnline 2025

Project Description

Giggle: WhatsApp Crypto Payments Powered by PayPal USD (PYUSD)

Giggle revolutionizes cryptocurrency payments by bringing PayPal USD (PYUSD) directly to WhatsApp, the world's most popular messaging platform with 2 billion users. Instead of complex wallet interfaces and technical jargon, users send PYUSD through natural conversations - making crypto payments as simple as texting.

The Challenge We're Addressing

The cryptocurrency industry faces a massive adoption barrier: complexity. Traditional crypto wallets require users to understand gas fees, hexadecimal addresses, seed phrases, and blockchain mechanics. Meanwhile, 1.7 billion adults globally remain unbanked, and cross-border remittances cost 6-7% with multi-day settlement times.

The opportunity: 2 billion people already use WhatsApp daily, but only a fraction can access digital payments. PayPal's PYUSD offers the perfect bridge - a regulated, dollar-backed stablecoin that combines crypto's efficiency with traditional finance's familiarity.

Our Innovation: Making PYUSD Accessible to Everyone

Phone Number as Universal Crypto Wallet Account: Every phone number automatically generates a unique Ethereum wallet through deterministic key derivation. Users never see private keys, seed phrases, or wallet addresses - their phone number becomes their PYUSD financial identity.

Conversational PYUSD Payment Interface: Natural language processing transforms everyday speech into PYUSD blockchain transactions:

  1. "Send $50 to +91123456789" → Instant PYUSD transfer to this wallet
  2. "What's my balance?" → Real-time PYUSD account overview
  3. "Create a $25 gift coupon for my friend's birthday with message 'Happy Birthday!'" → PYUSD locked in smart contract, unique code generated
  4. "Redeem coupon GIFT1A2B3C4D" → PYUSD instantly released from smart contract to recipient's wallet

Core Capabilities

Instant Global PYUSD Payments

  • Send PYUSD to any phone number worldwide
  • Real-time PYUSD balance checking and transaction history
  • Request PYUSD payments from contacts
  • Complete audit trail for compliance

PYUSD-Backed Digital Gift Economy

  • Create Gift Coupons: "Create a $25 gift coupon for my friend's birthday" → Smart contract locks PYUSD, generates unique code
  • Redeem Gift Coupons: "Redeem coupon GIFT1A2B3C4D" → Instant PYUSD transfer to recipient's wallet
  • Personalized Gifts: Add custom messages and images stored on IPFS
  • Security: One-time redemption, expiration dates, creator refund for unredeemed gifts
  • Smart Contract Integration: Hardhat-deployed contracts ensure secure PYUSD redemption

Enterprise-Grade Security

  • 4-6 digit PIN system with PBKDF2 encryption (100,000 iterations)
  • Configurable daily PYUSD spending limits ($100-$1000)
  • Transaction confirmation workflow
  • Complete audit logging for regulatory compliance

AI-Powered User Experience

  • OpenAI GPT-4o-mini for natural language understanding
  • Intent detection for PYUSD payment commands: send, request, balance, gift creation, gift redemption
  • Extracts gift parameters from natural language (amount, message, expiration)
  • Detects redemption codes in various formats
  • Fallback parser ensuring reliability for core gift features
  • Conversational interface requiring no command memorization

Technical Architecture

  • Backend: Express.js with TypeScript for type safety
  • Blockchain: Ethereum Sepolia testnet with Ethers.js v6
  • Stablecoin: PayPal USD (PYUSD) for real-world payment utility
  • Smart Contract Development: Hardhat V3
  • Database: SQLite with Drizzle ORM for relational data
  • Messaging: Twilio WhatsApp Business API
  • AI: OpenAI GPT-4o-mini for natural language processing
  • Storage: IPFS via Pinata for decentralized metadata

Market Impact & Use Cases

Cross-Border PYUSD Remittances

  • Target: $800+ billion annual remittance market
  • Benefit: Eliminate 6-7% traditional fees with PYUSD
  • Advantage: Instant PYUSD settlement vs. multi-day processing
  • PayPal Integration: Leverage PYUSD's regulatory compliance and dollar stability

Financial Inclusion with PYUSD

  • Reach: 1.7 billion unbanked adults globally
  • Method: PYUSD banking services through familiar WhatsApp interface
  • Impact: Democratize access to dollar-backed digital payments
  • Trust: PayPal's brand recognition reduces crypto adoption friction

Peer-to-Peer PYUSD Commerce

  • Personal: Family PYUSD transfers, bill splitting, allowance management, birthday/holiday gift coupons
  • Business: Customer PYUSD payments, vendor settlements, employee gift card distribution
  • Social: PYUSD-backed digital gift cards for any occasion, event payments, group transactions
  • Gift Use Cases: Wedding gifts, birthday presents, thank-you gifts, holiday bonuses - all via WhatsApp

Why PYUSD is the Perfect Fit

  1. Dollar Stability: PYUSD's 1:1 USD backing eliminates volatility concerns
  2. Regulatory Compliance: PayPal's oversight provides user confidence
  3. Real-World Utility: PYUSD is designed for payments, not speculation
  4. Brand Trust: PayPal's reputation accelerates mainstream adoption
  5. Interoperability: PYUSD works seamlessly across Ethereum ecosystem

Competitive Advantages

  1. Zero Learning Curve: Familiar WhatsApp interface eliminates adoption friction
  2. No App Downloads: Works within existing user workflow
  3. Phone Number Banking: Simpler than traditional crypto or banking
  4. PYUSD Integration: Dollar-backed stability with blockchain efficiency
  5. Global Scale: Leverages WhatsApp's 2 billion user base

Innovation Highlights

  • Deterministic Wallet Generation: Phone numbers create consistent, recoverable PYUSD wallets
  • Conversational Payments: Natural language eliminates command memorization
  • WhatsApp Integration: First-of-its-kind PYUSD payment system in messaging
  • Gift Coupon Innovation: Complete gift economy with conversational creation ("create a $50 gift") and redemption ("redeem GIFT1A2B3C4D")
  • Smart Contract Gift Cards: On-chain PYUSD escrow with privacy-protected codes, expiration dates, and IPFS metadata for personal messages
  • Hardhat-Powered Smart Contracts: Professional development environment ensuring secure PYUSD gift operations

Current Implementation Status

Production-Ready Features:

  • Complete WhatsApp messaging integration
  • Automated PYUSD wallet creation and management
  • PYUSD transaction processing on Ethereum
  • PIN-based security system
  • Complete Gift Coupon System:
    • Conversational gift creation via WhatsApp
    • Smart contract PYUSD escrow with Hardhat-deployed contracts
    • Unique code generation and redemption
    • IPFS metadata for personalized messages/images
    • Expiration dates and creator refunds
  • Transaction history and balance checking
  • OpenAI natural language processing for gift commands

Testnet Environment: Currently operates on Ethereum Sepolia with PYUSD testnet tokens for safe development and testing, with production-ready architecture for mainnet deployment.

Vision & Impact

Giggle represents a fundamental shift in cryptocurrency adoption strategy by making PayPal USD accessible to everyone. Rather than forcing users to learn blockchain technology, we meet them where they already are - in WhatsApp conversations. By making PYUSD invisible but its benefits visible, we can onboard the next billion users to digital payments.

The result: PYUSD payments that feel like texting, but work like global banking infrastructure - combining PayPal's trusted brand with WhatsApp's ubiquity.

Built with PayPal USD (PYUSD) and Hardhat Integration

How it's Made

Technical Architecture: Building WhatsApp Payments with PayPal USD (PYUSD) and Hardhat

Giggle employs a microservices architecture built on TypeScript Express.js, handling WhatsApp webhooks through Twilio's Business API, processing natural language via OpenAI GPT-4o-mini, and executing PYUSD transactions on Ethereum Sepolia through Ethers.js v6. Smart contracts are developed and deployed using Hardhat, ensuring professional-grade security and reliability.

Core Technology Integration

WhatsApp Business API (Twilio)

  • Enterprise-grade messaging infrastructure with 99.9% uptime
  • Built-in WhatsApp Business Policy compliance
  • Webhook signature verification for message authenticity
  • 24-hour customer service window management

Natural Language Processing (OpenAI)

  • GPT-4o-mini for intent detection and PYUSD payment command parsing
  • Recognizes multiple command types: send, request, balance, gift coupon creation, gift coupon redemption
  • Zod-validated schemas for structured command parsing
  • Fallback regex parser ensuring reliability during API outages
  • Conversational response generation with WhatsApp formatting

Blockchain Infrastructure with PYUSD

  • Ethereum Sepolia testnet for safe development
  • Ethers.js v6 for wallet management and PYUSD transaction broadcasting
  • PayPal USD (PYUSD) token integration for real-world payment utility
  • Hardhat development environment for smart contract deployment and testing
  • PYUSD ERC-20 contract interaction for balance checks and transfers

Smart Contract Development with Hardhat

  • Hardhat Framework: Professional-grade Ethereum development environment
  • TypeScript integration for type-safe contract development
  • Automated testing suite for contract validation
  • Deployment scripts for multiple networks (testnet/mainnet)
  • Ethers.js v6 plugin for seamless blockchain interaction
  • Gas optimization and contract verification

Data Persistence

  • SQLite with Drizzle ORM for type-safe database operations
  • Relational schema tracking PYUSD transactions and balances
  • Automated migration system for schema updates
  • Comprehensive PYUSD transaction audit logging for compliance

Smart Contract Implementation

GiggleGiftCoupon.sol - PYUSD Gift Cards (Hardhat-Deployed)

The smart contract, developed and deployed using Hardhat, enables the PYUSD gift economy with:

Gift Coupon Creation Features:

  • Users create PYUSD-backed gift coupons with custom amounts via WhatsApp
  • Privacy-protected coupon codes using keccak256 hashing (prevents front-running)
  • IPFS metadata integration for personal messages and images
  • Expiration date support with automatic cleanup
  • PYUSD funds locked in smart contract until redemption or refund
  • Unique coupon code generation (e.g., "GIFT1A2B3C4D")

Gift Coupon Redemption Features:

  • Anyone with the coupon code can redeem PYUSD (except the creator)
  • Instant PYUSD transfer to redeemer's wallet upon successful validation
  • One-time redemption per coupon (prevents double-spending)
  • Creator refund capability for unredeemed PYUSD coupons after expiration
  • Complete on-chain transaction history for transparency

Technical Security:

  • PYUSD token compatibility for stable, dollar-backed gift cards
  • Non-redeemable by creator (prevents self-redemption)
  • Reentrancy protection for secure redemptions
  • Hardhat test suite ensuring contract security and correctness

Hardhat Development Workflow

  1. Contract development in Solidity with TypeScript typing
  2. Comprehensive test coverage using Hardhat's testing framework
  3. Local blockchain simulation for rapid development
  4. Automated deployment scripts for consistent deployments
  5. Contract verification on Etherscan for transparency
  6. Gas optimization analysis using Hardhat tools

Security Implementation

PIN Authentication System

  • PBKDF2 with 100,000 iterations for security
  • Random salt generation for each PIN
  • Constant-time comparison preventing timing attacks
  • Secure storage with encrypted private keys protecting PYUSD access

Deterministic Wallet Generation

  • Phone number normalization to E.164 international format
  • Deterministic PYUSD wallet generation ensuring consistency
  • Master key encryption for security
  • Wallet recovery through phone number knowledge

Smart Contract Security (Hardhat-Enabled)

  • Automated security testing with Hardhat
  • Gas usage optimization and analysis
  • Reentrancy protection in gift coupon contracts
  • Access control validation
  • Event emission for transaction transparency

Technical Innovations

Phone Number PYUSD Wallet System

Innovation: Instead of requiring users to manage seed phrases, we generate deterministic PYUSD wallets from phone numbers using cryptographic key derivation.

Benefits:

  • Eliminates the biggest barrier to PYUSD adoption
  • Users can recover PYUSD wallets by knowing their phone number
  • No private key storage required
  • Consistent PYUSD wallet generation across sessions
  • Seamless PayPal USD access without crypto complexity

In-Memory Transaction Queue

Innovation: Using JavaScript Map with setTimeout expiration instead of Redis for pending PYUSD transactions.

Benefits:

  • Simpler development setup
  • Automatic cleanup with 5-minute expiration
  • Prevents stale PYUSD transaction accumulation
  • Stateless API design enabling horizontal scaling

Mock IPFS Development Mode

Innovation: When Pinata IPFS isn't configured, return mock URIs with base64-encoded metadata.

Benefits:

  • Enables development without IPFS infrastructure
  • Maintains API compatibility for PYUSD gift metadata
  • Easy production transition
  • Preserves metadata structure

AI Fallback Parser

Innovation: Regex patterns parse common PYUSD payment commands when OpenAI API is unavailable.

Benefits:

  • Ensures PYUSD functionality during API outages
  • Handles basic commands like "send $10 PYUSD to +1234567890"
  • Recognizes gift coupon creation patterns: "create gift $25" or "make coupon $50"
  • Detects redemption codes: "redeem GIFT1A2B3C4D" or "use coupon GIFT1A2B3C4D"
  • Graceful degradation maintaining user experience
  • No single point of failure for core gift features

Hardhat-Powered Smart Contract Development

Innovation: Using Hardhat as the primary development framework for PYUSD gift coupon contracts.

Benefits:

  • Professional Development Environment: Industry-standard tooling for smart contracts
  • Automated Testing: Comprehensive test suite ensuring contract reliability
  • Network Flexibility: Easy deployment across testnet and mainnet
  • TypeScript Support: Type-safe contract interactions
  • Gas Optimization: Built-in tools for cost-effective PYUSD operations

Data Flow Architecture

PYUSD Payment Processing Pipeline

  1. WhatsApp Message → Twilio webhook → Express.js API
  2. Intent Processing → OpenAI GPT-4o-mini → Structured PYUSD command
  3. Wallet Management → Deterministic generation → Ethereum wallet with PYUSD
  4. Balance Verification → Ethers.js contract call → PYUSD ERC-20 balance check
  5. Transaction Creation → Pending PYUSD transaction → PIN confirmation
  6. Blockchain Execution → Ethers.js transaction → PYUSD transfer on Ethereum Sepolia
  7. Confirmation Delivery → WhatsApp notification → Both parties notified of PYUSD transfer

PYUSD Gift Coupon Creation & Redemption Workflow (Hardhat-Deployed Contracts)

Gift Coupon Creation Process:

  1. User Command → "Create a $25 gift coupon for my friend's birthday" → WhatsApp message
  2. AI Intent Detection → OpenAI GPT-4o-mini parses amount, message, expiration → Structured coupon parameters
  3. Metadata Upload → Personal message & image → Pinata IPFS API → Decentralized storage URI
  4. PYUSD Lock → User approves PYUSD spending → Funds transferred to smart contract escrow
  5. Smart Contract Creation → GiggleGiftCoupon.sol (Hardhat-deployed) → On-chain PYUSD coupon minted
  6. Code Generation → Unique redemption code created (e.g., "GIFT1A2B3C4D") → Stored with keccak256 hash
  7. Database Persistence → SQLite → PYUSD coupon tracking with creator, amount, expiration
  8. Confirmation → WhatsApp notification → Creator receives coupon code to share with recipient

Gift Coupon Redemption Process:

  1. Redemption Command → "Redeem coupon GIFT1A2B3C4D" → WhatsApp message from recipient
  2. AI Intent Detection → OpenAI parses redemption code → Structured redemption command
  3. Code Validation → Check database → Verify coupon exists, not expired, not already redeemed
  4. Smart Contract Verification → Query GiggleGiftCoupon.sol → Validate on-chain coupon status
  5. Recipient Verification → Ensure redeemer is not the creator → Prevent self-redemption
  6. PYUSD Transfer → Smart contract executes redemption → PYUSD released from escrow to recipient wallet
  7. Status Update → Database marks coupon as redeemed → Blockchain emits redemption event
  8. Confirmations → WhatsApp notifications → Both creator and recipient notified of successful redemption
  9. IPFS Metadata → Recipient can view personal message and image from IPFS URI

Partner Technology Benefits

PayPal USD (PYUSD) - Core Payment Infrastructure

  • Dollar Stability: 1:1 USD backing eliminates cryptocurrency volatility
  • Regulatory Compliance: PayPal's oversight provides user confidence
  • Real-World Utility: Designed for payments, not speculation
  • Brand Trust: PayPal's reputation accelerates mainstream adoption
  • Ethereum Compatibility: ERC-20 standard enables seamless integration
  • Perfect for Remittances: Stable value for cross-border transfers

Hardhat - Smart Contract Development Framework

  • Professional Development: Industry-standard Ethereum development environment
  • TypeScript Integration: Type-safe smart contract development and testing
  • Automated Testing: Comprehensive test suites for contract validation
  • Network Management: Simplified deployment across multiple networks
  • Debugging Tools: Advanced debugging capabilities for contract development
  • Gas Optimization: Built-in analysis for cost-effective PYUSD operations

Twilio WhatsApp Business API

  • Reliability: Enterprise-grade messaging with 99.9% uptime
  • Compliance: Built-in WhatsApp Business Policy adherence
  • Scalability: Handles millions of concurrent PYUSD payment messages
  • Security: Webhook signature verification

OpenAI GPT-4o-mini

  • Natural Language Understanding: Converts conversational text to PYUSD commands
  • Intent Detection: Recognizes PYUSD send, request, balance, gift coupon creation, gift coupon redemption
  • Gift Command Parsing: Extracts amount, message, expiration from natural language (e.g., "create a $50 gift for my sister's wedding")
  • Redemption Code Detection: Identifies coupon codes in various formats (e.g., "redeem GIFT1A2B3C4D" or "I have a gift code GIFT1A2B3C4D")
  • Response Generation: Creates friendly, WhatsApp-formatted PYUSD responses
  • Fallback Support: Graceful degradation when API unavailable

Pinata IPFS

  • Decentralized Storage: PYUSD gift coupon metadata on IPFS
  • Reliability: Professional pinning service ensuring content availability
  • Gateway Access: HTTP access to IPFS content
  • Metadata Management: Structured JSON for rich PYUSD coupon data

PYUSD Integration Deep Dive

Why We Chose PayPal USD

  1. Stability: Dollar-backed value prevents payment amount fluctuation
  2. Trust: PayPal's brand recognition reduces crypto adoption barriers
  3. Compliance: Regulatory oversight aligns with our vision for mainstream adoption
  4. Utility: PYUSD is designed for payments, matching our use case perfectly
  5. Interoperability: ERC-20 standard works seamlessly with Ethereum ecosystem

PYUSD Technical Implementation

  • Direct integration with PYUSD ERC-20 contract on Ethereum
  • Balance queries using balanceOf() contract method
  • Transfers using transfer() method with proper gas estimation
  • Transaction history tracking via blockchain event logs
  • Support for both Sepolia testnet (development) and mainnet (production)
  • Hardhat deployment scripts for PYUSD-compatible smart contracts

Hardhat Integration Deep Dive

Why We Chose Hardhat

  1. TypeScript Support: Seamless integration with our TypeScript backend
  2. Testing Framework: Robust testing for PYUSD smart contracts
  3. Deployment Automation: Consistent contract deployments across networks
  4. Developer Experience: Best-in-class tooling for Ethereum development
  5. Community Support: Industry-standard framework with extensive documentation

Hardhat Technical Implementation

  • Smart contract development in contracts/ directory
  • Automated test suites in test/ directory
  • Deployment scripts in ignition/modules/ for repeatable deployments
  • Network configuration for Sepolia testnet and mainnet
  • Ethers.js v6 integration for contract interaction
  • PYUSD token address configuration for different networks

Performance Optimizations

Caching Strategy

  • PYUSD wallet caching to reuse existing wallets
  • PYUSD balance caching with 30-second TTL
  • Transaction history caching for recent PYUSD operations

Smart Contract Gas Optimization (Hardhat-Enabled)

  • Gas usage analysis using Hardhat tools
  • Optimized storage patterns for PYUSD gift coupons
  • Efficient event emission for transaction tracking
  • Minimal on-chain storage with IPFS offloading

Error Handling & Resilience

Multi-Layer Error Handling

  • Twilio webhook signature validation
  • OpenAI fallback parser activation
  • PYUSD blockchain error handling with retry logic
  • Database transaction rollback on failures
  • User-friendly error message generation
  • Hardhat contract testing catching edge cases

Graceful Degradation

  • No OpenAI: Fallback parser handles basic PYUSD commands
  • No IPFS: Mock metadata for development
  • No Blockchain: Mock PYUSD responses for testing
  • No Database: In-memory storage for development

ETHGlobal Hackathon Highlights

This project demonstrates the power of combining:

  • PayPal USD (PYUSD): Bringing dollar-backed stability to WhatsApp payments
  • Gift Economy Innovation: First-of-its-kind PYUSD gift coupon system with conversational creation and redemption
  • Hardhat: Professional smart contract development ensuring security and reliability for gift coupons
  • Ethereum: Leveraging blockchain for transparent, instant settlements and gift redemptions
  • WhatsApp: Meeting users where they already are (2B+ users) - send gifts as easily as sending a message
  • AI: Making complex blockchain operations conversational - "create a $50 gift" just works
  • IPFS: Decentralized storage for personalized gift messages and images

Development Workflow Excellence

  1. Gift Coupon Smart Contracts developed in Hardhat with TypeScript
  2. Comprehensive test coverage ensuring PYUSD gift creation and redemption are secure
  3. Gift Coupon Testing: Validated creation, redemption, expiration, and refund scenarios
  4. Automated deployment to Sepolia testnet for safe testing of gift features
  5. PYUSD integration validated through extensive testing including gift workflows
  6. End-to-End Gift Testing: Complete user journey from WhatsApp gift creation to redemption
  7. Production-ready architecture for mainnet deployment with full gift economy support

This architecture enables Giggle to handle Web3 complexity while presenting a simple, familiar interface through WhatsApp, making PayPal USD accessible to billions of users worldwide - perfectly aligned with PayPal's vision of democratizing financial services and Hardhat's mission of professional-grade smart contract development.

background image mobile

Join the mailing list

Get the latest news and updates