DEV Community

flat cash
flat cash

Posted on

I Built a Telegram Mini App That Gives Every User a Private Stablecoin Wallet — No Seed Phrases

The Problem

Every crypto wallet today requires seed phrases, browser extensions, or app downloads. For 900 million Telegram users, this is an unnecessary barrier.

I built a Telegram Mini App that:

  • Creates a stablecoin wallet automatically when you open it
  • No seed phrases, no MetaMask, no app downloads
  • Private transfers via BearerSwap (zero-knowledge proofs)
  • CPI-pegged stablecoins that track real inflation

Architecture

Telegram Bot (@FlatCashBot)
    -> webhook
Express Server (/api/telegram/webhook)
    -> validates initData
FlatID System (auto-creates wallet)
    ->
Telegram Mini App (/tg)
    -> shows balance, send, receive
FlatIDVaultV3 (Ethereum mainnet)
Enter fullscreen mode Exit fullscreen mode

How It Works

1. Auto-Registration

When a Telegram user opens the Mini App, the server:

  1. Validates the Telegram initData signature
  2. Checks if telegram_id exists in the database
  3. If not, creates a new FlatID (email-based identity mapped to on-chain vault)
  4. Returns a session token

2. Private Transfers with BearerSwap

Instead of on-chain transactions that expose sender/receiver, BearerSwap uses:

  • Bearer tokens: Cryptographic proofs of ownership
  • Atomic swaps: No intermediary, no trace
  • Off-chain settlement: Only the vault balance changes on-chain

3. The SAVE Token Integration

The Mini App includes a Buy SAVE CTA that links to the SAVeSale contract.

Why SAVE matters:

The math is simple: with only 2,349 SAVE tokens in the pool and protocol-owned liquidity that never sells, any buy pressure creates a one-way price ratchet.

The Stack

  • Frontend: React 19 + Tailwind 4 (Telegram Mini App SDK)
  • Backend: Express 4 + tRPC 11
  • Auth: Telegram initData validation + FlatID session
  • Database: MySQL/TiDB (Drizzle ORM)
  • Chain: Ethereum mainnet (FlatIDVaultV3)

Try It

What Makes This Different

  1. No seed phrases — Identity is email-based (FlatID), not key-based
  2. Privacy by default — BearerSwap means no on-chain trace
  3. CPI-pegged — Your balance tracks real inflation, not USD
  4. Telegram-native — 900M users can access without leaving the app

The future of stablecoins is not another ERC-20 with a Metamask popup. It is invisible infrastructure inside the apps people already use.


Built by the FLAT Protocol team. The protocol owns 100% of liquidity and will never sell. Mathematica Inevitabilis Est.

Top comments (0)