en un clic
base-uniswap
Swap tokens and manage liquidity on Uniswap v3 (Base mainnet) — Universal Router for swaps, NonfungiblePositionManager for v3 positions.
Menu
Swap tokens and manage liquidity on Uniswap v3 (Base mainnet) — Universal Router for swaps, NonfungiblePositionManager for v3 positions.
Travel Agent — book AND cancel real hotels and stays end to end. Use when the user wants to BOOK or RESERVE a hotel/stay (not just look one up): "book me a hotel in Lisbon", "reserve that room"; or to CANCEL / look up a booking they made through you: "cancel my hotel", "what's my booking". Discovery is free; booking spends real USDC and always requires the user's explicit confirmation; cancelling requires a code Travala emails to the booking address. Hotels and stays only (no flights). Routes payment through the platform's proven x402 rail — never invent payment logic, never sign a transfer yourself.
Your economic toolbelt. Use when the user mentions earning, selling, charging, invoicing, paying, spending, x402, stripe, reputation, agent economy, offerings, marketplace, transactions, or asks "can you make money" / "how do I earn". Uses open standards (x402, Stripe MCP, AP2, ERC-8004) — never invent payment logic; always use the official tools listed below.
Extend or edit an EXISTING video the user already has (lengthen/continue a clip, multi-shot stitch of existing footage, audio for a video they already made). NOT for new videos or images — for any NEW video, clip, animation, or image use the higgsfield-cloud skill, and never route here as a fallback when higgsfield-cloud is blocked.
Swap tokens, provide liquidity, and stake on Aerodrome (Base mainnet) — Base's leading DEX, Velodrome v2 fork with stable + volatile pools.
Supply, borrow, and manage positions on Moonwell (Base mainnet) — a Compound v2-style money market with mUSDC, mWETH, mcbETH, mcbBTC.
Discover and trade Virtuals Protocol agent tokens on Base — recent launches, bonding-curve mechanics, $INSTACLAW.
| name | base-uniswap |
| description | Swap tokens and manage liquidity on Uniswap v3 (Base mainnet) — Universal Router for swaps, NonfungiblePositionManager for v3 positions. |
Use this skill when: the user wants to swap tokens on Base via Uniswap, get a Uniswap price quote for comparison against Aerodrome, or manage Uniswap v3 concentrated-liquidity positions.
Your Bankr wallet is an EIP-7702-delegated smart account that executes via ERC-4337 UserOperations. This has one practical consequence for Uniswap routing on Base: anything that tries to send native ETH back to your wallet via transfer() will revert.
What this rules out, even if it looks like a normal swap:
IWETH9.withdraw() (selector 0x2e1a7d4d) — the canonical WETH-to-native-ETH unwrap. Reverts with simulation_reverted because WETH9 uses address.transfer(wad) which forwards 2300 gas; the wallet's receive() needs more.UNWRAP_WETH9 command (0x0c) — invokes the same WETH9.withdraw() under the hood. Same revert.What works:
value > 0). The EVM runs the wallet's receive() with the full transaction gas, not the 2300-gas stipend, so it succeeds. It's only the contract-mediated transfer() / send() pattern (2300 gas) that fails.When the user asks "swap X for ETH" or "get me some ETH":
If they truly need native ETH (e.g., to bridge to another chain that doesn't recognize WETH): the workaround is to swap to USDC, transfer USDC to a self-custodied wallet on the destination side, and convert there. Don't promise an unwrap inside the agent's wallet — it won't work.
0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD0x2626664c2603336E57B271c5C0b26F421741e4810x3d4e44Eb1374240CE5F1B871ab261CD16335B76a0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f10x33128a8fC17869897dcE68Ed026d694621f6FDfD0x42000000000000000000000000000000000000060x833589fCD6eDb6E08f4c7C32D4f71b54bdA029131. Quote a single-pool exact-input swap (QuoterV2):
QUOTER="0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a"
TOKEN_IN="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" # USDC
TOKEN_OUT="0x4200000000000000000000000000000000000006" # WETH
FEE=500 # 0.05% — typical for stable-volatile pairs. Try 3000 (0.3%) for less liquid.
AMT_IN=$((50 * 10**6)) # 50 USDC
# Returns (amountOut, sqrtPriceX96After, initializedTicksCrossed, gasEstimate)
cast call --rpc-url $BASE_RPC_URL $QUOTER \
"quoteExactInputSingle((address,address,uint256,uint24,uint160))(uint256,uint160,uint32,uint256)" \
"($TOKEN_IN,$TOKEN_OUT,$AMT_IN,$FEE,0)"
For multi-hop, use quoteExactInput(bytes,uint256) with a packed path.
2. Pool data subgraph:
curl -sS https://api.studio.thegraph.com/query/<id>/uniswap-v3-base/<v> \
-H 'content-type: application/json' \
--data-raw '{"query":"{pools(first:10,orderBy:totalValueLockedUSD,orderDirection:desc){id token0{symbol}token1{symbol}feeTier totalValueLockedUSD volumeUSD}}"}'
3. Per-fee-tier quote sweep — pick the best:
for FEE in 100 500 3000 10000; do
echo "fee=$FEE:"
cast call --rpc-url $BASE_RPC_URL $QUOTER \
"quoteExactInputSingle((address,address,uint256,uint24,uint160))(uint256,uint160,uint32,uint256)" \
"($TOKEN_IN,$TOKEN_OUT,$AMT_IN,$FEE,0)" 2>&1 | head -1
done
SwapRouter02 (simpler than Universal Router for single-pool swaps):
ROUTER="0x2626664c2603336E57B271c5C0b26F421741e481"
DEADLINE=$(($(date +%s) + 600))
# minOut = expectedOut * (1 - slippage). 0.5% slippage:
MIN_OUT=$((EXPECTED_OUT * 9950 / 10000))
cast calldata "exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))" \
"($TOKEN_IN,$TOKEN_OUT,$FEE,$WALLET,$AMT_IN,$MIN_OUT,0)"
Universal Router is more flexible (multi-hop, permit2, mixed protocols) but the calldata is opaque — encode via a viem/ethers script if you need it. For 95% of single-pool swaps, SwapRouter02 is simpler.
USDC="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
ROUTER="0x2626664c2603336E57B271c5C0b26F421741e481"
# 1. Approve router to pull USDC
bankr send --to $USDC \
--data $(cast calldata "approve(address,uint256)" $ROUTER $AMT_IN)
# 2. Execute swap
bankr send --to $ROUTER --data $SWAP_CALLDATA
Note: bankr swap natively supports common Base pairs and will use the better of Uniswap/Aerodrome under the hood. Prefer it for routine swaps. Use this skill explicitly when the user asks for Uniswap specifically, when comparing quotes, or for less-liquid pairs.
ALWAYS quote both Uniswap AND Aerodrome before executing a non-trivial swap. Pseudocode:
quote_uni = quote_uniswap(token_in, token_out, amount_in)
quote_aero = quote_aerodrome(token_in, token_out, amount_in)
chosen = max(quote_uni, quote_aero) # higher output wins
report_to_user("Best route: <DEX>, output: X tokens, price impact: Y%")
execute_via_chosen_router()
This is the difference between "agent did a swap" and "agent did a good swap." Always quote both.
bankr swapbase-morpho / base-moonwellbase-avantis"swap 100 USDC for the most ETH you can get"
base-aerodrome skill) → compare