trade

Swap tokens using Fibrous aggregation on Base, Citrea, HyperEVM, or Monad. Finds optimal route, simulates before execution.

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 "trade" with this command: npx skills add fibrous-finance/fibx-skills/fibrous-finance-fibx-skills-trade

Trade / Swap Tokens

Exchange one token for another via Fibrous aggregation. The CLI finds the best route, handles token approvals, simulates the swap, and executes.

Note: Automatically detects and executes Wrap (Native -> Wrapped) and Unwrap (Wrapped -> Native) operations directly via contract calls, bypassing aggregation to save gas.

Prerequisites

  • Active session required.
  • Sufficient balance of the source token + gas fees.

Rules

  1. BEFORE any trade, you MUST run npx fibx@latest status and npx fibx@latest balance to verify connectivity and source token balance.
  2. If the user specifies a chain, you MUST include --chain <name>. If not specified, default to base and state it.
  3. Default slippage is 0.5%. To change it, you MUST ask the user for confirmation before using --slippage.
  4. The CLI defaults to exact approval for ERC-20 tokens. NEVER use --approve-max unless the user explicitly requests it.
  5. AFTER a successful trade, you MUST verify the transaction using tx-status with the same --chain flag.

Chain Reference

ChainFlagNative Token
Base--chain baseETH
Citrea--chain citreacBTC
HyperEVM--chain hyperevmHYPE
Monad--chain monadMON

Commands

npx fibx@latest trade <amount> <from_token> <to_token> [--chain <chain>] [--slippage <n>] [--approve-max] [--json]

Parameters

ParameterTypeDescriptionRequired
amountnumberAmount of source token to swapYes
from_tokenstringSource token symbol (e.g. ETH, USDC)Yes
to_tokenstringTarget token symbol (e.g. USDC, DAI)Yes
chainstringbase, citrea, hyperevm, or monadNo
slippagenumberSlippage tolerance in % (e.g. 1.0)No
approve-maxflagUse infinite approval instead of exactNo
jsonflagOutput as JSONNo

Default chain: base. Default slippage: 0.5.

Examples

User: "Swap 0.1 ETH for USDC"

npx fibx@latest status
npx fibx@latest balance
npx fibx@latest trade 0.1 ETH USDC
npx fibx@latest tx-status <hash>

User: "Buy USDC with 1 MON on Monad"

npx fibx@latest status
npx fibx@latest balance --chain monad
npx fibx@latest trade 1 MON USDC --chain monad
npx fibx@latest tx-status <hash> --chain monad

User: "Wrap 1 ETH to WETH on Base"

npx fibx@latest status
npx fibx@latest balance
npx fibx@latest trade 1 ETH WETH --chain base
npx fibx@latest tx-status <hash>

User: "Unwrap 0.5 wMON on Monad"

npx fibx@latest status
npx fibx@latest balance --chain monad
npx fibx@latest trade 0.5 wMON MON --chain monad
npx fibx@latest tx-status <hash> --chain monad

Error Handling

ErrorAction
No route foundLiquidity may be too low or pair doesn't exist on the chain.
Insufficient balanceCheck balance and suggest a smaller amount.
Slippage exceededPrice moved unfavorably — suggest retrying with --slippage.
Simulation failedRoute is invalid or would revert. Do not retry blindly.
Not authenticatedRun authenticate-wallet skill first.
Rate limit / 429Use config skill to set a custom RPC.

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
General

config

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

trade

No summary provided by upstream source.

Repository SourceNeeds Review
General

trade

No summary provided by upstream source.

Repository SourceNeeds Review