Trade Tokens
The trade-tokens skill lets an AI agent buy or sell fractionalized domain tokens across every venue Doma supports: bonding-curve launchpad, post-graduation Uniswap V3, and sellOnFail for failed launches. The skill auto-routes based on the token's on-chain state.
At a glance
Manifest URL
https://doma.xyz/.well-known/skills/trade-tokens/SKILL.md
Backing CLI
@doma-protocol/cli (doma swap …, doma token …, doma quote …)
Wallet modes
agent (Privy) and private-key
Trigger phrases
buy tokens, sell tokens, swap tokens, trade fractional, purchase fractional, bonding curve, sellOnFail, graduated, Uniswap, post-graduation, failed launch
What it does
doma swap already auto-detects the right venue. The skill wraps it with a discover → preview → confirm → execute flow:
Read the token's on-chain
statusandtradingVenueviadoma token --quiet --format json.Pick the correct venue (Launchpad / Uniswap / sellOnFail) based on the state matrix below.
Fetch a quote (
doma quote) and surface amount-out, price impact, and gas to the user.Confirm before executing.
Execute (
doma swap --yes) and report the on-chain result.
State × action matrix

This is the routing logic the skill encodes. Always check status first. A BOUGHT_OUT token can have graduatedAt set, which would otherwise mislead the agent.
status
tradingVenue
fillPercent
Buy
Sell
BOUGHT_OUT
any
n/a
refuse, already redeemed
refuse, already redeemed
FRACTIONALIZED
Launchpad
< 100%
bonding-curve buy
bonding-curve sell
FRACTIONALIZED
Launchpad
= 100%
refuse, graduation pending
refuse, graduation pending
GRADUATION_FAILED
Launchpad
n/a
refuse, launch failed
sellOnFail (fixed-rate refund)
GRADUATION_SUCCESSFUL
UniswapV3
n/a
Uniswap V3 buy
Uniswap V3 sell
Prerequisites
Node.js ≥ 20
@doma-protocol/cli≥ 0.4.0 for read-only commands; ≥ 0.5.0 foragentmodeA configured wallet (see Wallet Modes)
Sufficient input-token balance plus gas
Example prompt
After installing the skill (see Discover & Use Skills):
"Buy 10 USDC worth of
<token-name>token on Doma testnet."
(Mainnet works the same way: drop testnet from the prompt and the skill targets Doma Mainnet via your CLI config.)
The agent walks through:
Network selection (testnet, since the prompt asked for it).
State read (
doma token <token-name> --testnet --quiet --format json) → for examplestatus: GRADUATION_SUCCESSFUL,tradingVenue: UniswapV3.Quote (
doma quote USDC <token-name> 10) → expected amount-out, ~0.31% price impact, ~$0.16 gas, 0.5% slippage default.Confirmation prompt with all numbers.
Execution (
doma swap USDC <token-name> 10 --yes --quiet --slippage 50).Report
Status: Success, tx hash, block, gas used, and final received amount.
Cross-references
Doma Fractionalization: the on-chain primitives the skill operates against.
Underlying CLI commands: Commands → swap and Commands → token.
Wallet Modes: set up agent mode for hands-off swaps.
Last updated