Builder intent
let users swap tokens inside my app
Uniswap supplies the liquidity and routing for in-app swaps, a price oracle like Pyth backs slippage and quote sanity checks, and a low-cost L2 such as Base keeps per-swap gas affordable.
Also available as JSON · Markdown
Recommended stack
supporting_protocol94
Uniswap
AMM with the Universal Router for routing swaps, plus SDKs for quoting and building trades.
oracle_and_price_data82
Pyth Network
Reference prices for slippage limits and showing fair quotes to users.
Risks
- Always set an explicit minimum-output / slippage bound; unprotected swaps are an MEV target.
- Quote and execution prices can diverge; refresh quotes close to submission.
Next steps
- Integrate the Uniswap SDK to fetch quotes and build swap calldata.
- Add slippage protection and a reference price check before submitting.
- Test on the chosen L2's testnet, then mainnet with small amounts.
What the agent receives
The intent page exposes the same structured recommendation shape agents should use: matched intent, stack roles, readiness scores, difficulty, risks, next steps, and registry version.
agent output · application/jsonstructured
{
"intent": "I want to add onchain token swaps to my dapp",
"matched_intent": "swap-tokens-in-my-app",
"recommended_stack": [
{
"slug": "uniswap",
"name": "Uniswap",
"role": "supporting_protocol",
"readiness_score": 94,
"integration_difficulty": "medium",
"reason": "AMM with the Universal Router for routing swaps, plus SDKs for quoting and building trades."
},
{
"slug": "pyth",
"name": "Pyth Network",
"role": "oracle_and_price_data",
"readiness_score": 82,
"integration_difficulty": "medium",
"reason": "Reference prices for slippage limits and showing fair quotes to users."
},
{
"slug": "base",
"name": "Base",
"role": "settlement_or_execution",
"readiness_score": 82,
"integration_difficulty": "low",
"reason": "Low-cost L2 execution so swap gas stays affordable for consumer users."
}
],
"excluded_candidates": [],
"risks": [
"Always set an explicit minimum-output / slippage bound; unprotected swaps are an MEV target.",
"Quote and execution prices can diverge; refresh quotes close to submission."
],
"next_steps": [
"Integrate the Uniswap SDK to fetch quotes and build swap calldata.",
"Add slippage protection and a reference price check before submitting.",
"Test on the chosen L2's testnet, then mainnet with small amounts."
],
"generated_with": "composewith.eth",
"registry_version": "2026.06.10-8752c9d"
}