Starkfi
No description available
Ask AI about Starkfi
Powered by Claude Β· Grounded in docs
I know everything about Starkfi. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
A production-grade CLI, MCP server, and Telegram bot that gives both developers and AI agents full access to Starknet DeFi β powered by the Starkzap SDK.
npx starkfi@latest --help
Why StarkFi?
Most DeFi tools are built for humans clicking buttons. StarkFi is built for agents.
- π€ 51 MCP tools β Any AI assistant (Cursor, Claude, Antigravity) can execute DeFi operations autonomously
- β‘ Atomic Batching β Combine swap + stake + lend + send into a single multicall transaction
- πΈ Gas Abstraction β Pay gas in STRK, ETH, USDC, USDT, or DAI β or let the developer sponsor gas entirely
- π Confidential Transfers β Privacy-preserving transfers via Tongo Cash (ZK proofs)
- π DCA β Recurring buy orders via AVNU and Ekubo
- π§ͺ Simulate Everything β Dry-run any transaction before broadcasting
- π¬ Telegram Bot β Chat-based DeFi via natural language with BYOAI model
Quick Start
# 1. Authenticate
npx starkfi@latest auth login user@example.com
npx starkfi@latest auth verify user@example.com <OTP_CODE>
# 2. Check balance
npx starkfi@latest balance
# 3. Swap tokens
npx starkfi@latest trade 100 USDC ETH --simulate # Preview
npx starkfi@latest trade 100 USDC ETH # Execute
# 4. View portfolio
npx starkfi@latest portfolio
What You Can Do
| Feature | CLI Example | Docs |
|---|---|---|
| Swap | trade 100 USDC ETH --provider auto | Trading |
| Multi-Swap | multi-swap "100 USDC>ETH, 50 DAI>STRK" | Trading |
| Batch | batch --swap "0.1 ETH USDC" --stake "50 STRK karnot" | Batch |
| Stake | stake 100 -v karnot | Staking |
| Lend | lend-supply 100 -p Prime -t USDC | Lending |
| DCA | dca-create 1000 USDC ETH --per-cycle 10 --frequency P1D | DCA |
| Troves Vaults | troves-deposit 100 evergreen_strk | Troves |
| LST Staking | lst-stake 100 | LST |
| Confidential | conf-fund 100 --token USDC | Confidential |
| Portfolio | portfolio-rebalance --target "50 ETH, 30 USDC, 20 STRK" | Portfolio |
| Gas Modes | config set-gasfree on / config set-gas-token USDC | Configuration |
β Full CLI Reference (50 commands)
AI Integration
MCP Server (51 Tools)
npx starkfi@latest mcp-start
Add to your AI client config (Cursor, Claude Desktop, Antigravity):
{
"mcpServers": {
"starkfi": {
"command": "npx",
"args": ["-y", "starkfi@latest", "mcp-start"]
}
}
}
| Category | Tools | Count |
|---|---|---|
| Auth & Config | get_auth_status, config_action | 2 |
| Wallet | get_balance, get_portfolio, deploy_account, send_tokens, get_tx_status, rebalance_portfolio | 6 |
| Trade | get_swap_quote, swap_tokens, get_multi_swap_quote, multi_swap, batch_execute | 5 |
| Staking | list_validators, list_pools, get_staking_info, get_stake_status, stake_tokens, unstake_tokens, claim_rewards, compound_rewards | 8 |
| Lending | list_lending_pools, get_lending_position, supply_assets, withdraw_assets, borrow_assets, repay_debt, close_position, monitor_lending_position, auto_rebalance_lending, lending_quote_health | 10 |
| DCA | dca_preview, dca_create, dca_list, dca_cancel | 4 |
| Confidential | confidential_setup, confidential_balance, confidential_fund, confidential_transfer, confidential_withdraw, confidential_ragequit, confidential_rollover | 7 |
| Troves Vaults | list_troves_strategies, get_troves_position, troves_deposit, troves_withdraw | 4 |
| LST Staking | get_lst_position, get_lst_stats, lst_stake, lst_redeem, lst_exit_all | 5 |
β Full MCP Documentation Β· Tool Schemas (MCP.md)
Agent Skills (12 Workflows)
npx skills add ahmetenesdur/starkfi
Pre-packaged multi-step workflows for AI coding assistants β authenticate, swap, stake, lend, DCA, batch, and more.
Telegram Bot
Chat-based DeFi via natural language with BYOAI model (OpenAI, Claude, Gemini).
β Bot Setup Β· Repository
Architecture
src/
βββ commands/ # 14 command groups (50 commands)
βββ services/ # 17 service modules
βββ mcp/ # MCP server (51 tools, stdio transport)
βββ lib/ # 15 shared utilities
skills/ # 14 agent skills
server/ # Auth server (Hono + Privy TEE)
docs/ # Documentation site (Fumadocs)
β Architecture Deep Dive Β· Security Model
Starkzap Modules
StarkFi leverages all core Starkzap v3 modules:
| Module | Usage |
|---|---|
| Wallets | OnboardStrategy.Privy + argentXV050 for email-based wallet onboarding |
| Paymaster | Gas abstraction with v3 { type: "paymaster", gasToken } union |
| Staking | Multi-token lifecycle (STRK, WBTC, tBTC, SolvBTC, LBTC) |
| DCA | Recurring buy orders via AVNU and Ekubo |
| TxBuilder | Atomic multicall batching (swap + stake + lend + send + DCA + troves) |
| Confidential | Privacy-preserving transfers via Tongo Cash (ZK proofs) |
| Troves | DeFi vault strategies β deposit/withdraw into yield-bearing vaults |
| Endur LST | Liquid staking (STRK β xSTRK) β yield embedded in share price |
| ERC-20 | Token presets, balance queries, transfers, approvals |
Development
git clone https://github.com/ahmetenesdur/starkfi.git
cd starkfi
pnpm install
pnpm build # Compile TypeScript β dist/
pnpm dev -- --help # Run with tsx (hot-reload)
pnpm lint # ESLint
pnpm format # Prettier
Auth Server
cd server && pnpm install && cp .env.example .env && pnpm dev
Contributing
- Fork the repository and create a feature branch
- Install dependencies:
pnpm install - Build and verify:
pnpm build && pnpm lint - Submit a pull request with a clear description
For bugs and feature requests, open an issue.
License
MIT β ahmetenesdur
