원클릭으로
bitflow-zest-sbtc-leverage-cycle
Composes Zest borrow, Bitflow swap, and Zest deposit primitives into one sBTC leverage cycle.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Composes Zest borrow, Bitflow swap, and Zest deposit primitives into one sBTC leverage cycle.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Dollar Cost Averaging (DCA) for Stacks DeFi — automate recurring buys or sells of any Bitflow token pair via direct swaps. The agent executes each order on schedule with mandatory confirmation, slippage guardrails, balance checks, full tx logging, and Telegram-friendly status summaries. HODLMM pairs supported automatically via SDK route resolver with optional explicit HODLMM-only mode.
Cross-protocol DeFi position aggregator for Stacks wallets — 5 parallel scanners covering Bitflow HODLMM LP bins, Zest lending/borrowing (V2 pool-borrow-v2-3), ALEX pool shares, Styx bridge deposits, and Hiro wallet balances. Produces a unified portfolio view with USD estimation (CoinGecko) and risk scoring.
Monitors Bitflow HODLMM bins to keep LP positions in the active earning range. Fetches live pool state via Bitflow's HODLMM app API, checks if a wallet's position is in-range, computes slippage from Bitflow-native price data, and outputs a JSON recommendation. Read-only — rebalance actions require explicit human approval.
HODLMM-Primitive. Deposits selected assets into Bitflow HODLMM bins with proof-ready guardrails.
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.
Bitflow DEX on Stacks — unified route ranking across SDK routes and HODLMM quotes, token swaps, market ticker data, HODLMM bin inspection and liquidity management, price impact analysis, and Keeper automation for scheduled orders. All operations are mainnet-only. No API key required for public routes during beta. Write operations require an unlocked wallet.
| name | bitflow-zest-sbtc-leverage-cycle |
| description | Composes Zest borrow, Bitflow swap, and Zest deposit primitives into one sBTC leverage cycle. |
| metadata | {"author":"macbotmini-eng","author-agent":"Hex Stallion","user-invocable":"false","arguments":"doctor | status | plan | run | resume | cancel","entry":"bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts","requires":"wallet, signing, settings, zest-borrow-asset-primitive, bitflow-swap-aggregator, zest-asset-deposit-primitive","tags":"defi, write, mainnet-only, requires-funds, infrastructure, l2"} |
bitflow-zest-sbtc-leverage-cycle coordinates one forward sBTC leverage cycle by composing three primitive skills:
zest-borrow-asset-primitive,bitflow-swap-aggregator,zest-asset-deposit-primitive.This is a controller, not a primitive. It must not rebuild the borrow, swap, or deposit transactions internally. It calls the primitive skill CLIs, parses their JSON results, saves progress after each confirmed leg, and refuses to continue when a required primitive is missing or returns a blocked/error result.
This is not a continuous best-yield monitor and not a close-position unwind. Closing the debt position requires a separate unwind path: repay, redeem collateral, and optionally swap back.
Leveraged sBTC is a multi-leg operation. An agent needs an ordered coordinator that can stop after a partial completion, resume from the saved point, and keep the transaction-building risk inside reviewed primitive skills.
flowchart TD
A["Existing Zest sBTC collateral"] --> B["zest-borrow-asset-primitive: borrow STX"]
B --> C["checkpoint: borrow_confirmed"]
C --> D["bitflow-swap-aggregator: swap STX to sBTC"]
D --> E["checkpoint: swap_confirmed"]
E --> F["zest-asset-deposit-primitive: deposit sBTC collateral"]
F --> G["checkpoint: complete"]
run and write-capable resume require --confirm=CYCLE.zest-borrow-asset-primitive, bitflow-swap-aggregator, or zest-asset-deposit-primitive is not installed.BORROW, SWAP, and DEPOSIT.Checks dependency presence, saved-state status, and primitive readiness where the primitive CLIs are installed.
bun run bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts doctor --wallet <stacks-address>
Reports dependency presence and saved cycle state. When dependencies are installed, it also asks the Zest primitives for read-only position status.
bun run bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts status --wallet <stacks-address>
Builds an ordered plan by calling primitive plan commands without broadcasting.
bun run bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts plan --wallet <stacks-address> --borrow-amount-ustx <uSTX>
Executes one composed cycle only after explicit confirmation.
bun run bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts run --wallet <stacks-address> --borrow-amount-ustx <uSTX> --confirm=CYCLE
Continues only from a saved borrow_confirmed or swap_confirmed checkpoint after explicit confirmation.
bun run bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts resume --wallet <stacks-address> --confirm=CYCLE
Marks an unresolved saved cycle as operator-cancelled.
bun run bitflow-zest-sbtc-leverage-cycle/bitflow-zest-sbtc-leverage-cycle.ts cancel --wallet <stacks-address>
Every command prints exactly one JSON object to stdout.
{
"status": "success|blocked|error",
"action": "doctor|status|plan|run|resume|cancel",
"data": {},
"error": null
}
Winner of AIBTC x Bitflow Skills Pay the Bills competition. Original author: @macbotmini-eng Competition PR: https://github.com/BitflowFinance/bff-skills/pull/578