Skip to content
Skip to content

EVM Trading

Your Balchemy bots trade EVM tokens on Base through the 0x aggregator, with automatic security checks, simulation, and social research tools available before every trade.

What is this?

EVM trading in Balchemy routes swaps on Base (chain ID 8453) through the 0x Protocol exchange aggregator. 0x sources liquidity from Uniswap V2, Uniswap V3, Curve, and other Base DEXes to find the optimal execution route. Your bot can look up tokens, get quotes, run security checks, explore launchpad data, and execute swaps — either from natural language chat or from automated strategy rules.

The same Rust trading engine that powers Solana trading handles EVM execution: it enforces risk policies, signs transactions using your custodial wallet, and reports results back to the dashboard in real time.

Prerequisites

  • A custodial EVM wallet created and set as primary on Base (see Wallet Management)
  • The custodial wallet funded with ETH (for gas) and your input token (typically ETH or USDC on Base)
  • A bot with the trade scope enabled

Warning: EVM trading is only available with custodial wallets. Delegate (external) wallets cannot sign transactions automatically. To execute EVM trades through Balchemy, you need a custodial wallet.


Two ways to trigger an EVM trade

1. Natural language via chat

Open your bot's chat at /studio/chat/[botId] and describe the trade in plain English:

  • "Buy $200 worth of USDC/BRETT on Base"
  • "Swap 0.1 ETH for cbBTC on Base"
  • "Sell my entire DEGEN position"

Your bot resolves the token contract addresses, fetches a 0x quote, runs a pre-trade report, and presents a summary before executing. Set autoApprove: true in the bot's default order profile to skip the confirmation step.

2. Strategy automation

The Automation tab (/studio/bots/[botId]/automation) lets you create rules that trigger EVM trades automatically on price movements, technical conditions, or scheduled DCA intervals. The full pipeline — quote → security check → policy check → execute — runs automatically when a rule fires.


Fee structure

Balchemy charges a platform fee on every EVM swap using a pre-swap deduction followed by a distributeFee() call:

Account typeFee rate
Standard1.0% of sell amount
Enterprise (Bot.policyMode = enterprise)0.5% of sell amount

The fee deduction happens before the 0x quote is obtained, so the 0x aggregator routes the post-fee amount. The fee is distributed to the Balchemy fee collector contract and is visible in the transaction trace. 0x Protocol also charges a separate protocol fee, which is handled automatically by the engine.


Base as the primary EVM chain

Balchemy's EVM trading currently supports Base (Ethereum L2, chain ID 8453) as the primary chain. All requireBaseChainId checks in the engine enforce this. Passing any chain ID other than 8453 will return an error.

Support for Ethereum mainnet, Arbitrum, and Optimism is under consideration for a future release.


Pre-trade security checks

Before any EVM swap is submitted, the trading engine runs a pre-trade report using two security providers.

GoPlus Token Security (trading_security_goplus_token_security)

GoPlus Labs provides comprehensive token security scanning. It returns signals including:

  • Is honeypot — Can the token be sold after purchase?
  • Buy/sell tax — What percentage is deducted on buy and sell transactions?
  • Proxy contract — Is the token contract upgradeable by the deployer?
  • Owner concentration — How much do top wallets hold?
  • Trading cooldown — Does the contract enforce a cooldown period between trades?
  • Anti-whale mechanism — Does the contract limit maximum wallet size?

Honeypot Check (trading_security_honeypot_check)

Honeypot.is provides a fast, independent confirmation of whether a token's transfer function will revert on a sell attempt. A honeypot token lets you buy but never sell. This check defaults to chain ID 8453 (Base) when no chainId is specified.

EVM Pre-Trade Report (trading_evm_pretrade_report)

The combined pre-trade report runs both GoPlus and Honeypot in parallel, adds a 0x quote, and returns a structured checklist. Your bot presents this as a readable summary before asking for trade confirmation.


Token metadata and resolution

Before trading an unfamiliar token, your bot can resolve its contract details:

Tool nameWhat it returns
trading_evm_token_resolveSymbol, name, decimals for a contract address on Base
trading_evm_contract_risk_liteMinimal risk signals (proxy status, owner) for a contract
trading_evm_chain_block_numberLatest block number (useful for timing DEX pool queries)

DEX pool tools

Your bot can query on-chain DEX state directly using the EVM DEX tool family. These are useful for strategy automation and market research, not for executing trades:

Tool nameWhat it does
trading_evm_dex_pool_lookupFind a UniswapV2/V3 pool address for a token pair
trading_evm_dex_pool_stateGet current reserves/tick for a pool
trading_evm_dex_pool_swapsFetch recent swap events from a pool
trading_evm_dex_pool_mintsFetch liquidity add events from a pool
trading_evm_dex_pool_burnsFetch liquidity remove events from a pool
trading_evm_dex_pool_syncsFetch UniswapV2 reserve sync events
trading_evm_dex_uniswap_v2_pairs_createdFind new UniswapV2 pairs created in a block range
trading_evm_dex_uniswap_v3_pools_createdFind new UniswapV3 pools created in a block range

Launchpad tools

Balchemy integrates with four Base-native launchpad platforms. Your bot can use these to discover newly launched tokens before they appear on major aggregators:

Pump.fun (Solana-style, Base variant)

Tool nameWhat it does
trading_launchpad_pumpfun_search_coinsSearch Pump.fun coins by keyword
trading_launchpad_pumpfun_trending_coinsBrowse the Pump.fun trending feed

Clanker (Farcaster-native token factory)

Tool nameWhat it does
trading_launchpad_clanker_tokensBrowse all Clanker-deployed tokens with optional filters
trading_launchpad_clanker_creator_searchFind creators by username or address
trading_launchpad_clanker_token_by_addressGet details for a specific Clanker token
trading_launchpad_clanker_tokens_by_creatorList all tokens deployed by one creator

Zora (NFT and social tokens)

Tool nameWhat it does
trading_launchpad_zora_coinGet details for a Zora coin by contract address
trading_launchpad_zora_exploreBrowse Zora coins by type (trending, new, top)

BaseMeme (meme token factory on Base)

Tool nameWhat it does
trading_launchpad_basememe_factory_logsFetch factory deployment events for a block range

Tip: Launchpad tools are ideal for a bot strategy that specifically scouts newly deployed tokens. Combine them with GoPlus security checks before trading any newly discovered token — new launches are a common vector for honeypots and rug pulls.


Market data tools

Your bot can pull multi-source market data to inform EVM trading decisions:

SourceTools available
DexScreenerSearch pairs, token pairs by address, pair details, bulk token lookup, boosted token lists
GeckoTerminalSearch pools, trending pools, pool details, OHLCV, recent trades
CoinGeckoOn-chain trending pools by network
DefiLlamaCurrent prices by coin ID

Social research (Neynar / Farcaster)

Your bot can query Farcaster social data via the social tool family. This is relevant for EVM trading because many Base tokens are created by or discussed within the Farcaster community. Use social research to check if a project's creator has a credible Farcaster presence before committing to a trade.


Simulation tools (Tenderly)

Before executing a complex EVM transaction, your bot can simulate it using Tenderly:

Tool nameWhat it returns
trading_simulation_tenderly_simulate_txFull simulation result including state changes and logs
trading_simulation_evm_gas_estimategasUsed, gasLimit, and success status from a simulated transaction

Gas estimation is particularly useful for DeFi strategies involving multiple hops or complex contract interactions where gas costs can vary significantly.


Example trade flow: buying BRETT with 0.05 ETH

Here is what happens end-to-end when you type "buy 0.05 ETH of BRETT on Base" in chat:

  1. Token resolution — Your bot calls trading_evm_token_resolve to confirm BRETT's contract address on Base.
  2. Pre-trade reporttrading_evm_pretrade_report runs GoPlus and Honeypot checks on the BRETT contract in parallel.
  3. Quotetrading_evm_quote fetches the 0x route, expected BRETT output, gas estimate, and price impact.
  4. Policy check — The engine validates the trade against your max drawdown, daily loss limit, and position size settings.
  5. Summary in chat — Your bot presents the quote, platform fee, slippage, and the GoPlus security summary.
  6. Confirmation — You confirm the trade (or it auto-executes if autoApprove is enabled).
  7. Executiontrading_evm_swap is called with submit: true. The engine signs the transaction with your custodial EVM wallet and broadcasts it to Base.
  8. On-chain verification — The engine monitors for transaction confirmation on Base.
  9. Order update — The order moves to filled status. The Trading Dashboard and Trade History update automatically.

Tips and warnings

Tip: Always run a pre-trade report before buying a newly launched token on Base. The honeypot check takes under 2 seconds and can save you from a complete loss on a scam token.

Tip: Use trading_evm_dex_pool_lookup to find the relevant liquidity pool before checking pool state. Pool addresses are needed for the state and events tools.

Tip: For time-sensitive Base transactions, use trading_simulation_evm_gas_estimate to estimate gas before submitting. Base gas prices are generally low, but complex multi-hop swaps can use significantly more gas than simple token transfers.

Warning: GoPlus and Honeypot checks analyze the contract at a point in time. A contract can be modified (if it is upgradeable/proxy) after the check. Always verify the is_proxy flag in the GoPlus result. If it is true, treat the security check as conditional.

Warning: EVM transactions broadcast to Base cannot be reversed. Once the engine submits the transaction, it will execute (or fail on-chain) within the gas price and nonce constraints. Confirm the quote and security report before proceeding.


Common issues

"No default EVM wallet configured" error. You have not yet created a custodial EVM wallet on Base, or no wallet is set as primary. Go to /studio/wallets, create a custodial EVM wallet, and ensure it is marked as primary.

"Insufficient funds" when placing an EVM trade. Your custodial Base wallet needs ETH to cover gas and the input token for the swap. Fund it by sending ETH and/or USDC to the wallet address shown on the Wallets page.

GoPlus reports "is_honeypot: true". Do not trade this token. Honeypot tokens are designed to let you buy but prevent you from selling. The pre-trade check will block execution by default. If you believe the result is a false positive, verify the token's sell behavior manually on a test network before proceeding.

Quote shows very high price impact (greater than 5%). The liquidity pool for this token is too shallow for your trade size. Reduce the trade amount, split the order into smaller trades over time, or wait for more liquidity to enter the pool.

Trade submitted but stuck at "submitted" for more than 5 minutes. The transaction may be stuck due to low gas price or Base network congestion. Check the transaction on BaseScan using the order ID in Trade History. If the transaction was not mined, it will eventually expire and the order will be marked as failed.

Token address not recognized by trading_evm_token_resolve. The contract may not exist on Base (chain ID 8453), or it may be too newly deployed to appear in the engine's lookup index. Double-check the contract address on BaseScan before trading.


Connection lost. Retrying...