Inspiration

The inspiration for Starkment came from a simple yet powerful observation: blockchain technology should be as accessible as sending a text message. While working with traditional banking systems and witnessing the complexity of crypto transactions, I realized that the future of finance lies in making blockchain interactions as seamless as everyday communication.

The concept of a "universal payments layer" emerged from seeing how existing social apps like Telegram has become the primary communication platform for millions worldwide. What if we could embed financial services directly into these conversations? What if sending money was as easy as sending a message?

This vision led to the creation of Starkment - bots on existing social apps that functions like a digital ATM, enabling users to create Starknet wallets instantly, send and receive USDT with zero gas fees, and manage their crypto assets through familiar chat interfaces, all accessible 24/7 from anywhere in the world.

What it does

Starkment is a comprehensive bot that serves as an ATM-like automated system for financial operations on the Starknet blockchain. The bot enables users to:

🔐 Wallet Management

  • Create Starknet wallets instantly with zero setup complexity
  • Secure private key storage using AES-256-GCM encryption
  • 4-digit PIN protection for all transactions
  • Email verification and user profile management

💰 USDT Transactions

  • Send USDT to any Telegram username
  • Receive USDT with gasless transactions via account abstraction
  • Real-time balance checking and transaction history
  • Zero gas fees through paymaster integration

🛡️ Security Features

  • Military-grade encryption for private keys with unique IVs
  • Bcrypt hashed transaction PINs with salt rounds
  • Session-based state management for secure multi-step flows
  • Comprehensive input validation and sanitization

📱 User Experience

  • Intuitive conversation flows that guide users through complex operations
  • Inline keyboards and callback handling for seamless interaction
  • Error recovery mechanisms and user-friendly error messages
  • 24/7 availability with instant response times

How we built it

The development process followed a systematic approach, breaking down the complex system into manageable components:

🏗️ Phase 1: Foundation & Architecture Built a modular NestJS application with clear separation of concerns:

@Module({
  imports: [BotModule, WalletModule, TransactionsModule, CommonModule]
})
export class AppModule {}

🔑 Phase 2: Wallet Creation System Implemented complete Starknet wallet generation with account abstraction:

async createWallet() {
  const privateKey = ec.starkCurve.utils.randomPrivateKey();
  const publicKey = ec.starkCurve.getStarkKey(privateKey);
  const account = new Account(provider, address, privateKey);
  // Deploy with Paymaster for gasless transactions
}

🔒 Phase 3: Security Implementation Added multiple layers of protection:

// AES-256-GCM encryption for private keys
export function encrypt(text: string) {
  const iv = crypto.randomBytes(IV_LENGTH);
  const cipher = crypto.createCipheriv(ALGORITHM, getEncryptionKey(), iv);
  // ... encryption logic
}

💸 Phase 4: Transaction System Integrated USDT transfers with Starknet's account abstraction:

async sendUSDT(from: string, to: string, amount: bigint) {
  const paymasterOptions = {
    nodeUrl: this.configService.get<string>('PAYMASTER_URL'),
    headers: { 'x-paymaster-api-key': apiKey }
  };
  // Execute gasless transfer
}

🤖 Phase 5: Telegram Bot Interface Designed intuitive user flows:

@Action('send_usd')
async sendUsd(@Ctx() ctx: BotContext) {
  await ctx.reply('🔐 Please enter your 4-digit PIN:');
  ctx.session.awaitingPin = true;
}

Challenges we ran into

1. Limited time I had limited time to building all the features and extending starkment to other existing apps like WhatsApp and Discord. My wife gave birth and i had spent so many time in the hospital due to some emergencies

2. Account Abstraction Complexity We did a deep dive into Starknet's account abstraction documentation, experimented with different paymaster configurations, and built comprehensive testing to ensure transaction reliability. This experience showed us that account abstraction is the future of blockchain UX.

3. Security Implementation Ensuring private key security while maintaining system usability was challenging. We implemented AES-256-GCM encryption with unique IVs for each wallet, added multiple layers of validation and sanitization, and conducted security audits. This reinforced that security in blockchain applications requires defense in depth.

4. State Management in Telegram Bots Managing complex multi-step user flows in a stateless bot environment was tricky. We implemented session-based state management using Telegraf sessions, created clear state machines for different user flows, and added comprehensive error recovery mechanisms.

5. Error Handling & Recovery Blockchain operations can fail in many ways, requiring robust error handling. I implemented comprehensive try-catch blocks around all blockchain operations, added detailed logging for debugging, and created user-friendly error messages for different failure scenarios. This showed us that error handling must account for network issues, gas problems, and smart contract failures.

Accomplishments that we're proud of

🚀 Zero-Gas Transactions Successfully implemented gasless USDT transfers using Starknet's account abstraction and paymaster integration, making crypto accessible to users easily. This removes the biggest barrier to crypto adoption.

🛡️ Security Implemented AES-256-GCM encryption for private key storage with unique IVs and authentication tags for each wallet. Our security implementation ensures user funds are protected at the highest level.

📈 Scalable Architecture Built a modular NestJS application that can handle thousands of concurrent users with proper separation of concerns. The architecture is designed for growth and maintainability.

💬 Intuitive User Experience Created a Telegram bot interface that makes complex blockchain operations as simple as sending a message. Users can perform financial operations without any technical knowledge.

🔧 Technical Innovation Successfully integrated cutting-edge blockchain technology (Starknet account abstraction) with familiar communication platforms (Telegram), creating a bridge between Web3 and everyday users.

What we learned

Blockchain & Starknet Development

  • Mastered Starknet.js v8.5.2 for account management and smart contract interactions
  • Gained expertise in account abstraction and paymaster integration
  • Learned Cairo smart contract development and Starknet's unique architecture
  • Understood RPC integration and blockchain state management

Security & Cryptography

  • Implemented military-grade AES-256-GCM encryption for private key storage
  • Developed secure key generation, encryption, and decryption workflows
  • Integrated bcrypt hashing for transaction PINs with proper salt rounds
  • Built secure user session handling for multi-step transactions

Backend Architecture

  • Leveraged TypeScript-first NestJS architecture with dependency injection
  • Designed efficient MongoDB schemas for wallet and transaction data
  • Created scalable, maintainable code with clear separation of concerns
  • Implemented comprehensive error handling and logging systems

Telegram Bot Development

  • Mastered advanced bot development with inline keyboards and callback handling
  • Designed intuitive conversation flows that guide users through complex operations
  • Implemented session-based state management for multi-step processes
  • Built robust message parsing and response systems

Mathematical Concepts

  • Elliptic curve cryptography: $y^2 = x^3 + \alpha \cdot x + \beta \pmod{p}$
  • AES-256-GCM encryption: $C = E_k(P) \oplus G$
  • Hash functions: $H = bcrypt(PIN, salt, 12)$

What's next for Starkment

🌐 Multi-token Support Extending beyond USDT to support all major tokens including ETH, BTC, and other popular cryptocurrencies on Starknet.

🎯 Other apps integration Starkment is to be integrated in all existing social media apps, discord, whatsApp, and so on

🔗 Cross-chain Integration Enabling transfers across different blockchains to create a truly universal payments layer that works everywhere.

🏦 DeFi Integration Adding lending, borrowing, and yield farming capabilities directly within the Telegram interface.

📱 Mobile App Development Creating native mobile applications for enhanced user experience and offline functionality.

🏢 Enterprise Solutions Developing B2B payment solutions for businesses and merchants to accept crypto payments.

🌍 Global Expansion Adding support for multiple languages and currencies to serve users worldwide.

🔐 Advanced Security Features Implementing multi-signature wallets, hardware wallet integration, and advanced fraud detection.

📊 Analytics Dashboard Building comprehensive analytics and reporting tools for users to track their financial activities.

🤝 Partnership Program Creating an ecosystem of partners and integrations to expand Starkment's reach and functionality.

🎯 AI-Powered Features Integrating artificial intelligence for smart transaction routing, fraud detection, and personalized financial advice.

Starkment represents just the beginning of a larger vision for universal payments. We're building the infrastructure that will make blockchain technology invisible to users while maintaining the highest standards of security and reliability.

Built With

Share this project:

Updates