batch

Execute multiple different DeFi operations in a single Starknet transaction — combine swaps, staking, lending supply, and token sends into one multicall. Use this skill when the user wants to batch, combine, bundle, or chain multiple diverse operations together in one atomic transaction, such as "swap ETH and then stake STRK" or "swap and send in one go". Also trigger when the user mentions multicall, combining operations, doing multiple things at once, or wants to save gas by bundling actions — even if they don't use the word "batch".

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "batch" with this command: npx skills add ahmetenesdur/starkfi/ahmetenesdur-starkfi-batch

Batch Execute

Bundle multiple diverse DeFi operations into a single Starknet multicall transaction. Supports combining swaps, staking, lending supply, and token sends — all executed atomically in one on-chain call.

Prerequisites

  • Active session required.
  • Sufficient balance for all operations + gas fees.
  • Minimum 2 operations required per batch.

Rules

  1. BEFORE any batch, you MUST run npx starkfi@latest status and npx starkfi@latest balance to verify connectivity and funds.
  2. A batch MUST include at least 2 operations. For single operations, use the dedicated skill (trade, send, staking, or lending).
  3. Each --swap, --stake, --supply, and --send flag can appear multiple times (repeatable).
  4. Suggest using --simulate first to verify the entire batch would succeed.
  5. AFTER a successful batch, verify with npx starkfi@latest tx-status <hash>.
  6. All operations in a batch are atomic — if any one fails, the entire transaction reverts.

Commands

npx starkfi@latest batch [--simulate] [--json] \
  --swap "<amount> <from> <to>" \
  --stake "<amount> <token> <validator_or_pool>" \
  --supply "<amount> <token> <pool_address>" \
  --send "<amount> <token> <recipient>"

Operation Formats

FlagFormatExample
--swap"<amount> <from> <to>"--swap "100 USDC ETH"
--stake"<amount> <token> <validator_or_0xPool>"--stake "500 STRK Karnot"
--supply"<amount> <token> <0xPool>"--supply "100 USDC 0x04a3..."
--send"<amount> <token> <0xRecipient>"--send "10 STRK 0x07b2..."

Note: --stake accepts either a validator name (e.g. Karnot) or a pool contract address (starting with 0x). The CLI auto-detects the format.

Parameters

ParameterTypeDescriptionRequired
--swapstringSwap operation (repeatable)No*
--stakestringStake operation (repeatable)No*
--supplystringLending supply operation (repeatable)No*
--sendstringToken transfer operation (repeatable)No*
--simulateflagEstimate fees without broadcastingNo
--jsonflagOutput as JSONNo

*At least 2 operations (of any type) are required.

Examples

User: "Swap 100 USDC to ETH and stake 500 STRK with Karnot in one transaction"

npx starkfi@latest status
npx starkfi@latest balance
npx starkfi@latest batch --swap "100 USDC ETH" --stake "500 STRK Karnot"
npx starkfi@latest tx-status <hash>

User: "Batch: swap 50 USDT to STRK, supply 100 USDC and send 10 STRK"

npx starkfi@latest status
npx starkfi@latest balance
npx starkfi@latest batch \
  --swap "50 USDT STRK" \
  --supply "100 USDC 0x04a3..." \
  --send "10 STRK 0x07b2..."
npx starkfi@latest tx-status <hash>

User: "Simulate a batch of two swaps and a stake"

npx starkfi@latest batch --simulate \
  --swap "100 USDC ETH" \
  --swap "200 USDT STRK" \
  --stake "500 STRK Karnot"

Error Handling

ErrorAction
Too few operationsAt least 2 operations required. Use dedicated skills instead.
Insufficient balanceCheck balance for all required tokens.
Invalid validator/poolRun validators/pools to find valid names/addresses.
Simulation failedOne of the operations would revert. Check each individually.
Not authenticatedRun authenticate-wallet skill first.

Related Skills

  • Use trade for a single swap.
  • Use staking for standalone staking operations.
  • Use lending for standalone lending operations.
  • Use send for standalone token transfers.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

authenticate-wallet

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

trade

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

balance

No summary provided by upstream source.

Repository SourceNeeds Review