StarkFiStarkFi

Telegram Bot

AI-powered Telegram interface for StarkFi DeFi on Starknet

Overview

The StarkFi Telegram Bot lets you interact with Starknet DeFi through natural language in Telegram. Bring your own AI model — OpenAI, Claude, or Gemini — and your own API key. No shared keys, no centralized billing.

Repository: github.com/ahmetenesdur/starkfi-telegram-bot

Features

FeatureDescription
SwapDEX-aggregated trading via Fibrous, AVNU, or Ekubo
StakeMulti-token staking (STRK, WBTC, tBTC, SolvBTC, LBTC)
LendSupply, borrow, repay, withdraw, close on Vesu V2
DCADollar-Cost Averaging with recurring buy orders (AVNU, Ekubo)
ConfidentialPrivacy-preserving transfers via Tongo Cash (ZK proofs)
PortfolioBalances with USD valuations and position health
BatchCombine swap + stake + supply + borrow + repay + withdraw + send + DCA in one transaction
Gas ModesGasless (pay in ERC-20) and gasfree (sponsored) via Paymaster

How It Works

The bot routes natural language messages through your AI model to StarkFi's MCP server, which executes on-chain operations:

Telegram → AI Model (your key) → StarkFi MCP Server → Starknet

Each user gets a dedicated MCP child process with an isolated home directory. There is no cross-contamination of wallet credentials between users.

Commands

Setup

CommandDescription
/startWelcome message and onboarding steps
/setupConfigure AI provider, model, and API key
/authLog in to StarkFi via email OTP
/modelSwitch model or change provider

Session

CommandDescription
/statusView provider, model, wallet, and history count
/helpList commands and example prompts
/clearReset conversation history
/deletekeyRemove stored API key and end session

Natural Language Examples

After setup and auth, send messages in any language. The AI handles the rest.

MessageWhat Happens
"What's my balance?"Returns token balances with USD values
"Swap 0.1 ETH to USDC"Gets a quote, asks for confirmation, executes
"Stake 100 STRK"Lists validators, user picks one, stakes
"Supply 0.5 ETH on Vesu"Lists lending pools, user picks one, supplies
"Borrow 100 USDC and swap to STRK"Batch borrow + swap in one transaction
"Send 50 USDC to 0x04…"Confirms recipient, executes transfer
"Buy 10 USDC of ETH every day"Creates a DCA recurring buy order
"Fund 100 USDC to my confidential account"Funds tokens into private balance (ZK)
"Swap + stake in one tx"Batch operation — multiple actions combined

BYOK Model

The bot supports three AI providers. You choose your provider and model during /setup:

ProviderModels
OpenAIGPT-5.4 Nano, GPT-5.4 Mini, GPT-5.4
ClaudeHaiku 4.5, Sonnet 4.6, Opus 4.6
Gemini3.1 Flash-Lite, 3 Flash, 2.5 Flash, 2.5 Pro, 3.1 Pro Preview

Your API key is encrypted with AES-256-GCM before storage and never held in plain text. Messages containing API keys are automatically deleted after processing.

Self-Hosting

git clone https://github.com/ahmetenesdur/starkfi.git
cd starkfi/starkfi-telegram-bot
pnpm install

cp .env.example .env
# Fill in TELEGRAM_BOT_TOKEN, BOT_ENCRYPTION_SECRET, STARKFI_SERVER_URL

pnpm dev

See the Setup Guide for full configuration and Deployment Guide for production (Docker, Railway).


See Also

  • Security Architecture — Bot encryption, per-user MCP isolation, and rate limiting details
  • MCP Server — The underlying MCP protocol that powers the bot
Edit on GitHub

Last updated on

On this page