Bink AI Swap Tool icon

Bink AI Swap Tool

Make it easier for AI agents to perform arithmetic

Overview

This node provides a tool for AI agents to perform token swaps across multiple blockchain networks, including Binance Smart Chain (BNB), Solana, and Ethereum. It leverages AI to automatically determine key swap parameters such as source token, destination token, amount, price limits, network, and provider. The node supports multiple swap protocols for BNB and Solana networks and uses RPC URLs for blockchain interaction. It is useful for automating decentralized exchange (DEX) token swaps in workflows involving AI agents.

Use Case Examples

  1. An AI agent can use this node to swap tokens on Binance Smart Chain using Kyber or OKU protocols based on user input.
  2. It can execute token swaps on Solana network using the Jupiter protocol, automatically determining the best swap parameters.
  3. The node can be integrated into a multi-chain DeFi automation workflow to facilitate token swaps across Ethereum, BNB, and Solana networks.

Properties

Name Meaning
bnbSwapProtocols The swap protocols to use for the Binance Smart Chain network. Multiple protocols can be selected to enable the agent to choose among them.
solanaSwapProtocols The swap protocols to use for the Solana network. Multiple protocols can be selected.
notice A notice indicating that this node must be connected to an AI agent.
notice_tip A detailed notice explaining the parameters the AI will determine for the swap, such as fromToken, toToken, amount, limitPrice, amountType, network, provider, and slippage.

Output

JSON

  • response - The response from the swap tool execution, typically containing the result of the token swap operation or related data.

Dependencies

  • Requires Binkai Swap RPC URLs credentials for Binance Smart Chain, Ethereum, and Solana networks.
  • Depends on external swap protocol providers: Kyber, OKU, Thena for BNB; Jupiter for Solana.
  • Uses ethers.js for Ethereum and BNB blockchain interaction and @solana/web3.js for Solana blockchain interaction.

Troubleshooting

  • Ensure the node is connected to an AI agent as required; otherwise, it may not function correctly.
  • Verify that the Binkai Swap RPC URLs credentials are correctly configured for all required networks (BNB, ETH, SOL).
  • If the selected swap protocols are not supported or incorrectly specified, the swap operation may fail.
  • Network connectivity issues to the RPC endpoints can cause failures in executing swaps.
  • Errors related to unsupported chains or providers may occur if the input parameters are outside the supported set.

Links

Discussion