2gather
Split Expenses, Pay in Stablecoins.
The problem 2gather solves
Managing group expenses is often cumbersome, especially across borders or in regions with volatile currencies. Traditional apps like Splitwise or Tricount rely on fiat currencies and centralized systems, limiting access and increasing costs for users in emerging markets. Additionally, many existing solutions only support USD stablecoins, ignoring the need for flexibility in other stablecoins like cEUR or cREAL, which may offer better accessibility and economic stability.
For crypto users, splitting payments manually on blockchain is tedious and error-prone, involving multiple wallet addresses, gas fees, and a lack of seamless multi-party settlement options. The complexity of managing smart contracts and ensuring transparent, tamper-proof transactions further discourages mainstream adoption.
2gather addresses these challenges by offering a decentralized, user-friendly payment-splitting app directly on Telegram, making it easy for both crypto-savvy users and beginners to manage group expenses. By supporting multiple stablecoins (cUSD, cEUR, cREAL), it ensures that users can transact in their preferred currency, reducing friction and enhancing financial inclusion.
With smart contract-based settlements, 2gather eliminates manual calculations and risks, ensuring transparent, automated, and error-free payments. Its direct integration with Privi wallets allows seamless fund transfers without leaving Telegram, while the decentralized architecture ensures lower transaction costs and higher security.
Ultimately, 2gather makes splitting expenses faster, safer, and accessible to a global user base, bridging the gap between traditional and decentralized finance.
User Interaction and Data Flow
🟢 Step 1: Start the Bot
Users add the 2gather Telegram bot to a group or start a private chat.
Use the /start command to initiate.
Bot responds with a welcome message and options: Create Group, Add Expense, Settle Payments, View History.
🟠 Step 2: Connect Wallet
Bot prompts users to connect their Privi Wallet using a secure link.
Wallet connectivity enables direct stablecoin transfers and expense settlements.
Upon successful connection, bot confirms and links the wallet to the user’s Telegram ID.
🔵 Step 3: Create or Join a Group
Command /create allows users to start a new group, add participants, and define the default stablecoin (cUSD, cEUR, or cREAL).
Existing members can join via a unique group link shared in Telegram.
Bot stores group data and member preferences securely on the blockchain.
🟣 Step 4: Add Expenses
Users input expenses using /addexpense followed by details (amount, description, and payee).
Bot calculates each member's share based on the group settings.
Expenses are recorded in a smart contract on Base blockchain.
🟡 Step 5: Split and Settle Payments
Command /split displays individual balances.
Users can settle payments using /settle:
Bot triggers a smart contract to execute stablecoin transfers directly from the Privi wallet.
Settlement status updates immediately in the chat.
🔴 Step 6: Track and Review
Use /history to view past transactions and balances.
Bot pulls data from the blockchain, ensuring transparency and immutability.
📊 Data Flow Diagram
graph LR
A(User) -->|/start| B(Telegram Bot)
B -->|Connect Wallet| C(Privi Wallet)
C -->|Confirmation| B
B -->|Add Expense| D(Smart Contract)
D -->|Store Data| E(Base Blockchain)
B -->|Split Payments| D
D -->|Execute| C
B -->|Track History| E
E -->|Return Data| B
B -->|Show to User| A
The project architecture and development process
2gather is a decentralized payment-splitting app built on a modular architecture to ensure scalability, security, and seamless user experience. It integrates Telegram Bot API and Base Blockchain to automate and simplify expense management using stablecoins.
🏛 Core Architecture Overview
Frontend (Telegram Bot)
Built with Node.js and Telegram Bot API.
Handles user commands like /addexpense, /split, /settle, and /history.
Lightweight UI with inline buttons for ease of use.
Manages wallet connection securely via encrypted links.
Backend (Smart Contracts)
Developed in Solidity using OpenZeppelin standards for security.
Contracts deployed on Base Blockchain handle:
Expense Pool Contract: Stores expenses and manages balances.
Settlement Contract: Automates payments between users.
Uses Chainlink oracles for real-time price feeds if cross-stablecoin transactions are needed.
Blockchain Layer (Base and Celo)
Base: Fast and low-cost for primary transactions.
Celo: Provides multi-stablecoin support for global accessibility.
All transactions are recorded on-chain for transparency and auditability.
Wallet Integration
Uses Privi Wallet SDK for seamless in-app transfers.
Supports account abstraction for enhanced privacy and ease of use.
🔄 Development Process
Phase 1: MVP (0-3 Months)
Develop core bot features (add expenses, split payments).
Deploy basic smart contracts on Base for expense tracking.
Integrate Privi Wallet for direct payments.
Phase 2: Multi-Stablecoin Support (3-6 Months)
Expand contracts for cUSD, cEUR, cREAL support.
Enable cross-stablecoin conversions using Chainlink.
Phase 3: Premium Features & API (6-12 Months)
Implement recurring payments, invoicing, and analytics.
Launch API for business integrations.
🔑 Key Imple
Product Integrations
2gather integrates multiple APIs and services to enhance functionality and user experience:
Privi Wallet SDK:
Manages wallet connections and transactions directly through Telegram.
Supports multiple stablecoins (cUSD, cEUR, cREAL).
Telegram Bot API:
Facilitates user interactions via command-based input (/addexpense, /split, /settle).
Provides notifications for payment status and group updates.
Base Blockchain API:
Executes smart contract-based settlements for payment splitting.
Stores transaction data securely and transparently on-chain.
OpenZeppelin Libraries:
Implements security standards for smart contracts.
Prevents reentrancy attacks and ensures contract integrity.
Coingecko API (Future Integration):
To provide real-time stablecoin conversion rates if members use different tokens.
Key differentiators and uniqueness of the project
Multi-Stablecoin Support:
Unlike competitors like Splitwise or Tricount which rely on fiat currencies, 2gather supports cUSD, cEUR, and cREAL, allowing users to choose their preferred stablecoin.
Telegram-Based Interface:
Removes the need for separate apps. Users can manage expenses and execute payments directly via Telegram, simplifying the UX.
On-Chain Transparency:
Payments and expense data are stored immutably on Base blockchain, enhancing trust and auditability.
Competes with centralized solutions by offering decentralized, verifiable transactions.
Automated Settlement via Smart Contracts:
Eliminates manual calculations and errors in expense splitting.
Smart contracts automate payments based on predefined rules, ensuring precision and speed.
Lower Transaction Fees:
Utilizes Base’s efficient fee structure for cost-effective transactions, making it viable for small payments often not feasible on high-fee networks like Ethereum.
Enhanced Privacy:
Uses account abstraction to mask wallet addresses, offering privacy not available in traditional Web2 apps.
2gather’s unique blend of multi-stablecoin support, decentralized architecture, and Telegram integration sets it apart from existing solutions, providing a simpler, cheaper, and more transparent way to manage group expenses.
Trade-offs and shortcuts while building
Protocol Selection:
Chose Base blockchain for lower fees and fast finality over Ethereum. This limits exposure to Ethereum's vast ecosystem but ensures cost-efficiency.
Limited Stablecoin Support (MVP):
Initially supports only cUSD, cEUR, and cREAL due to development constraints, with plans to expand to more stablecoins in future updates.
Centralized Bot Hosting (Shortcut):
Telegram bot is currently hosted centrally for simplicity and faster deployment. Plans to migrate to a decentralized hosting solution for enhanced security.
Basic Analytics:
Focused on core payment functionalities during hackathon; advanced analytics (spending trends, top categories) are planned for future releases.
Minimal UI Design:
Prioritized command-based UX for Telegram instead of a full GUI to speed up development. Enhanced UI is planned post-MVP.
No On-Chain Governance Yet:
Governance mechanisms for fee adjustments and upgrades were deprioritized for MVP, focusing on core features first.
Additional Features
Multi-Stablecoin Support:
Implemented during the hackathon to allow payments in cUSD, cEUR, and cREAL, offering greater flexibility than similar apps.
Smart Contract-Based Settlements:
Built smart contracts for automated and transparent expense splitting during the hackathon.
Ensures error-free payments directly via Privi Wallet.
Security Enhancements:
Integrated OpenZeppelin security standards to safeguard against smart contract vulnerabilities.
Telegram Integration:
Added advanced command handling and seamless Privi Wallet integration directly via Telegram during the hackathon.
Account Abstraction:
Enabled to mask wallet addresses and enhance user privacy, making transactions less traceable.
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.
