styx
Styx Skill
Trustless BTC→sBTC conversion via the Styx protocol by FaktoryFun. Agents deposit BTC on L1 and receive sBTC on Stacks L2 through managed liquidity pools. Uses @faktoryfun/styx-sdk.
How It Works
- Check pool liquidity —
pool-statusshows available sBTC in the pool - Create deposit reservation —
depositreserves pool liquidity and returns a deposit ID - Build & sign transaction — The SDK provides UTXOs and deposit address; the agent builds and signs locally with
@scure/btc-signer - Broadcast — Signed transaction is broadcast to mempool.space
- Track status —
statusmonitors the deposit through confirmation
Pools
| Pool ID | Type | Min Deposit | Max Deposit | Swap Types |
|---|---|---|---|---|
main |
Legacy | 10,000 sats | 300,000 sats | sbtc, usda, pepe |
aibtc |
AI BTC | 10,000 sats | 1,000,000 sats | sbtc, aibtc |
Subcommands
pool-status
bun run styx/styx.ts pool-status [--pool main|aibtc]
Returns realAvailable, estimatedAvailable (BTC), and lastUpdated.
pools
bun run styx/styx.ts pools
Lists all available pools with configs and active status.
fees
bun run styx/styx.ts fees
Returns current Bitcoin network fee estimates (low/medium/high in sat/vB).
price
bun run styx/styx.ts price
Returns current BTC price in USD.
deposit
bun run styx/styx.ts deposit --amount <sats> --stx-receiver <addr> --btc-sender <addr> [--pool main|aibtc] [--fee low|medium|high]
Full headless deposit flow: creates reservation, prepares PSBT, signs with wallet key, broadcasts to mempool.space, and updates deposit status. Requires an unlocked wallet.
status
bun run styx/styx.ts status --id <deposit-id>
bun run styx/styx.ts status --txid <btc-txid>
Check deposit status by deposit ID or Bitcoin transaction ID.
history
bun run styx/styx.ts history --address <stx-addr>
Get deposit history for a Stacks address.
Deposit Statuses
initiated— Deposit record created, liquidity reservedbroadcast— Bitcoin tx broadcast to mempoolprocessing— At least 1 BTC confirmationconfirmed— Required confirmations reached, sBTC mintedrefund-requested— User requested refundcanceled— Deposit canceled, liquidity released
Notes
- Always check
pool-statusbefore depositing to verify sufficient liquidity - Update deposit status after broadcast — this is critical for accurate pool accounting
- Min deposit: 10,000 sats (0.0001 BTC). Max varies by pool.
- The SDK uses a pre-configured API key for the Styx backend
More from aibtcdev/skills
arxiv-research
Fetch and compile arXiv papers on LLMs, autonomous agents, and AI infrastructure into scored, grouped research digests. Stores digests at ~/.aibtc/arxiv-research/digests/. No API key required.
178aibtc-news
aibtc.news decentralized intelligence platform — list and claim editorial beats, file authenticated signals (news items) with BIP-322 signatures, browse signals, check weighted leaderboard, review signals as publisher, and trigger daily brief compilation.
166aibtc-news-correspondent
Correspondent for aibtc.news: claim a beat, research daily using live on-chain and market data, file quality signals, earn $25 sBTC per signal included in the daily brief
157btc
Bitcoin L1 operations — check balances, estimate fees, list UTXOs, transfer BTC, and classify UTXOs as cardinal (safe to spend), ordinal (inscriptions), or rune (rune tokens). Data sourced from mempool.space and the Unisat API.
150aibtc-news-fact-checker
Side role: find and correct bad signals, earn leaderboard points per Publisher-approved correction (max 3/day)
149defi
DeFi operations on Stacks — ALEX DEX token swaps and liquidity pool queries, plus Zest Protocol lending (supply, withdraw, borrow, repay, claim rewards). All operations are mainnet-only. Write operations require an unlocked wallet.
148