swap

A skill for converting tokens on Base and Ethereum mainnet through Uniswap V3, including USDC, ETH or WETH, and OBOL. It obtains a current quote and requires user confirmation before sending a swap.

In plain words
What is it for?
Use it to swap tokens, obtain ETH for gas, consolidate USDC or OBOL revenue, or rebalance the agent treasury.
Why use it?
It helps convert earnings into the token needed for spending, such as ETH for transaction fees, while setting limits before a trade.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/obolnetwork/obol-stack/swap
Any agent
npx skills add ObolNetwork/obol-stack --skill swap
Clone the repo
git clone --depth 1 https://github.com/ObolNetwork/obol-stack

Made for: Claude Code, Codex.

Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,293 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00101 $0.02293
Opus 5 $0.00051 $0.01146
Sonnet 5 $0.00020 $0.00459
Haiku 4.5 $0.00010 $0.00229

Measured 2d ago against content hash 3469d05d849d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

swap scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

internal/embed/skills/swap/SKILL.md · 150 lines

How it starts

The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Swap

Convert tokens the agent actually earns and spends. The x402 rails pay you in USDC on Base or OBOL on Ethereum mainnet; on-chain writes need ETH for gas (on mainnet — Base writes cost fractions of a cent). This skill covers the treasury moves between them using Uniswap V3, with quotes from QuoterV2 and execution through the agent's remote-signer (ethereum-local-wallet skill).

Iron rules — no exceptions:

  1. Quote before every swap. Never send a swap without a fresh QuoterV2 quote and an amountOutMinimum derived from it.
  2. Confirm with the user before sending any swap, stating: amount in, expected amount out, minimum out, fee tier, chain. Never swap autonomously.
  3. Never swap more than the immediate need (e.g. gas top-ups: swap for ~2–4 weeks of expected gas, not the whole balance).
  4. Addresses below were verified on-chain (eth_getCode) on 2026-07-06 (Arbitrum addresses verified 2026-07-10). Re-verify with rpc.sh code <addr> if anything reverts unexpectedly.

Verified addresses

Contract Base (8453) Ethereum mainnet (1) Arbitrum (42161)
Uniswap V3 SwapRouter02 0x2626664c2603336E57B271c5C0b26F421741e481 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45
Uniswap V3 QuoterV2 0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a 0x61fFE014bA17989E743c5F6cB21bF9697530B21e 0x61fFE014bA17989E743c5F6cB21bF9697530B21e
USDC (6 decimals) 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 0xaf88d065e77c8cC2239327C5EDb3A432268e5831 (native)
WETH (18 decimals) 0x4200000000000000000000000000000000000006 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1
OBOL (18 decimals) — (Base-Sepolia only, no mainnet-Base deploy) 0x0B010000b7624eb9B3DfBC279673C76E9D29D5F7 — (no Arbitrum deploy)

Read the full file on GitHub · 150 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 150 lines · 101 tokens per session scan A 3469d05d849d

Subscribe to this mod's changes

swap is a skill published in the GitHub repository ObolNetwork/obol-stack (11 stars, last pushed 3d ago), licensed Apache-2.0. It adds 101 tokens to every session and 2,293 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.