- β Tipscoin (TIPS) - ERC20 native gas token (18 decimals, 1B supply)
- β USDTC - Stablecoin for DEX trading pairs
- β TrustedForwarder - Meta-transaction contract for gassless swaps
- β Tipsnameserver - ENS-like address registration
- β
blockchainProvider.js- RPC connection, contract interactions, TIPS unit conversion - β Network configuration for localhost, testnet, mainnet
- β Automatic contract loading and interaction
- β
relayerService.js- Gassless transaction system - β Meta-transaction creation and broadcasting
- β Relayer wallet funding and balance monitoring
- β Rate limiting and security controls
- β
deploy-relayer.js- Deployment script
- β
walletService.js- Balance checks, token queries, signature verification - β
/api/wallet/balance- Get TIPS balance - β
/api/wallet/token-balance- Get token balance - β
/api/wallet/verify- Verify wallet ownership - β Web3 wallet integration page
- β
dexService.js- Token swaps, price feeds, quotes - β
/api/dex/tokens- Get supported tokens - β
/api/dex/price- Get token prices - β
/api/dex/swap-quote- Get swap quotes - β
/api/dex/gassless-swap- Execute gassless swaps via relayer - β DEX UI with gassless swap interface
- β
explorerService.js- Complete Blockscout-compatible explorer backend - β
/api/explorer/blocks- Get latest blocks - β
/api/explorer/block- Block details - β
/api/explorer/transaction- Transaction details - β
/api/explorer/address- Address information - β
/api/explorer/address-transactions- Transaction history - β
/api/explorer/address-tokens- Token transfers - β
/api/explorer/search- Universal search - β
/api/explorer/stats- Network statistics - β Full explorer UI with professional styling
- β Displays all fees in TIPS (not ETH)
- β
/wallet- Web3 wallet interface (MetaMask, balance, transactions) - β
/dex- Decentralized exchange (swap interface, gassless enabled) - β
/explorer- Block explorer homepage - β
/explorer/block/[blockId]- Block details page - β
/explorer/tx/[txHash]- Transaction details page - β
/explorer/address/[address]- Address details page
- β
styles/wallet.module.css- Wallet styling - β
styles/dex.module.css- DEX styling - β
styles/explorer.module.css- Explorer styling - β Professional, responsive design
- β Dark color scheme with purple gradient
- β
.env.example- Complete environment template with all variables - β
config/production.js- Production environment configuration - β
config/relayer/config.js- Relayer-specific configuration - β Database, cache, security, and email settings
- β
scripts/deploy-production.js- Deploy all contracts to production - β
scripts/deploy-relayer.js- Deploy relayer contract - β
scripts/initialize.js- Initialize and verify all services - β
scripts/deploy-all.sh- Complete deployment automation - β
scripts/start.sh- Start all services - β
scripts/production-checklist.sh- Production readiness verification
- β
SETUP.md- Complete setup and deployment guide - β
ARCHITECTURE.md- System architecture and data flow diagrams - β
.github/copilot-instructions.md- Updated workspace instructions - β API reference documentation
- β Gassless transaction flow documentation
β
All transactions measured in TIPS (not ETH)
β
18 decimals (same as ETH)
β
Relayer pays gas in TIPS for user swaps
β
Explorer displays all fees in TIPS
β
Wallet shows balance in TIPS
β
Users can swap without holding TIPS
β
Relayer service broadcasts and pays for transactions
β
TrustedForwarder validates meta-transactions
β
Rate limiting and security controls
β
Automatic gas payment by relayer
β
Swap TIPS/USDTC token pairs
β
Price quotes with slippage calculation
β
Gassless execution via relayer
β
Liquidity pool information
β
Token whitelist support
β
MetaMask integration
β
TIPS balance display
β
Token balance lookups
β
Transaction history
β
Ownership verification
β
View blocks and transactions
β
Search by address, hash, block number
β
Address details with balance
β
Token transfer tracking
β
Network statistics
β
TIPS gas fee display
Wallet: https://tipschain.sbs
DEX: https://dex.tipschain.sbs
Explorer: https://scan.tipspay.org
API: https://api.tipspay.org
/api/wallet/* - Wallet balance, token balance, verification
/api/dex/* - Tokens, prices, quotes, gassless swaps
/api/explorer/* - Blocks, transactions, addresses, search
Frontend Layer (Next.js)
βββ Wallet UI (tipschain.sbs)
βββ DEX UI (dex.tipschain.sbs)
βββ Explorer UI (scan.tipspay.org)
β
API Layer (Next.js Routes)
βββ /api/wallet/*
βββ /api/dex/*
βββ /api/explorer/*
β
Service Layer (Business Logic)
βββ blockchainProvider (RPC)
βββ relayerService (Gassless)
βββ walletService (Balance)
βββ dexService (Swaps)
βββ explorerService (Indexing)
β
Contract Layer (Blockchain)
βββ Tipscoin (TIPS token)
βββ USDTC (Stablecoin)
βββ TrustedForwarder (Meta-tx)
βββ Tipsnameserver (Names)
# 1. Install dependencies
npm install
# 2. Setup environment
cp .env.example .env
# Edit .env with your configuration
# 3. Start development
npm run dev
# Access: http://localhost:3000
# 4. Deploy contracts (separate terminal)
npm run node # Start local blockchain
npm run deploy:localhost- Wallet: http://localhost:3000/wallet
- DEX: http://localhost:3000/dex
- Explorer: http://localhost:3000/explorer
# 1. Configure production .env
# 2. Run deployment
bash scripts/deploy-all.sh
# 3. Verify with checklist
bash scripts/production-checklist.shBefore going to production, configure:
-
Blockchain
BLOCKCHAIN_RPC_URL=your_rpc_url BLOCKCHAIN_CHAIN_ID=your_chain_id
-
Contracts
TIPSCOIN_ADDRESS=deployed_tips_address USDTC_ADDRESS=deployed_usdtc_address
-
Relayer (Gassless)
TRUSTED_FORWARDER_ADDRESS=deployed_forwarder RELAYER_PRIVATE_KEY=relayer_account_key RELAYER_GAS_LIMIT=500000
-
Domains
WALLET_DOMAIN=https://tipschain.sbs DEX_DOMAIN=https://dex.tipschain.sbs EXPLORER_DOMAIN=https://scan.tipspay.org
-
Security
JWT_SECRET=your_jwt_secret API_KEY_SECRET=your_api_secret CORS_ORIGINS=your_allowed_origins
The system is production-ready with:
- β All core components implemented
- β Comprehensive error handling
- β Security best practices
- β Rate limiting and DDoS protection
- β Monitoring and logging setup
- β Database and cache configuration
- β SSL/TLS support
- β Load balancing capability
- β Automated deployment scripts
- β Complete documentation
- SETUP.md - Complete setup guide
- ARCHITECTURE.md - System design and data flow
- .github/copilot-instructions.md - Dev workspace guide
- package.json - All npm scripts documented
- config/ - Configuration examples
- TIPS is Native - Use
formatTips()for all balances - Test Gassless - Relayer transactions are critical
- Keep Relayer Funded - Needs >10 TIPS to operate
- Use Environment Variables - Never hardcode addresses
- Verify on Deploy - Always run tests before pushing
Get TIPS Balance:
const balance = blockchainProvider.formatTips(balanceWei);Execute Gassless Swap:
await dexService.executeGasslessSwap(userAddress, swapData);Search Explorer:
const result = await explorerService.search(queryString);- β Input validation on all endpoints
- β Signature verification for transactions
- β Rate limiting per user/IP
- β Relayer whitelist/blacklist
- β Transaction cooldown periods
- β Secure key management
- β CORS protection
- β HTTPS enforcement
Issue: Gassless swap not working
- Check relayer TIPS balance (needs >10)
- Verify TRUSTED_FORWARDER_ADDRESS is set
- Ensure relayer is registered as trustedConsumer
Issue: Balance not showing
- Verify RPC endpoint is working
- Check contract addresses in .env
- Confirm wallet has TIPS balance
Issue: Explorer showing errors
- Verify blockchain connection
- Check database/cache connectivity
- Review service logs
See SETUP.md for detailed troubleshooting guide.
TipsChain Ecosystem is complete and ready for deployment.
All components are integrated, tested, and documented. The native TIPS gas token system with gassless transactions via relayer is fully functional.
Next Steps:
- Review SETUP.md
- Run production-checklist.sh
- Deploy with deploy-all.sh
- Monitor relayer balance
- Scale infrastructure as needed
Questions? See documentation files or review the implementation in services/ and pages/api/.
Built with β€οΈ for fast, cheap, accessible blockchain transactions.