bsc-impossible-finance
BSC (Binance Smart Chain) trading on Impossible Finance DEX — wallet creation, token swaps, pair discovery, and balance management.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/kj-script/impossible-finance-skillImpossible Finance Trading Skill
Purpose & Scope
This skill enables an AI agent to trade tokens on Impossible Finance DEX (BSC mainnet). Impossible Finance V3 Swap is interface-compatible with Uniswap V2 but includes modifications for higher capital efficiency trades (lower slippage for supported pairs, especially stablecoins).
It covers:
- Wallet creation — Generate a BSC keypair and store it locally for transaction signing.
- Token discovery — Resolve any BEP-20 token by contract address, check pair existence and liquidity.
- Swaps — Execute token swaps through Impossible Finance V3 Router with slippage protection.
- Balance checks — Query native BNB and BEP-20 token balances.
- Top-ups — Provide the agent's BSC address so the user can fund it.
What This Skill Does NOT Do
- It does not manage ClawChain agent registration. For that, see the
clawchainskill (skill.mdorcurl_skills.md). - It does not provide investment advice or execute trades without user confirmation.
- It does not access any files outside of
~/.config/impossible_agent/and optionally~/.config/clawchain/credentials.json(read-only, for EVM key registration only).
Transparency: Files Accessed
| File | Access | Purpose |
|---|---|---|
~/.config/impossible_agent/wallet.json | Read/Write (created once) | Stores the agent's BSC private key and address for signing transactions |
~/.config/clawchain/credentials.json | Read-only (optional) | Used only if registering BSC public key on ClawChain for EVM event tracking |
Transparency: Network Calls
| Endpoint | Purpose |
|---|---|
BSC RPC (BSC_RPC_URL) | Read blockchain state (balances, pair info) and submit signed transactions |
| Impossible Finance Router/Factory contracts | On-chain calls to discover pairs, get quotes, execute swaps |
Configuration (BSC Mainnet)
Set these environment variables before using the skill. All have sensible defaults for BSC mainnet:
export BSC_RPC_URL="https://bsc-dataseed1.binance.org"
export BSC_CHAIN_ID=56
# Impossible Finance V3 (BSC mainnet)
export IF_ROUTER="0xCCF4881b849d94C15c98567Ba71b08eD829ABA33"
export IF_FACTORY="0xBf9D97eAF551877E4710d8E9d0519F79E03E5E69"
export WBNB="0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"
Block explorer: https://bscscan.com
Impossible Finance Swap UI: https://app.impossible.finance/swap
Prerequisites
This skill requires Node.js 18+ and the ethers npm package (v6):
npm install ethers
# or: pnpm add ethers
1. Wallet Setup — Create Wallet and Save Keys
The agent needs a local wallet file containing a private key and public address so it can sign transactions. This file is created once during initial setup and reused for all subsequent operations.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-kj-script-impossible-finance-skill": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
bsc-pancakeswap
BSC (Binance Smart Chain) trading on PancakeSwap — wallet creation, token swaps, pair discovery, and balance management.
clawchain
The on-chain social network for AI agents on Chromia blockchain — posting, commenting, voting, and memory via Chromia CLI.
clawchain
The on-chain social network for AI agents on Chromia blockchain — posting, commenting, voting, and memory via curl and local helper scripts.
colorpool
ColorPool DEX — Chromia's decentralized exchange for token swaps, liquidity pools, and balance management.