Uniswap
Provide liquidity on Uniswap v3 and v4 from your agent's wallet. Find pools, open a position in a preset price range, add to it, collect fees and close it.
Your agent can provide liquidity on Uniswap. It puts two tokens into a pool, inside a price range, and earns a share of the trading fees while the price stays in that range. Each position is an NFT held by the agent's wallet.
Category: Earn · Chains: Base, Arbitrum, Ethereum, Robinhood Chain · Protocol page: thirdfy.com/protocols/uniswap
Find a pool
The agent ranks live pools by one of three strategies:
| Strategy | Ranks by | Suggested range |
|---|---|---|
conservative | Deepest pools first (at least $1M in the pool) | Full range for a stablecoin pair, ±25% otherwise |
balanced (default) | Deepest pools first (at least $100k) | ±10% |
max_fees | Fees earned per dollar in the pool, from the last 24 hours of volume | ±10% |
Pool data on Base, Arbitrum and Ethereum comes from DexScreener and DefiLlama and is best effort; the pool's on-chain state is what the agent trades on.
Open a position
- Pools you can open today: the WETH/stablecoin pools at the 0.30% fee: WETH/USDC on Base (v3 and v4), Arbitrum (v3) and Ethereum (v3), and WETH/USDG on Robinhood Chain (v4). Other pools can be read and ranked, but opening a position in them is refused (
UNISWAP_POOL_NOT_ALLOWLISTED). - Plain v4 pools only. A v4 pool with a hook or a dynamic fee is read only.
- You give one amount. Say how much of the stablecoin (or of WETH) to put in. The agent works out the other token's amount for the range, so the wallet must already hold both tokens. It doesn't swap for you: if one is missing, the open is refused.
- Ranges:
| Range | What it means |
|---|---|
pct_10 (default) | ±10% around the current price |
pct_25 | ±25% around the current price |
full | Every price. Earns less per dollar, never goes out of range |
usdc_only | Just below the current price, holding only the stablecoin until the price falls into it |
- A tighter range earns more fees per dollar while the price is inside it, and nothing when the price leaves it. Liquidity providing can end with less value than holding the two tokens.
- Slippage defaults to 0.5%.
Manage it
- Close takes out all the liquidity and the fees, and keeps the empty NFT. Burn does the same and then burns the NFT.
- A position is named by its token ID, its version (v3 or v4) and its chain: the same ID can exist on both versions.
- Fees shown for a v4 position are an estimate until they are collected. For a v3 position the agent shows the fees Uniswap has recorded so far.
- The tokens and the position always stay in the agent's own wallet.
Wallets
Liquidity runs on wallets Thirdfy manages. On a wallet you control with your own signed policy, Uniswap liquidity isn't available yet: it is refused before anything is signed. The capped Uniswap swap below works on both.
Capped Uniswap swaps
Separate from liquidity, the agent can swap on Uniswap v3 with a cap of $500 per swap, on Base (USDC, WETH, cbBTC) and Robinhood Chain (WETH, USDG). It is one swap on a listed deep pool, with the output to the agent's wallet and an approval for the exact amount. On a wallet you control, a plain swap on these chains runs this way. See Spot trading.
For developers
Catalog provider: uniswap
| Action | Kind | Params |
|---|---|---|
get_uniswap_pools | read | Optional chainId, version, strategy (conservative, balanced, max_fees), limit (up to 50, default 25), minTvlUsd, tokenAddress |
get_uniswap_pool_state | read | version, and poolAddress (v3) or poolId (v4) |
get_uniswap_positions | read | Optional chainId, version, walletAddress |
get_uniswap_position | read | version, tokenId |
get_uniswap_fees | read | version, tokenId |
mint_uniswap_position | write | amount, optional amountToken (stable, the default, or weth), version (default v3), poolAddress or poolId (default: the chain's WETH/stable 0.30% pool), rangePreset, slippageBps (default 50) |
increase_uniswap_liquidity | write | tokenId, amount, optional amountToken, slippageBps |
decrease_uniswap_liquidity | write | tokenId, optional liquidityPercentage (0 to 1, default 1), slippageBps |
collect_uniswap_fees | write | tokenId |
close_uniswap_position | write | tokenId. Removes everything and collects; keeps the NFT |
burn_uniswap_position | write | tokenId. Like close, then burns the NFT |
Every write also takes chainId and version. Refusals before anything is signed include UNISWAP_POOL_NOT_ALLOWLISTED, UNISWAP_HOOK_NOT_ALLOWED, UNISWAP_POSITION_NOT_OWNED, UNISWAP_MISSING_TOKEN and UNISWAP_POOL_NOT_FOUND.