Skip to content

amand4ngol/PYUSD-Hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

130 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PYUSD Hub

( Merit Prize-Winning App for Seamless Transactions, Infinite Possibilities โ€” hosted by Google Cloud Web3 x PayPal )

PYUSD Hub Logo

Non-Custodial PYUSD & ETH Wallet with Advanced Blockchain Analytics

Flutter Ethereum GCP Gemini

๐Ÿ“ฒ Try It Now!

Download PYUSD Hub

Download APK GitHub Release

For the best experience, install the APK on your Android device and explore all features in real-time!

๐ŸŒŸ Experience real-time blockchain analytics, secure wallet, and AI-powered insights on your mobile device.

๐ŸŽฅ Demo Video

PYUSD Hub Demo

Watch our comprehensive demo video showcasing all features in action!

๐ŸŽฎ See the wallet, analytics, PYUSD City, and AI features live

๐Ÿ“‘ Table of Contents

๐ŸŽฏ Overview

PYUSD Hub revolutionizes PYUSD token management by combining enterprise-grade security with advanced blockchain analytics powered by Google Cloud Platform's RPC services. Our application stands out through:

Key Innovations

  • ๐Ÿ’ผ Secure multi-factor authenticated wallet management
  • ๐Ÿ“Š Real-time network analytics and gas optimization
  • ๐ŸŒ† Interactive 3D blockchain visualization ("PYUSD City")
  • ๐Ÿ”’ Advanced MEV protection using GCP's debug_traceTransaction
  • ๐Ÿค– AI-powered transaction analysis with Google Gemini

Quick Start

Want to try PYUSD Hub right away? Download the APK and start exploring:

  1. Download from Google Drive or GitHub Releases
  2. Install on your Android device
  3. Choose Demo Mode to explore without a wallet, or create a new wallet for the full experience
  4. Experience real-time blockchain analytics and AI-powered insights

๐Ÿ“ฑ For a quick overview of all features, check out our Demo Video

Note: For security reasons, always download from our official links above.

๐Ÿš€ Getting Started

Prerequisites

Flutter SDK โ‰ฅ3.4.0
Dart โ‰ฅ3.0.0
Android Studio / VS Code
Git

Obtaining API Keys & RPC URLs

  1. GCP Blockchain RPC Setup

  2. Gemini API Key

    • Visit Google AI Studio
    • Create a new API key
    • Copy the key for Gemini AI integration
  3. Etherscan API Key

    • Go to Etherscan
    • Create an account and generate an API key
    • Copy the key for transaction verification

Environment Configuration

  1. Get Environment Template
# Copy the example environment file
cp .env.example .env
  1. Configure Environment Variables
# GCP RPC Endpoints (from Google Cloud Console)
MAINNET_HTTP_RPC_URL=https://your-mainnet-http-endpoint
MAINNET_WSS_RPC_URL=wss://your-mainnet-websocket-endpoint
SEPOLIA_HTTP_RPC_URL=https://your-sepolia-http-endpoint
SEPOLIA_WSS_RPC_URL=wss://your-sepolia-websocket-endpoint

# Contract Configuration
PYUSD_CONTRACT_ADDRESS=0x6c3ea9036406c555b959dc03447c4f087d6d91fa

# API Keys
GEMINI_API_KEY=your_gemini_key_from_ai_studio
ETHERSCAN_API_KEY=your_etherscan_api_key

Note: Never commit your .env file to version control. The .env.example file is provided as a template.

Installation Steps

  1. Clone Repository
git clone https://github.com/amandangol/PYUSD-Hub.git
cd PYUSD-Hub
  1. Install Dependencies
flutter pub get
  1. Configure Environment Create a .env file:
# GCP RPC Endpoints
MAINNET_HTTP_RPC_URL=your_mainnet_http_rpc_url
MAINNET_WSS_RPC_URL=your_mainnet_wss_rpc_url
SEPOLIA_HTTP_RPC_URL=your_sepolia_http_rpc_url
SEPOLIA_WSS_RPC_URL=your_sepolia_wss_rpc_url

# Contract Configuration
PYUSD_CONTRACT_ADDRESS=your_pyusd_contract_address

# API Keys
GEMINI_API_KEY=your_gemini_key
ETHERSCAN_API_KEY=your_etherscan_key
  1. Run Application
flutter run

๐ŸŒŸ Core Features & GCP Integration

Complete List of GCP RPC Methods Used

  1. Account & Balance Methods

    • eth_getBalance - Get ETH balance
    • eth_getTransactionCount - Get account nonce
    • eth_call - Call smart contracts (PYUSD balance)
    • eth_estimateGas - Estimate transaction gas
    • eth_gasPrice - Get current gas price
    • eth_maxPriorityFeePerGas - Get max priority fee
    • eth_feeHistory - Get historical fee data
  2. Transaction Management

    • eth_sendRawTransaction - Send transactions
    • eth_getTransactionByHash - Get transaction details
    • eth_getTransactionReceipt - Get transaction receipts
    • eth_getBlockByHash - Get block details by hash
    • eth_getBlockByNumber - Get block details by number
  3. Network State

    • eth_blockNumber - Get latest block number
    • eth_syncing - Check sync status
    • eth_chainId - Get network chain ID
    • net_version - Get network version
    • net_peerCount - Get connected peers
  4. Tracing & Debug

    • debug_traceTransaction - Detailed transaction trace
    • debug_traceBlockByNumber - Trace entire block
    • debug_traceBlockByHash - Trace block by hash
    • debug_traceCall - Simulate transaction trace
    • trace_block - Get block traces
    • trace_transaction - Get transaction traces
    • trace_call - Trace contract calls
    • trace_rawTransaction - Trace raw transactions
  5. WebSocket Subscriptions

    • eth_subscribe - Subscribe to events
      • newHeads - New block headers
      • newPendingTransactions - Pending transactions
      • logs - Contract event logs
    • eth_unsubscribe - Unsubscribe from events
  6. State & Storage

    • eth_getCode - Get contract code
    • eth_getStorageAt - Get contract storage
    • eth_getLogs - Get contract event logs

1. ๐Ÿ’ผ Secure Wallet Management

Our non-custodial wallet leverages GCP RPC methods for secure asset management:

wallet screen wallet screen

Key Features:

  • Real-time ETH & PYUSD balance tracking
  • QR code generation for receiving funds
  • Comprehensive transaction history
  • Network switching (Mainnet/Sepolia)
  • Gas optimization using GCP data

Transaction Management:

send screen receive screen transaction details transaction_details2 transaction_details3

2. ๐Ÿ” Authentication & Security

Multi-layer security implementation with:

onboarding login mnemonic importscreen
  • Biometric authentication
  • Custom PIN encryption
  • 12-word recovery phrase
  • Secure key storage
  • Session management
  • Import/Export functionality

3. ๐Ÿ” Network Analysis & Monitoring

network congestion gas tab blocks tab transactions_tab

Real-time Monitoring:

  • Gas price tracking
  • Block production analysis
  • Network congestion metrics
  • Transaction pool insights
  • MEV activity detection

4. ๐Ÿ”ฌ Transaction Tracing & MEV Protection

trace homescreen mevanalysis homescreen transaction trace advanced_trace1

Advanced Analysis Features:

  • Detailed transaction tracing
  • Sandwich attack detection
  • Frontrunning prevention
  • Block replay analysis
  • Smart contract interaction tracking

5. ๐ŸŒ† PYUSD City Visualization

pyusd city pyusd city2 pyusd city3
  • Interactive 3D blockchain visualization
  • Real-time transaction flows
  • Network congestion weather effects
  • Block building visualization
  • Transaction vehicle animations

6. ๐Ÿค– AI-Powered Analysis

ai analysis transaction trace3
  • Transaction pattern recognition
  • Risk assessment
  • Gas optimization recommendations
  • Smart contract interaction analysis
  • Natural language explanations

๐Ÿ“ฑ Additional Features

1. ๐ŸŽฎ Demo Mode

  • Simulated wallet with test transactions
  • Pre-populated transaction history
  • Real-time network data access
  • Full MEV protection testing
  • AI analysis demonstration
  • PYUSD City exploration
  • Network switching capability
  • All features accessible without real funds

2. โš™๏ธ Advanced Settings & Management

  • Custom RPC endpoint configuration
  • Network management (Mainnet/Testnet)
  • Security settings (Biometric, PIN, Session)
  • Notification preferences
  • UI customization (Dark/Light theme)
  • Connection quality monitoring
  • Fallback providers configuration

3. ๐Ÿ“Š Analytics & Insights

insightsscreen insights screen2
  • Market trend analysis
  • Historical data visualization
  • Price impact predictions
  • Network health monitoring

4. ๐Ÿ”” Notification System

  • Gas price alerts
  • Transaction confirmations
  • Network congestion warnings
  • Custom alert thresholds

5. ๐Ÿ“ฐ News & Information

  • PYUSD ecosystem updates
  • Market news integration
  • Protocol announcements
  • Educational content

High-Performance Components

  1. Processing Engine

    • Parallel transaction trace processing
    • Real-time block analysis
    • MEV pattern detection
    • State reconstruction
    • Blockchain data stream processing
    • Pattern recognition
    • Predictive modeling

    Note: Some advanced analytics features requiring BigQuery are not implemented due to billing constraints. The application focuses on real-time data analysis using GCP's Blockchain RPC services.

  2. Visualization Engine

    • 3D blockchain state rendering
    • Real-time transaction flows
    • Interactive exploration
    • Weather effects system
      • Clear Sky: Low congestion (<30%)
      • Cloudy: Moderate congestion (30-60%)
      • Foggy: High congestion (60-80%)
      • Rain: Severe congestion (>80%)
  3. System Optimizations

    • Caching System
      • Transaction and balance caching
      • Network data and RPC response caching
      • Image caching
    • Background Processing
      • Parallel RPC requests
      • Transaction queue management
      • WebSocket connection handling
    • Resource Management
      • Memory and battery optimization
      • Network bandwidth management
      • Storage optimization

Google Gemini AI Integration

  • Transaction pattern recognition
  • Risk assessment
  • Gas optimization recommendations
  • Smart contract interaction analysis

Note on BigQuery Features

๐Ÿ”” Due to billing constraints, BigQuery integration features are currently not implemented. These features would have included:

  • Historical transaction analysis
  • Advanced MEV pattern detection
  • Cross-chain analytics
  • Custom SQL queries for blockchain data

The application currently uses GCP's Blockchain RPC services for real-time data analysis.

๐Ÿ”ง Troubleshooting

Common Issues

  1. WebSocket Connection Failed

    • Check GCP credentials
    • Verify network connectivity
    • Ensure correct WSS endpoint
  2. RPC Errors

    • Verify API keys
    • Check rate limits
    • Confirm endpoint availability

๐Ÿ“„ License

MIT License - see LICENSE for details

๐Ÿ“š Learn More

Google Cloud Web3 Resources

PYUSD Documentation

Ethereum Development

๐Ÿ™ Credits & Acknowledgments

This project is built upon the incredible work of several organizations and their technologies:

PayPal USD (PYUSD)

PYUSD is a trademark of PayPal, Inc. This project utilizes the PYUSD smart contract and infrastructure provided by PayPal and Paxos. For more information about PYUSD, visit pyusd.com.

Google Cloud Platform

This project leverages Google Cloud's Blockchain Node Engine and various Web3 services. Special thanks to the GCP team for providing robust blockchain infrastructure and documentation.

Ethereum Foundation

Built on Ethereum's technology and standards. Thanks to the Ethereum Foundation and community for maintaining the backbone of decentralized finance.

Open Source Community

This project uses various open-source libraries and tools. We're grateful to all the developers who maintain these resources.

๐Ÿ“ Legal Notice

  • PYUSDโ„ข is a trademark of PayPal, Inc.
  • Google Cloudโ„ข and related marks are trademarks of Google LLC
  • Ethereumโ„ข is a trademark of Ethereum Foundation

This project is not officially associated with PayPal, Google, or the Ethereum Foundation. It is an independent implementation utilizing their public APIs and services.

About

Seamless Transactions, Infinite Possibilities

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors