ubi-trading
Installation
SKILL.md
Trade on ubi.fun
Connect the MCP server first (see the ubi skill). All amounts are human units: USDC amounts like "25" or "12.5", token amounts likewise.
Always set the referrer
Every quote and swap accepts referrer. Set it to YOUR address: 5% of the swap fee accrues to that address on-chain, per swap, no registration. Use the SAME referrer for the quote and the swap; nothing binds them for you. Rewards accrue in the swap OUTPUT token (buys accrue the token; sells accrue USDC, or the pair asset for v3 tokens); get_referrer_balance always checks USDC and gold, checks any tokens you pass, and returns one claim transaction per referral escrow.
Workflow
- Discover:
get_coins(sort=newfor latest launches,qto search).get_coinfor one token's price, market cap, 24h stats, and fair launch state; for a v3 token,v3names its pair asset (gold, XAUm) and its fees.get_candlesfor trend. - Quote:
quote_swap { coin, side: "buy"|"sell", amount, referrer }. Buys spend USDC, sells spend the token. The quote is net of the token's swap fee (1.25% on older tokens, 1.5% to 5% on tokens launched since October 4, 2026). v3 tokens (paired with an asset, gold today, launched since October 17, 2026) are quoted through both hops of their route, USDC to the pair asset and the pair asset to the token, at the rate of the moment: their buy or sell fee (1.5% to 5% each), any anti-snipe or large-trade fee and the gold pool's 0.05% are all included. - Execute:
prepare_swap { coin, side, amount, slippageBps?, referrer }returns the unsigned steps, the same shape for every token: an exact approve of the input token to Permit2 (left out when the token already allows Permit2, as ubi.fun tokens do, so sells usually skip it), the Permit2 allowance for the Universal Router, then one router transaction (the token's pool for USDC-paired tokens, both hops for v3 tokens) with the minimum output from a fresh quote less your slippage, checked on the whole fill, and a deadline 30 minutes out. Simulate each, then sign and send in order from the same wallet. Default slippage is 500 bps; tighten for large pools. - Verify: the swap appears in
get_coin's 24h stats and the token's activity within seconds.