Skip to content
Automation
Skill

/trading-evm

Trade tokens on EVM chains - Uniswap V3, 1inch on Ethereum, Arbitrum, Optimism, Base, Polygon

From plugin
cloddsbot
651120 skills
Install
$ npx -y skills add alsk1992/CloddsBot --skill trading-evm --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/trading-evm

Context preview

The summary Claude sees to decide when to auto-load this skill.

Trade tokens on EVM chains - Uniswap V3, 1inch on Ethereum, Arbitrum, Optimism, Base, Polygon

SKILL.md

trading-evm.SKILL.md
name: trading-evm
description: "Trade tokens on EVM chains - Uniswap V3, 1inch on Ethereum, Arbitrum, Optimism, Base, Polygon"
emoji: "⟠"
gates:
  envs:
    - EVM_PRIVATE_KEY

EVM DEX Trading - Complete API Reference

Trade any token on Ethereum, Arbitrum, Optimism, Base, and Polygon using Uniswap V3 and 1inch aggregator.

Required Environment Variables

EVM_PRIVATE_KEY=0x...                      # Your EVM wallet private key
ALCHEMY_API_KEY=...                        # Optional: for better RPC
ONEINCH_API_KEY=...                        # Optional: for 1inch API

---

Supported Chains

| Chain | Chain ID | DEXes | MEV Protection | |-------|----------|-------|----------------| | Ethereum | 1 | Uniswap V3, 1inch | Flashbots Protect | | Arbitrum | 42161 | Uniswap V3, 1inch | Sequencer | | Optimism | 10 | Uniswap V3, 1inch | Sequencer | | Base | 8453 | Uniswap V3, 1inch | Sequencer | | Polygon | 137 | Uniswap V3, 1inch | Standard |

---

Chat Commands

Swaps

/swap eth <amount> <from> to <to>           # Swap on Ethereum
/swap arb <amount> <from> to <to>           # Swap on Arbitrum
/swap op <amount> <from> to <to>            # Swap on Optimism
/swap base <amount> <from> to <to>          # Swap on Base
/swap matic <amount> <from> to <to>         # Swap on Polygon

# Examples:
/swap eth 1 ETH to USDC                     # Swap 1 ETH to USDC on Ethereum
/swap arb 100 USDC to ARB                   # Swap 100 USDC to ARB on Arbitrum
/swap base 0.5 ETH to DEGEN                 # Swap 0.5 ETH to DEGEN on Base

Quotes

/quote eth <amount> <from> to <to>          # Get quote without executing
/quote arb 1 ETH to USDC                    # Quote on Arbitrum

Compare Routes

/compare <chain> <amount> <from> to <to>    # Compare Uniswap vs 1inch
/compare eth 1 ETH to USDC                  # Compare routes on Ethereum

Balances

/balance eth                                # Check ETH and token balances
/balance arb                                # Check Arbitrum balances
/balance base <token>                       # Check specific token on Base

---

TypeScript API Reference

Uniswap V3

import {
  executeUniswapSwap,
  getUniswapQuote,
  resolveToken,
  getTokenInfo,
  getEvmBalance
} from 'clodds/evm/uniswap';

// Get quote
const quote = await getUniswapQuote({
  chain: 'ethereum',
  tokenIn: 'ETH',
  tokenOut: 'USDC',
  amountIn: '1000000000000000000',  // 1 ETH in wei
  slippageTolerance: 0.5,
});

console.log(`Expected output: ${quote.amountOut}`);
console.log(`Price impact: ${quote.priceImpact}%`);
console.log(`Route: ${quote.route.join(' → ')}`);

// Execute swap
const result = await executeUniswapSwap({
  chain: 'ethereum',
  tokenIn: 'ETH',
  tokenOut: 'USDC',
  amountIn: '1000000000000000000',
  slippageTolerance: 0.5,
  deadline: 300,  // 5 minutes
});

console.log(`TX: ${result.transactionHash}`);
console.log(`Amount out: ${result.amountOut}`);

// Resolve token symbol to address
const usdcAddress = resolveToken('USDC', 'ethereum');

// Get token info
const tokenInfo = await getTokenInfo('ethereum', usdcAddress);
console.log(`${tokenInfo.symbol}: ${tokenInfo.decimals} decimals`);

// Check balance
const balance = await getEvmBalance('ethereum', walletAddress, 'USDC');

1inch Aggregator

import {
  executeOneInchSwap,
  getOneInchQuote,
  getOneInchProtocols,
  compareDexRoutes
} from 'clodds/evm/oneinch';

// Get quote from 1inch
const quote = await getOneInchQuote({
  chain: 'ethereum',
  fromToken: 'ETH',
  toToken: 'USDC',
  amount: '1000000000000000000',
});

console.log(`Expected output: ${quote.toAmount}`);
console.log(`Estimated gas: ${quote.estimatedGas}`);
console.log(`Protocols used: ${quote.protocols.join(', ')}`);

// Execute swap via 1inch
const result = await executeOneInchSwap({
  chain: 'ethereum',
  fromToken: 'ETH',
  toToken: 'USDC',
  amount: '1000000000000000000',
  slippage: 0.5,
});

// Get available protocols
const protocols = await getOneInchProtocols('ethereum');
// ['UNISWAP_V3', 'SUSHISWAP', 'CURVE', ...]

// Compare routes between Uniswap and 1inch
const comparison = await compareDexRoutes({
  chain: 'ethereum',
  tokenIn: 'ETH',
  tokenOut: 'USDC',
  amountIn: '1000000000000000000',
});

console.log(`Uniswap: ${comparison.uniswap.amountOut}`);
console.log(`1inch: ${comparison.oneinch.amountOut}`);
console.log(`Best: ${comparison.best}`);

---

Chain-Specific Examples

Ethereum

// Swap ETH → USDC on Ethereum with MEV protection
const result = await executeUniswapSwap({
  chain: 'ethereum',
  tokenIn: 'ETH',
  tokenOut: 'USDC',
  amountIn: '1000000000000000000',
  useMevProtection: true,  // Uses Flashbots
});

Arbitrum

// Swap on Arbitrum (lower gas)
const result = await executeOneInchSwap({
  chain: 'arbitrum',
  fromToken: 'ETH',
  toToken: 'ARB',
  amount: '500000000000000000',  // 0.5 ETH
  slippage: 1,
});

Base

// Swap on Base
const result = await executeUniswapSwap({
  chain: 'base',
  tokenIn: 'ETH',
  tokenOut: 'DEGEN',
  amountIn: '100000000000000000',  // 0.1 ETH
  slippageTolerance: 2,  // Higher slippage for meme coins
});

Optimism

// Swap on Optimism
const result = await executeOneInchSwap({
  chain: 'optimism',
  fromToken: 'USDC',
  toToken: 'OP',
  amount: '100000000',  // 100 USDC (6 decimals)
  slippage: 0.5,
});

Polygon

// Swap on Polygon
const result = await executeUniswapSwap({
  chain: 'polygon',
  tokenIn: 'MATIC',
  tokenOut: 'USDC',
  amountIn: '10000000000000000000',  // 10 MATIC
  slippageTolerance: 0.5,
});

---

Common Tokens

Ethereum

| Symbol | Address | |--------|---------| | ETH | Native | | USDC | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | | USDT | 0xdAC17F958D2ee523a2206206994597C13D831ec7 | | WETH | 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 | | DAI | 0x6B175474E89094C44Da98b9

Read more
Ships withcloddsbot

Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes instantly, manages risk while you sleep. Agent commerce protocol for machine-to-machine payments. Self-hosted. Built on Claude.

Get the whole plugin
Stats
651
Stars
139
Forks
Maintained
Maintenance
TypeScript
Language
MIT
License
1mo ago
Last commit
6mo ago
Created

Repo: alsk1992/CloddsBot