[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-polygon-polygon-defi":3,"mdc--3d2zc0-key":37,"related-org-polygon-polygon-defi":3399,"related-repo-polygon-polygon-defi":3449},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":32,"sourceUrl":35,"mdContent":36},"polygon-defi","execute DeFi operations on Polygon network","Swap, bridge, and deposit on Polygon using the Polygon Agent CLI. Covers same-chain token swaps, cross-chain bridging, yield deposits into Aave v3 and Morpho vaults, and withdrawals from those positions. Write commands preview by default; add --broadcast (or enable `agent mode auto`) to execute.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"polygon","Polygon","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fpolygon.jpg","0xPolygon",[13,17,20,23],{"name":14,"slug":15,"type":16},"Web3","web3","tag",{"name":18,"slug":19,"type":16},"DeFi","defi",{"name":21,"slug":22,"type":16},"Trading","trading",{"name":24,"slug":25,"type":16},"Ethereum","ethereum",26,"https:\u002F\u002Fgithub.com\u002F0xPolygon\u002Fpolygon-agent-cli","2026-07-27T06:07:30.737151",null,16,[],{"repoUrl":27,"stars":26,"forks":30,"topics":33,"description":34},[],"Infrastructure for building agents on Polygon","https:\u002F\u002Fgithub.com\u002F0xPolygon\u002Fpolygon-agent-cli\u002Ftree\u002FHEAD\u002Fskills\u002Fpolygon-defi","---\nname: polygon-defi\ndescription: Swap, bridge, and deposit on Polygon using the Polygon Agent CLI. Covers same-chain token swaps, cross-chain bridging, yield deposits into Aave v3 and Morpho vaults, and withdrawals from those positions. Write commands preview by default; add --broadcast (or enable `agent mode auto`) to execute.\n---\n\n# Swap, Bridge & Deposit\n\n## Session Prerequisites\n\n**Before any DeFi operation, the wallet must be logged in.** The embedded wallet can call any contract and spend any amount it holds — there is no contract whitelist and no per-token spend limit, so no special setup is needed for deposits, swaps, or withdrawals. If the user is not logged in, log in now:\n\n```bash\nagent wallet login\n```\n\nThis opens the agentconnect login page in the browser; choose Google or email, and once you sign in the embedded wallet is created or unlocked. This works whether the browser is local or remote, so no extra flags are needed on headless hosts. The wallet address is the same across all chains. Sessions last about a week; if calls start failing with an expired-session error, just re-run `wallet login`.\n\n---\n\n## Swap Tokens (Same-Chain)\n\n```bash\n# Dry-run — shows route and output amount\nagent swap --from USDC --to USDT --amount 5\n\n# Execute\nagent swap --from USDC --to USDT --amount 5 --broadcast\n\n# Custom slippage (default 0.5%)\nagent swap --from USDC --to USDT --amount 5 --slippage 0.005 --broadcast\n```\n\n## Bridge Tokens (Cross-Chain)\n\n```bash\n# Bridge USDC from Polygon to Arbitrum\nagent swap --from USDC --to USDC --amount 0.5 --to-chain arbitrum --broadcast\n\n# Bridge to other supported chains\nagent swap --from USDC --to USDC --amount 1 --to-chain optimism --broadcast\nagent swap --from USDC --to USDC --amount 1 --to-chain base --broadcast\nagent swap --from USDC --to USDC --amount 1 --to-chain mainnet --broadcast\n```\n\nValid `--to-chain` values: `polygon`, `amoy`, `mainnet`, `arbitrum`, `optimism`, `base`.\n\n## Query Earn Pools\n\nUse `getEarnPools` to discover live yield opportunities across protocols before deciding where to deposit.\n\n### HTTP\n\n```bash\ncurl --request POST \\\n  --url https:\u002F\u002Ftrails-api.sequence.app\u002Frpc\u002FTrails\u002FGetEarnPools \\\n  --header 'Content-Type: application\u002Fjson' \\\n  --header \"X-Access-Key: $TRAILS_API_KEY\" \\\n  --data '{\"chainIds\": [137]}'\n```\n\nAll request fields are optional — omit any you don't need to filter on.\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `chainIds` | `number[]` | Filter by chain (e.g. `[137]` for Polygon mainnet) |\n| `protocols` | `string[]` | Filter by protocol name, e.g. `[\"Aave\"]`, `[\"Morpho\"]` |\n| `minTvl` | `number` | Minimum TVL in USD |\n| `maxApy` | `number` | Maximum APY (useful to exclude outlier\u002Fat-risk pools) |\n\n### API key\n\nTrails officially requires an API key on every request, passed as an `X-Access-Key` header (get one at https:\u002F\u002Fdashboard.trails.build; rate limits are per key: 50 requests\u002Fs, burst 100, 20 QuoteIntent\u002Fmin). `GetEarnPools` currently answers without a key, but do not rely on that.\n\nYou normally do not need to set anything: the CLI resolves the key automatically as `TRAILS_API_KEY`, else the Sequence access key stored by `agent setup` (in `builder.json`), which Trails accepts. Set `TRAILS_API_KEY` only to use a dedicated Trails key.\n\n### Fetch (agent code)\n\n```typescript\nconst res = await fetch('https:\u002F\u002Ftrails-api.sequence.app\u002Frpc\u002FTrails\u002FGetEarnPools', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application\u002Fjson',\n    'X-Access-Key': process.env.TRAILS_API_KEY ?? ''\n  },\n  body: JSON.stringify({ chainIds: [137] }),\n});\nconst { pools } = await res.json();\n```\n\n### Response Schema\n\n```typescript\ninterface GetEarnPoolsResponse {\n  pools:     EarnPool[];\n  timestamp: string;   \u002F\u002F ISO-8601 fetch time\n  cached:    boolean;\n}\n\ninterface EarnPool {\n  id:                          string;  \u002F\u002F \"{protocol}-{chainId}-{address}\"\n  name:                        string;  \u002F\u002F e.g. \"USDC Market\"\n  protocol:                    string;  \u002F\u002F \"Aave\" | \"Morpho\"\n  chainId:                     number;\n  apy:                         number;  \u002F\u002F annualised yield as a percentage (e.g. 2.8 = 2.8% APY — NOT a decimal fraction)\n  tvl:                         number;  \u002F\u002F USD\n  token:                       PoolTokenInfo;\n  depositAddress:              string;  \u002F\u002F contract to approve\u002Fsend to\n  isActive:                    boolean;\n  poolUrl?:                    string;\n  protocolUrl?:                string;\n  wrappedTokenGatewayAddress?: string; \u002F\u002F non-null for Aave native-token markets\n}\n\ninterface PoolTokenInfo {\n  symbol:   string;\n  name:     string;\n  address:  string;\n  decimals: number;\n  logoUrl?: string;\n}\n```\n\n> **Tip:** `wrappedTokenGatewayAddress` is set on Aave markets that accept a wrapped native token (WPOL, WETH). Pass this address instead of `depositAddress` when depositing POL\u002FETH directly.\n\n### Current Trails earn surface (Yield API)\n\n`GetEarnPools` is the endpoint the CLI's `deposit` command uses today and it remains live, but Trails' current generation earn surface is the **Yield API** at the same base URL: `YieldGetMarkets`, `YieldGetProviders`, `YieldCreateEnterAction`, `YieldCreateExitAction`, and `YieldGetAggregateBalances` (docs: https:\u002F\u002Fdocs.trails.build). Query `YieldGetMarkets` when you need markets beyond the Aave and Morpho pools that `GetEarnPools` returns:\n\n```bash\ncurl --request POST \\\n  --url https:\u002F\u002Ftrails-api.sequence.app\u002Frpc\u002FTrails\u002FYieldGetMarkets \\\n  --header 'Content-Type: application\u002Fjson' \\\n  --header \"X-Access-Key: $TRAILS_API_KEY\" \\\n  --data '{}'\n```\n\nThe response is `{ items: [...] }` with per-market `inputTokens`, provider, and network fields. Note that Trails' intent protocol is now v1.5 (HydrateProxy executor); the API still serves the v1 flow that `agent swap` uses, so existing commands are unaffected.\n\n---\n\n## Deposit to Earn Yield\n\nPool discovery uses `TrailsApi.getEarnPools` — picks the most liquid pool (highest TVL) for the asset on the requested chain. No hardcoded addresses — the pool is resolved at runtime. Supported chains: Polygon, Base, Arbitrum, Optimism, Ethereum mainnet (any chain Trails indexes).\n\n**Gas requirement:** The relayer pays gas in USDC or POL, whichever the wallet can afford — so the only requirement is that the wallet holds the funds being deposited plus a little POL or USDC for gas. The CLI always reserves 0.1 USDC for gas — never deposit the full balance. If the requested amount would leave less than 0.1 USDC, the CLI auto-reduces the deposit and prints a note.\n\nThe embedded wallet can call any contract, so deposits work without pre-authorizing the token or pool contract — just dry-run, then broadcast:\n\n```bash\n# Dry-run — shows pool name, APY, TVL, and deposit address before committing\nagent deposit --asset USDC --amount 0.3\n\n# Execute — deposits into the highest-TVL active pool\nagent deposit --asset USDC --amount 0.3 --broadcast\n\n# Filter by protocol\nagent deposit --asset USDC --amount 0.3 --protocol aave --broadcast\nagent deposit --asset USDC --amount 0.3 --protocol morpho --broadcast\n```\n\n### Supported Protocols\n\n| Protocol | Encoding | Description |\n|----------|----------|-------------|\n| **Aave v3** | `supply(asset, amount, onBehalfOf, referralCode)` | Lending pool deposit |\n| **Morpho** | `deposit(assets, receiver)` — ERC-4626 | Vault deposit |\n\nVault\u002Fpool addresses are resolved dynamically from Trails — they are not hardcoded. The dry-run output includes `depositAddress` so you can inspect the exact contract before broadcasting.\n\n## Withdraw (Aave aToken or ERC-4626 vault)\n\nPass the **position token** you hold: an **Aave aToken** address, or a **Morpho \u002F ERC-4626 vault** (share) address. The CLI resolves the Aave **Pool** via `POOL()` on the aToken, or uses `redeem` on the vault. Dry-run by default.\n\n```bash\n# Full exit from an Aave position (aToken from balances output)\nagent withdraw --position 0x68215b6533c47ff9f7125ac95adf00fe4a62f79e --amount max --chain mainnet\n\n# Partial Aave withdraw (underlying units, e.g. USDC)\nagent withdraw --position \u003CaToken> --amount 0.5 --chain mainnet --broadcast\n\n# ERC-4626: max redeems all shares; partial amount is underlying units (convertToShares)\nagent withdraw --position \u003Cvault> --amount max --chain polygon --broadcast\n```\n\nThe embedded wallet can call the pool or vault on any chain, so no contract authorization is needed — just make sure the wallet holds a little POL or USDC on that chain for gas. To withdraw on a chain other than Polygon, pass `--chain mainnet` (or another supported chain) on the `withdraw` command itself.\n\n---\n\n## Full DeFi Flow Example\n\n```bash\n# 1. Check balances\nagent balances\n\n# 2. Swap POL → USDC\nagent swap --from POL --to USDC --amount 1 --broadcast\n\n# 3. Deposit USDC into highest-TVL yield pool\nagent deposit --asset USDC --amount 1 --broadcast\n# → protocol: morpho (or aave, whichever has highest TVL at the time)\n# → poolApy shown in dry-run output\n\n# 4. Bridge remaining USDC to Arbitrum\nagent swap --from USDC --to USDC --amount 0.5 --to-chain arbitrum --broadcast\n```\n\n---\n\n## Arbitrary Contract Calls\n\nFor any operation not covered by the dedicated commands, use `call` to send a raw transaction to any contract (the embedded wallet can call anything):\n\n```bash\n# Dry-run an arbitrary call\nagent call --to 0x... --data 0x...\n\n# With an attached native value, then broadcast\nagent call --to 0x... --data 0x... --value 0.1 --broadcast\n\n# For a native-only wallet, force the relayer to take its fee in POL\nagent call --to 0x... --data 0x... --prefer-native-fee --broadcast\n```\n\n---\n\n## Troubleshooting\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| `Not logged in` \u002F no wallet found | No active wallet session | Run `agent wallet login` |\n| Session expired | Sessions last about a week | Run `agent wallet login` |\n| `Insufficient \u003Ctoken>: wallet has X` | Balance too low for the requested deposit amount | Run `agent balances` and adjust `--amount` |\n| `Unable to pay gas` \u002F `Wallet has no POL for gas` | Wallet can't cover the relayer fee in USDC or POL | Fund the wallet with a little POL or USDC; for a native-only wallet, pass `--prefer-native-fee` on `call` |\n| `Protocol X not yet supported` | Trails returned a protocol other than aave\u002Fmorpho | Use `agent swap` to obtain the yield-bearing token manually |\n| `swap`: no route found | Insufficient liquidity for the pair | Try a different amount or token pair |\n",{"data":38,"body":39},{"name":4,"description":6},{"type":40,"children":41},"root",[42,51,58,70,105,118,122,128,316,322,547,602,608,621,628,757,762,919,925,956,992,998,1355,1361,1932,1962,1968,2052,2164,2193,2196,2202,2215,2225,2230,2418,2424,2502,2514,2520,2569,2764,2785,2788,2794,3000,3003,3009,3022,3175,3178,3184,3393],{"type":43,"tag":44,"props":45,"children":47},"element","h1",{"id":46},"swap-bridge-deposit",[48],{"type":49,"value":50},"text","Swap, Bridge & Deposit",{"type":43,"tag":52,"props":53,"children":55},"h2",{"id":54},"session-prerequisites",[56],{"type":49,"value":57},"Session Prerequisites",{"type":43,"tag":59,"props":60,"children":61},"p",{},[62,68],{"type":43,"tag":63,"props":64,"children":65},"strong",{},[66],{"type":49,"value":67},"Before any DeFi operation, the wallet must be logged in.",{"type":49,"value":69}," The embedded wallet can call any contract and spend any amount it holds — there is no contract whitelist and no per-token spend limit, so no special setup is needed for deposits, swaps, or withdrawals. If the user is not logged in, log in now:",{"type":43,"tag":71,"props":72,"children":77},"pre",{"className":73,"code":74,"language":75,"meta":76,"style":76},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","agent wallet login\n","bash","",[78],{"type":43,"tag":79,"props":80,"children":81},"code",{"__ignoreMap":76},[82],{"type":43,"tag":83,"props":84,"children":87},"span",{"class":85,"line":86},"line",1,[88,94,100],{"type":43,"tag":83,"props":89,"children":91},{"style":90},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[92],{"type":49,"value":93},"agent",{"type":43,"tag":83,"props":95,"children":97},{"style":96},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[98],{"type":49,"value":99}," wallet",{"type":43,"tag":83,"props":101,"children":102},{"style":96},[103],{"type":49,"value":104}," login\n",{"type":43,"tag":59,"props":106,"children":107},{},[108,110,116],{"type":49,"value":109},"This opens the agentconnect login page in the browser; choose Google or email, and once you sign in the embedded wallet is created or unlocked. This works whether the browser is local or remote, so no extra flags are needed on headless hosts. The wallet address is the same across all chains. Sessions last about a week; if calls start failing with an expired-session error, just re-run ",{"type":43,"tag":79,"props":111,"children":113},{"className":112},[],[114],{"type":49,"value":115},"wallet login",{"type":49,"value":117},".",{"type":43,"tag":119,"props":120,"children":121},"hr",{},[],{"type":43,"tag":52,"props":123,"children":125},{"id":124},"swap-tokens-same-chain",[126],{"type":49,"value":127},"Swap Tokens (Same-Chain)",{"type":43,"tag":71,"props":129,"children":131},{"className":73,"code":130,"language":75,"meta":76,"style":76},"# Dry-run — shows route and output amount\nagent swap --from USDC --to USDT --amount 5\n\n# Execute\nagent swap --from USDC --to USDT --amount 5 --broadcast\n\n# Custom slippage (default 0.5%)\nagent swap --from USDC --to USDT --amount 5 --slippage 0.005 --broadcast\n",[132],{"type":43,"tag":79,"props":133,"children":134},{"__ignoreMap":76},[135,144,188,198,207,249,257,266],{"type":43,"tag":83,"props":136,"children":137},{"class":85,"line":86},[138],{"type":43,"tag":83,"props":139,"children":141},{"style":140},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[142],{"type":49,"value":143},"# Dry-run — shows route and output amount\n",{"type":43,"tag":83,"props":145,"children":147},{"class":85,"line":146},2,[148,152,157,162,167,172,177,182],{"type":43,"tag":83,"props":149,"children":150},{"style":90},[151],{"type":49,"value":93},{"type":43,"tag":83,"props":153,"children":154},{"style":96},[155],{"type":49,"value":156}," swap",{"type":43,"tag":83,"props":158,"children":159},{"style":96},[160],{"type":49,"value":161}," --from",{"type":43,"tag":83,"props":163,"children":164},{"style":96},[165],{"type":49,"value":166}," USDC",{"type":43,"tag":83,"props":168,"children":169},{"style":96},[170],{"type":49,"value":171}," --to",{"type":43,"tag":83,"props":173,"children":174},{"style":96},[175],{"type":49,"value":176}," USDT",{"type":43,"tag":83,"props":178,"children":179},{"style":96},[180],{"type":49,"value":181}," --amount",{"type":43,"tag":83,"props":183,"children":185},{"style":184},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[186],{"type":49,"value":187}," 5\n",{"type":43,"tag":83,"props":189,"children":191},{"class":85,"line":190},3,[192],{"type":43,"tag":83,"props":193,"children":195},{"emptyLinePlaceholder":194},true,[196],{"type":49,"value":197},"\n",{"type":43,"tag":83,"props":199,"children":201},{"class":85,"line":200},4,[202],{"type":43,"tag":83,"props":203,"children":204},{"style":140},[205],{"type":49,"value":206},"# Execute\n",{"type":43,"tag":83,"props":208,"children":210},{"class":85,"line":209},5,[211,215,219,223,227,231,235,239,244],{"type":43,"tag":83,"props":212,"children":213},{"style":90},[214],{"type":49,"value":93},{"type":43,"tag":83,"props":216,"children":217},{"style":96},[218],{"type":49,"value":156},{"type":43,"tag":83,"props":220,"children":221},{"style":96},[222],{"type":49,"value":161},{"type":43,"tag":83,"props":224,"children":225},{"style":96},[226],{"type":49,"value":166},{"type":43,"tag":83,"props":228,"children":229},{"style":96},[230],{"type":49,"value":171},{"type":43,"tag":83,"props":232,"children":233},{"style":96},[234],{"type":49,"value":176},{"type":43,"tag":83,"props":236,"children":237},{"style":96},[238],{"type":49,"value":181},{"type":43,"tag":83,"props":240,"children":241},{"style":184},[242],{"type":49,"value":243}," 5",{"type":43,"tag":83,"props":245,"children":246},{"style":96},[247],{"type":49,"value":248}," --broadcast\n",{"type":43,"tag":83,"props":250,"children":252},{"class":85,"line":251},6,[253],{"type":43,"tag":83,"props":254,"children":255},{"emptyLinePlaceholder":194},[256],{"type":49,"value":197},{"type":43,"tag":83,"props":258,"children":260},{"class":85,"line":259},7,[261],{"type":43,"tag":83,"props":262,"children":263},{"style":140},[264],{"type":49,"value":265},"# Custom slippage (default 0.5%)\n",{"type":43,"tag":83,"props":267,"children":269},{"class":85,"line":268},8,[270,274,278,282,286,290,294,298,302,307,312],{"type":43,"tag":83,"props":271,"children":272},{"style":90},[273],{"type":49,"value":93},{"type":43,"tag":83,"props":275,"children":276},{"style":96},[277],{"type":49,"value":156},{"type":43,"tag":83,"props":279,"children":280},{"style":96},[281],{"type":49,"value":161},{"type":43,"tag":83,"props":283,"children":284},{"style":96},[285],{"type":49,"value":166},{"type":43,"tag":83,"props":287,"children":288},{"style":96},[289],{"type":49,"value":171},{"type":43,"tag":83,"props":291,"children":292},{"style":96},[293],{"type":49,"value":176},{"type":43,"tag":83,"props":295,"children":296},{"style":96},[297],{"type":49,"value":181},{"type":43,"tag":83,"props":299,"children":300},{"style":184},[301],{"type":49,"value":243},{"type":43,"tag":83,"props":303,"children":304},{"style":96},[305],{"type":49,"value":306}," --slippage",{"type":43,"tag":83,"props":308,"children":309},{"style":184},[310],{"type":49,"value":311}," 0.005",{"type":43,"tag":83,"props":313,"children":314},{"style":96},[315],{"type":49,"value":248},{"type":43,"tag":52,"props":317,"children":319},{"id":318},"bridge-tokens-cross-chain",[320],{"type":49,"value":321},"Bridge Tokens (Cross-Chain)",{"type":43,"tag":71,"props":323,"children":325},{"className":73,"code":324,"language":75,"meta":76,"style":76},"# Bridge USDC from Polygon to Arbitrum\nagent swap --from USDC --to USDC --amount 0.5 --to-chain arbitrum --broadcast\n\n# Bridge to other supported chains\nagent swap --from USDC --to USDC --amount 1 --to-chain optimism --broadcast\nagent swap --from USDC --to USDC --amount 1 --to-chain base --broadcast\nagent swap --from USDC --to USDC --amount 1 --to-chain mainnet --broadcast\n",[326],{"type":43,"tag":79,"props":327,"children":328},{"__ignoreMap":76},[329,337,387,394,402,451,499],{"type":43,"tag":83,"props":330,"children":331},{"class":85,"line":86},[332],{"type":43,"tag":83,"props":333,"children":334},{"style":140},[335],{"type":49,"value":336},"# Bridge USDC from Polygon to Arbitrum\n",{"type":43,"tag":83,"props":338,"children":339},{"class":85,"line":146},[340,344,348,352,356,360,364,368,373,378,383],{"type":43,"tag":83,"props":341,"children":342},{"style":90},[343],{"type":49,"value":93},{"type":43,"tag":83,"props":345,"children":346},{"style":96},[347],{"type":49,"value":156},{"type":43,"tag":83,"props":349,"children":350},{"style":96},[351],{"type":49,"value":161},{"type":43,"tag":83,"props":353,"children":354},{"style":96},[355],{"type":49,"value":166},{"type":43,"tag":83,"props":357,"children":358},{"style":96},[359],{"type":49,"value":171},{"type":43,"tag":83,"props":361,"children":362},{"style":96},[363],{"type":49,"value":166},{"type":43,"tag":83,"props":365,"children":366},{"style":96},[367],{"type":49,"value":181},{"type":43,"tag":83,"props":369,"children":370},{"style":184},[371],{"type":49,"value":372}," 0.5",{"type":43,"tag":83,"props":374,"children":375},{"style":96},[376],{"type":49,"value":377}," --to-chain",{"type":43,"tag":83,"props":379,"children":380},{"style":96},[381],{"type":49,"value":382}," arbitrum",{"type":43,"tag":83,"props":384,"children":385},{"style":96},[386],{"type":49,"value":248},{"type":43,"tag":83,"props":388,"children":389},{"class":85,"line":190},[390],{"type":43,"tag":83,"props":391,"children":392},{"emptyLinePlaceholder":194},[393],{"type":49,"value":197},{"type":43,"tag":83,"props":395,"children":396},{"class":85,"line":200},[397],{"type":43,"tag":83,"props":398,"children":399},{"style":140},[400],{"type":49,"value":401},"# Bridge to other supported chains\n",{"type":43,"tag":83,"props":403,"children":404},{"class":85,"line":209},[405,409,413,417,421,425,429,433,438,442,447],{"type":43,"tag":83,"props":406,"children":407},{"style":90},[408],{"type":49,"value":93},{"type":43,"tag":83,"props":410,"children":411},{"style":96},[412],{"type":49,"value":156},{"type":43,"tag":83,"props":414,"children":415},{"style":96},[416],{"type":49,"value":161},{"type":43,"tag":83,"props":418,"children":419},{"style":96},[420],{"type":49,"value":166},{"type":43,"tag":83,"props":422,"children":423},{"style":96},[424],{"type":49,"value":171},{"type":43,"tag":83,"props":426,"children":427},{"style":96},[428],{"type":49,"value":166},{"type":43,"tag":83,"props":430,"children":431},{"style":96},[432],{"type":49,"value":181},{"type":43,"tag":83,"props":434,"children":435},{"style":184},[436],{"type":49,"value":437}," 1",{"type":43,"tag":83,"props":439,"children":440},{"style":96},[441],{"type":49,"value":377},{"type":43,"tag":83,"props":443,"children":444},{"style":96},[445],{"type":49,"value":446}," optimism",{"type":43,"tag":83,"props":448,"children":449},{"style":96},[450],{"type":49,"value":248},{"type":43,"tag":83,"props":452,"children":453},{"class":85,"line":251},[454,458,462,466,470,474,478,482,486,490,495],{"type":43,"tag":83,"props":455,"children":456},{"style":90},[457],{"type":49,"value":93},{"type":43,"tag":83,"props":459,"children":460},{"style":96},[461],{"type":49,"value":156},{"type":43,"tag":83,"props":463,"children":464},{"style":96},[465],{"type":49,"value":161},{"type":43,"tag":83,"props":467,"children":468},{"style":96},[469],{"type":49,"value":166},{"type":43,"tag":83,"props":471,"children":472},{"style":96},[473],{"type":49,"value":171},{"type":43,"tag":83,"props":475,"children":476},{"style":96},[477],{"type":49,"value":166},{"type":43,"tag":83,"props":479,"children":480},{"style":96},[481],{"type":49,"value":181},{"type":43,"tag":83,"props":483,"children":484},{"style":184},[485],{"type":49,"value":437},{"type":43,"tag":83,"props":487,"children":488},{"style":96},[489],{"type":49,"value":377},{"type":43,"tag":83,"props":491,"children":492},{"style":96},[493],{"type":49,"value":494}," base",{"type":43,"tag":83,"props":496,"children":497},{"style":96},[498],{"type":49,"value":248},{"type":43,"tag":83,"props":500,"children":501},{"class":85,"line":259},[502,506,510,514,518,522,526,530,534,538,543],{"type":43,"tag":83,"props":503,"children":504},{"style":90},[505],{"type":49,"value":93},{"type":43,"tag":83,"props":507,"children":508},{"style":96},[509],{"type":49,"value":156},{"type":43,"tag":83,"props":511,"children":512},{"style":96},[513],{"type":49,"value":161},{"type":43,"tag":83,"props":515,"children":516},{"style":96},[517],{"type":49,"value":166},{"type":43,"tag":83,"props":519,"children":520},{"style":96},[521],{"type":49,"value":171},{"type":43,"tag":83,"props":523,"children":524},{"style":96},[525],{"type":49,"value":166},{"type":43,"tag":83,"props":527,"children":528},{"style":96},[529],{"type":49,"value":181},{"type":43,"tag":83,"props":531,"children":532},{"style":184},[533],{"type":49,"value":437},{"type":43,"tag":83,"props":535,"children":536},{"style":96},[537],{"type":49,"value":377},{"type":43,"tag":83,"props":539,"children":540},{"style":96},[541],{"type":49,"value":542}," mainnet",{"type":43,"tag":83,"props":544,"children":545},{"style":96},[546],{"type":49,"value":248},{"type":43,"tag":59,"props":548,"children":549},{},[550,552,558,560,565,567,573,574,580,581,587,588,594,595,601],{"type":49,"value":551},"Valid ",{"type":43,"tag":79,"props":553,"children":555},{"className":554},[],[556],{"type":49,"value":557},"--to-chain",{"type":49,"value":559}," values: ",{"type":43,"tag":79,"props":561,"children":563},{"className":562},[],[564],{"type":49,"value":8},{"type":49,"value":566},", ",{"type":43,"tag":79,"props":568,"children":570},{"className":569},[],[571],{"type":49,"value":572},"amoy",{"type":49,"value":566},{"type":43,"tag":79,"props":575,"children":577},{"className":576},[],[578],{"type":49,"value":579},"mainnet",{"type":49,"value":566},{"type":43,"tag":79,"props":582,"children":584},{"className":583},[],[585],{"type":49,"value":586},"arbitrum",{"type":49,"value":566},{"type":43,"tag":79,"props":589,"children":591},{"className":590},[],[592],{"type":49,"value":593},"optimism",{"type":49,"value":566},{"type":43,"tag":79,"props":596,"children":598},{"className":597},[],[599],{"type":49,"value":600},"base",{"type":49,"value":117},{"type":43,"tag":52,"props":603,"children":605},{"id":604},"query-earn-pools",[606],{"type":49,"value":607},"Query Earn Pools",{"type":43,"tag":59,"props":609,"children":610},{},[611,613,619],{"type":49,"value":612},"Use ",{"type":43,"tag":79,"props":614,"children":616},{"className":615},[],[617],{"type":49,"value":618},"getEarnPools",{"type":49,"value":620}," to discover live yield opportunities across protocols before deciding where to deposit.",{"type":43,"tag":622,"props":623,"children":625},"h3",{"id":624},"http",[626],{"type":49,"value":627},"HTTP",{"type":43,"tag":71,"props":629,"children":631},{"className":73,"code":630,"language":75,"meta":76,"style":76},"curl --request POST \\\n  --url https:\u002F\u002Ftrails-api.sequence.app\u002Frpc\u002FTrails\u002FGetEarnPools \\\n  --header 'Content-Type: application\u002Fjson' \\\n  --header \"X-Access-Key: $TRAILS_API_KEY\" \\\n  --data '{\"chainIds\": [137]}'\n",[632],{"type":43,"tag":79,"props":633,"children":634},{"__ignoreMap":76},[635,659,676,704,735],{"type":43,"tag":83,"props":636,"children":637},{"class":85,"line":86},[638,643,648,653],{"type":43,"tag":83,"props":639,"children":640},{"style":90},[641],{"type":49,"value":642},"curl",{"type":43,"tag":83,"props":644,"children":645},{"style":96},[646],{"type":49,"value":647}," --request",{"type":43,"tag":83,"props":649,"children":650},{"style":96},[651],{"type":49,"value":652}," POST",{"type":43,"tag":83,"props":654,"children":656},{"style":655},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[657],{"type":49,"value":658}," \\\n",{"type":43,"tag":83,"props":660,"children":661},{"class":85,"line":146},[662,667,672],{"type":43,"tag":83,"props":663,"children":664},{"style":96},[665],{"type":49,"value":666},"  --url",{"type":43,"tag":83,"props":668,"children":669},{"style":96},[670],{"type":49,"value":671}," https:\u002F\u002Ftrails-api.sequence.app\u002Frpc\u002FTrails\u002FGetEarnPools",{"type":43,"tag":83,"props":673,"children":674},{"style":655},[675],{"type":49,"value":658},{"type":43,"tag":83,"props":677,"children":678},{"class":85,"line":190},[679,684,690,695,700],{"type":43,"tag":83,"props":680,"children":681},{"style":96},[682],{"type":49,"value":683},"  --header",{"type":43,"tag":83,"props":685,"children":687},{"style":686},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[688],{"type":49,"value":689}," '",{"type":43,"tag":83,"props":691,"children":692},{"style":96},[693],{"type":49,"value":694},"Content-Type: application\u002Fjson",{"type":43,"tag":83,"props":696,"children":697},{"style":686},[698],{"type":49,"value":699},"'",{"type":43,"tag":83,"props":701,"children":702},{"style":655},[703],{"type":49,"value":658},{"type":43,"tag":83,"props":705,"children":706},{"class":85,"line":200},[707,711,716,721,726,731],{"type":43,"tag":83,"props":708,"children":709},{"style":96},[710],{"type":49,"value":683},{"type":43,"tag":83,"props":712,"children":713},{"style":686},[714],{"type":49,"value":715}," \"",{"type":43,"tag":83,"props":717,"children":718},{"style":96},[719],{"type":49,"value":720},"X-Access-Key: ",{"type":43,"tag":83,"props":722,"children":723},{"style":655},[724],{"type":49,"value":725},"$TRAILS_API_KEY",{"type":43,"tag":83,"props":727,"children":728},{"style":686},[729],{"type":49,"value":730},"\"",{"type":43,"tag":83,"props":732,"children":733},{"style":655},[734],{"type":49,"value":658},{"type":43,"tag":83,"props":736,"children":737},{"class":85,"line":209},[738,743,747,752],{"type":43,"tag":83,"props":739,"children":740},{"style":96},[741],{"type":49,"value":742},"  --data",{"type":43,"tag":83,"props":744,"children":745},{"style":686},[746],{"type":49,"value":689},{"type":43,"tag":83,"props":748,"children":749},{"style":96},[750],{"type":49,"value":751},"{\"chainIds\": [137]}",{"type":43,"tag":83,"props":753,"children":754},{"style":686},[755],{"type":49,"value":756},"'\n",{"type":43,"tag":59,"props":758,"children":759},{},[760],{"type":49,"value":761},"All request fields are optional — omit any you don't need to filter on.",{"type":43,"tag":763,"props":764,"children":765},"table",{},[766,790],{"type":43,"tag":767,"props":768,"children":769},"thead",{},[770],{"type":43,"tag":771,"props":772,"children":773},"tr",{},[774,780,785],{"type":43,"tag":775,"props":776,"children":777},"th",{},[778],{"type":49,"value":779},"Field",{"type":43,"tag":775,"props":781,"children":782},{},[783],{"type":49,"value":784},"Type",{"type":43,"tag":775,"props":786,"children":787},{},[788],{"type":49,"value":789},"Description",{"type":43,"tag":791,"props":792,"children":793},"tbody",{},[794,829,868,894],{"type":43,"tag":771,"props":795,"children":796},{},[797,807,816],{"type":43,"tag":798,"props":799,"children":800},"td",{},[801],{"type":43,"tag":79,"props":802,"children":804},{"className":803},[],[805],{"type":49,"value":806},"chainIds",{"type":43,"tag":798,"props":808,"children":809},{},[810],{"type":43,"tag":79,"props":811,"children":813},{"className":812},[],[814],{"type":49,"value":815},"number[]",{"type":43,"tag":798,"props":817,"children":818},{},[819,821,827],{"type":49,"value":820},"Filter by chain (e.g. ",{"type":43,"tag":79,"props":822,"children":824},{"className":823},[],[825],{"type":49,"value":826},"[137]",{"type":49,"value":828}," for Polygon mainnet)",{"type":43,"tag":771,"props":830,"children":831},{},[832,841,850],{"type":43,"tag":798,"props":833,"children":834},{},[835],{"type":43,"tag":79,"props":836,"children":838},{"className":837},[],[839],{"type":49,"value":840},"protocols",{"type":43,"tag":798,"props":842,"children":843},{},[844],{"type":43,"tag":79,"props":845,"children":847},{"className":846},[],[848],{"type":49,"value":849},"string[]",{"type":43,"tag":798,"props":851,"children":852},{},[853,855,861,862],{"type":49,"value":854},"Filter by protocol name, e.g. ",{"type":43,"tag":79,"props":856,"children":858},{"className":857},[],[859],{"type":49,"value":860},"[\"Aave\"]",{"type":49,"value":566},{"type":43,"tag":79,"props":863,"children":865},{"className":864},[],[866],{"type":49,"value":867},"[\"Morpho\"]",{"type":43,"tag":771,"props":869,"children":870},{},[871,880,889],{"type":43,"tag":798,"props":872,"children":873},{},[874],{"type":43,"tag":79,"props":875,"children":877},{"className":876},[],[878],{"type":49,"value":879},"minTvl",{"type":43,"tag":798,"props":881,"children":882},{},[883],{"type":43,"tag":79,"props":884,"children":886},{"className":885},[],[887],{"type":49,"value":888},"number",{"type":43,"tag":798,"props":890,"children":891},{},[892],{"type":49,"value":893},"Minimum TVL in USD",{"type":43,"tag":771,"props":895,"children":896},{},[897,906,914],{"type":43,"tag":798,"props":898,"children":899},{},[900],{"type":43,"tag":79,"props":901,"children":903},{"className":902},[],[904],{"type":49,"value":905},"maxApy",{"type":43,"tag":798,"props":907,"children":908},{},[909],{"type":43,"tag":79,"props":910,"children":912},{"className":911},[],[913],{"type":49,"value":888},{"type":43,"tag":798,"props":915,"children":916},{},[917],{"type":49,"value":918},"Maximum APY (useful to exclude outlier\u002Fat-risk pools)",{"type":43,"tag":622,"props":920,"children":922},{"id":921},"api-key",[923],{"type":49,"value":924},"API key",{"type":43,"tag":59,"props":926,"children":927},{},[928,930,936,938,946,948,954],{"type":49,"value":929},"Trails officially requires an API key on every request, passed as an ",{"type":43,"tag":79,"props":931,"children":933},{"className":932},[],[934],{"type":49,"value":935},"X-Access-Key",{"type":49,"value":937}," header (get one at ",{"type":43,"tag":939,"props":940,"children":944},"a",{"href":941,"rel":942},"https:\u002F\u002Fdashboard.trails.build",[943],"nofollow",[945],{"type":49,"value":941},{"type":49,"value":947},"; rate limits are per key: 50 requests\u002Fs, burst 100, 20 QuoteIntent\u002Fmin). ",{"type":43,"tag":79,"props":949,"children":951},{"className":950},[],[952],{"type":49,"value":953},"GetEarnPools",{"type":49,"value":955}," currently answers without a key, but do not rely on that.",{"type":43,"tag":59,"props":957,"children":958},{},[959,961,967,969,975,977,983,985,990],{"type":49,"value":960},"You normally do not need to set anything: the CLI resolves the key automatically as ",{"type":43,"tag":79,"props":962,"children":964},{"className":963},[],[965],{"type":49,"value":966},"TRAILS_API_KEY",{"type":49,"value":968},", else the Sequence access key stored by ",{"type":43,"tag":79,"props":970,"children":972},{"className":971},[],[973],{"type":49,"value":974},"agent setup",{"type":49,"value":976}," (in ",{"type":43,"tag":79,"props":978,"children":980},{"className":979},[],[981],{"type":49,"value":982},"builder.json",{"type":49,"value":984},"), which Trails accepts. Set ",{"type":43,"tag":79,"props":986,"children":988},{"className":987},[],[989],{"type":49,"value":966},{"type":49,"value":991}," only to use a dedicated Trails key.",{"type":43,"tag":622,"props":993,"children":995},{"id":994},"fetch-agent-code",[996],{"type":49,"value":997},"Fetch (agent code)",{"type":43,"tag":71,"props":999,"children":1003},{"className":1000,"code":1001,"language":1002,"meta":76,"style":76},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const res = await fetch('https:\u002F\u002Ftrails-api.sequence.app\u002Frpc\u002FTrails\u002FGetEarnPools', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application\u002Fjson',\n    'X-Access-Key': process.env.TRAILS_API_KEY ?? ''\n  },\n  body: JSON.stringify({ chainIds: [137] }),\n});\nconst { pools } = await res.json();\n","typescript",[1004],{"type":43,"tag":79,"props":1005,"children":1006},{"__ignoreMap":76},[1007,1066,1098,1114,1152,1204,1212,1285,1301],{"type":43,"tag":83,"props":1008,"children":1009},{"class":85,"line":86},[1010,1016,1021,1026,1032,1038,1043,1047,1052,1056,1061],{"type":43,"tag":83,"props":1011,"children":1013},{"style":1012},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1014],{"type":49,"value":1015},"const",{"type":43,"tag":83,"props":1017,"children":1018},{"style":655},[1019],{"type":49,"value":1020}," res ",{"type":43,"tag":83,"props":1022,"children":1023},{"style":686},[1024],{"type":49,"value":1025},"=",{"type":43,"tag":83,"props":1027,"children":1029},{"style":1028},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[1030],{"type":49,"value":1031}," await",{"type":43,"tag":83,"props":1033,"children":1035},{"style":1034},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1036],{"type":49,"value":1037}," fetch",{"type":43,"tag":83,"props":1039,"children":1040},{"style":655},[1041],{"type":49,"value":1042},"(",{"type":43,"tag":83,"props":1044,"children":1045},{"style":686},[1046],{"type":49,"value":699},{"type":43,"tag":83,"props":1048,"children":1049},{"style":96},[1050],{"type":49,"value":1051},"https:\u002F\u002Ftrails-api.sequence.app\u002Frpc\u002FTrails\u002FGetEarnPools",{"type":43,"tag":83,"props":1053,"children":1054},{"style":686},[1055],{"type":49,"value":699},{"type":43,"tag":83,"props":1057,"children":1058},{"style":686},[1059],{"type":49,"value":1060},",",{"type":43,"tag":83,"props":1062,"children":1063},{"style":686},[1064],{"type":49,"value":1065}," {\n",{"type":43,"tag":83,"props":1067,"children":1068},{"class":85,"line":146},[1069,1075,1080,1084,1089,1093],{"type":43,"tag":83,"props":1070,"children":1072},{"style":1071},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[1073],{"type":49,"value":1074},"  method",{"type":43,"tag":83,"props":1076,"children":1077},{"style":686},[1078],{"type":49,"value":1079},":",{"type":43,"tag":83,"props":1081,"children":1082},{"style":686},[1083],{"type":49,"value":689},{"type":43,"tag":83,"props":1085,"children":1086},{"style":96},[1087],{"type":49,"value":1088},"POST",{"type":43,"tag":83,"props":1090,"children":1091},{"style":686},[1092],{"type":49,"value":699},{"type":43,"tag":83,"props":1094,"children":1095},{"style":686},[1096],{"type":49,"value":1097},",\n",{"type":43,"tag":83,"props":1099,"children":1100},{"class":85,"line":190},[1101,1106,1110],{"type":43,"tag":83,"props":1102,"children":1103},{"style":1071},[1104],{"type":49,"value":1105},"  headers",{"type":43,"tag":83,"props":1107,"children":1108},{"style":686},[1109],{"type":49,"value":1079},{"type":43,"tag":83,"props":1111,"children":1112},{"style":686},[1113],{"type":49,"value":1065},{"type":43,"tag":83,"props":1115,"children":1116},{"class":85,"line":200},[1117,1122,1127,1131,1135,1139,1144,1148],{"type":43,"tag":83,"props":1118,"children":1119},{"style":686},[1120],{"type":49,"value":1121},"    '",{"type":43,"tag":83,"props":1123,"children":1124},{"style":1071},[1125],{"type":49,"value":1126},"Content-Type",{"type":43,"tag":83,"props":1128,"children":1129},{"style":686},[1130],{"type":49,"value":699},{"type":43,"tag":83,"props":1132,"children":1133},{"style":686},[1134],{"type":49,"value":1079},{"type":43,"tag":83,"props":1136,"children":1137},{"style":686},[1138],{"type":49,"value":689},{"type":43,"tag":83,"props":1140,"children":1141},{"style":96},[1142],{"type":49,"value":1143},"application\u002Fjson",{"type":43,"tag":83,"props":1145,"children":1146},{"style":686},[1147],{"type":49,"value":699},{"type":43,"tag":83,"props":1149,"children":1150},{"style":686},[1151],{"type":49,"value":1097},{"type":43,"tag":83,"props":1153,"children":1154},{"class":85,"line":209},[1155,1159,1163,1167,1171,1176,1180,1185,1189,1194,1199],{"type":43,"tag":83,"props":1156,"children":1157},{"style":686},[1158],{"type":49,"value":1121},{"type":43,"tag":83,"props":1160,"children":1161},{"style":1071},[1162],{"type":49,"value":935},{"type":43,"tag":83,"props":1164,"children":1165},{"style":686},[1166],{"type":49,"value":699},{"type":43,"tag":83,"props":1168,"children":1169},{"style":686},[1170],{"type":49,"value":1079},{"type":43,"tag":83,"props":1172,"children":1173},{"style":655},[1174],{"type":49,"value":1175}," process",{"type":43,"tag":83,"props":1177,"children":1178},{"style":686},[1179],{"type":49,"value":117},{"type":43,"tag":83,"props":1181,"children":1182},{"style":655},[1183],{"type":49,"value":1184},"env",{"type":43,"tag":83,"props":1186,"children":1187},{"style":686},[1188],{"type":49,"value":117},{"type":43,"tag":83,"props":1190,"children":1191},{"style":655},[1192],{"type":49,"value":1193},"TRAILS_API_KEY ",{"type":43,"tag":83,"props":1195,"children":1196},{"style":686},[1197],{"type":49,"value":1198},"??",{"type":43,"tag":83,"props":1200,"children":1201},{"style":686},[1202],{"type":49,"value":1203}," ''\n",{"type":43,"tag":83,"props":1205,"children":1206},{"class":85,"line":251},[1207],{"type":43,"tag":83,"props":1208,"children":1209},{"style":686},[1210],{"type":49,"value":1211},"  },\n",{"type":43,"tag":83,"props":1213,"children":1214},{"class":85,"line":259},[1215,1220,1224,1229,1233,1238,1242,1247,1252,1256,1261,1266,1271,1276,1281],{"type":43,"tag":83,"props":1216,"children":1217},{"style":1071},[1218],{"type":49,"value":1219},"  body",{"type":43,"tag":83,"props":1221,"children":1222},{"style":686},[1223],{"type":49,"value":1079},{"type":43,"tag":83,"props":1225,"children":1226},{"style":655},[1227],{"type":49,"value":1228}," JSON",{"type":43,"tag":83,"props":1230,"children":1231},{"style":686},[1232],{"type":49,"value":117},{"type":43,"tag":83,"props":1234,"children":1235},{"style":1034},[1236],{"type":49,"value":1237},"stringify",{"type":43,"tag":83,"props":1239,"children":1240},{"style":655},[1241],{"type":49,"value":1042},{"type":43,"tag":83,"props":1243,"children":1244},{"style":686},[1245],{"type":49,"value":1246},"{",{"type":43,"tag":83,"props":1248,"children":1249},{"style":1071},[1250],{"type":49,"value":1251}," chainIds",{"type":43,"tag":83,"props":1253,"children":1254},{"style":686},[1255],{"type":49,"value":1079},{"type":43,"tag":83,"props":1257,"children":1258},{"style":655},[1259],{"type":49,"value":1260}," [",{"type":43,"tag":83,"props":1262,"children":1263},{"style":184},[1264],{"type":49,"value":1265},"137",{"type":43,"tag":83,"props":1267,"children":1268},{"style":655},[1269],{"type":49,"value":1270},"] ",{"type":43,"tag":83,"props":1272,"children":1273},{"style":686},[1274],{"type":49,"value":1275},"}",{"type":43,"tag":83,"props":1277,"children":1278},{"style":655},[1279],{"type":49,"value":1280},")",{"type":43,"tag":83,"props":1282,"children":1283},{"style":686},[1284],{"type":49,"value":1097},{"type":43,"tag":83,"props":1286,"children":1287},{"class":85,"line":268},[1288,1292,1296],{"type":43,"tag":83,"props":1289,"children":1290},{"style":686},[1291],{"type":49,"value":1275},{"type":43,"tag":83,"props":1293,"children":1294},{"style":655},[1295],{"type":49,"value":1280},{"type":43,"tag":83,"props":1297,"children":1298},{"style":686},[1299],{"type":49,"value":1300},";\n",{"type":43,"tag":83,"props":1302,"children":1304},{"class":85,"line":1303},9,[1305,1309,1314,1319,1323,1328,1332,1337,1341,1346,1351],{"type":43,"tag":83,"props":1306,"children":1307},{"style":1012},[1308],{"type":49,"value":1015},{"type":43,"tag":83,"props":1310,"children":1311},{"style":686},[1312],{"type":49,"value":1313}," {",{"type":43,"tag":83,"props":1315,"children":1316},{"style":655},[1317],{"type":49,"value":1318}," pools ",{"type":43,"tag":83,"props":1320,"children":1321},{"style":686},[1322],{"type":49,"value":1275},{"type":43,"tag":83,"props":1324,"children":1325},{"style":686},[1326],{"type":49,"value":1327}," =",{"type":43,"tag":83,"props":1329,"children":1330},{"style":1028},[1331],{"type":49,"value":1031},{"type":43,"tag":83,"props":1333,"children":1334},{"style":655},[1335],{"type":49,"value":1336}," res",{"type":43,"tag":83,"props":1338,"children":1339},{"style":686},[1340],{"type":49,"value":117},{"type":43,"tag":83,"props":1342,"children":1343},{"style":1034},[1344],{"type":49,"value":1345},"json",{"type":43,"tag":83,"props":1347,"children":1348},{"style":655},[1349],{"type":49,"value":1350},"()",{"type":43,"tag":83,"props":1352,"children":1353},{"style":686},[1354],{"type":49,"value":1300},{"type":43,"tag":622,"props":1356,"children":1358},{"id":1357},"response-schema",[1359],{"type":49,"value":1360},"Response Schema",{"type":43,"tag":71,"props":1362,"children":1364},{"className":1000,"code":1363,"language":1002,"meta":76,"style":76},"interface GetEarnPoolsResponse {\n  pools:     EarnPool[];\n  timestamp: string;   \u002F\u002F ISO-8601 fetch time\n  cached:    boolean;\n}\n\ninterface EarnPool {\n  id:                          string;  \u002F\u002F \"{protocol}-{chainId}-{address}\"\n  name:                        string;  \u002F\u002F e.g. \"USDC Market\"\n  protocol:                    string;  \u002F\u002F \"Aave\" | \"Morpho\"\n  chainId:                     number;\n  apy:                         number;  \u002F\u002F annualised yield as a percentage (e.g. 2.8 = 2.8% APY — NOT a decimal fraction)\n  tvl:                         number;  \u002F\u002F USD\n  token:                       PoolTokenInfo;\n  depositAddress:              string;  \u002F\u002F contract to approve\u002Fsend to\n  isActive:                    boolean;\n  poolUrl?:                    string;\n  protocolUrl?:                string;\n  wrappedTokenGatewayAddress?: string; \u002F\u002F non-null for Aave native-token markets\n}\n\ninterface PoolTokenInfo {\n  symbol:   string;\n  name:     string;\n  address:  string;\n  decimals: number;\n  logoUrl?: string;\n}\n",[1365],{"type":43,"tag":79,"props":1366,"children":1367},{"__ignoreMap":76},[1368,1385,1411,1438,1459,1467,1474,1490,1516,1542,1569,1591,1618,1644,1666,1693,1714,1736,1758,1784,1792,1800,1817,1839,1860,1882,1903,1924],{"type":43,"tag":83,"props":1369,"children":1370},{"class":85,"line":86},[1371,1376,1381],{"type":43,"tag":83,"props":1372,"children":1373},{"style":1012},[1374],{"type":49,"value":1375},"interface",{"type":43,"tag":83,"props":1377,"children":1378},{"style":90},[1379],{"type":49,"value":1380}," GetEarnPoolsResponse",{"type":43,"tag":83,"props":1382,"children":1383},{"style":686},[1384],{"type":49,"value":1065},{"type":43,"tag":83,"props":1386,"children":1387},{"class":85,"line":146},[1388,1393,1397,1402,1407],{"type":43,"tag":83,"props":1389,"children":1390},{"style":1071},[1391],{"type":49,"value":1392},"  pools",{"type":43,"tag":83,"props":1394,"children":1395},{"style":686},[1396],{"type":49,"value":1079},{"type":43,"tag":83,"props":1398,"children":1399},{"style":90},[1400],{"type":49,"value":1401},"     EarnPool",{"type":43,"tag":83,"props":1403,"children":1404},{"style":655},[1405],{"type":49,"value":1406},"[]",{"type":43,"tag":83,"props":1408,"children":1409},{"style":686},[1410],{"type":49,"value":1300},{"type":43,"tag":83,"props":1412,"children":1413},{"class":85,"line":190},[1414,1419,1423,1428,1433],{"type":43,"tag":83,"props":1415,"children":1416},{"style":1071},[1417],{"type":49,"value":1418},"  timestamp",{"type":43,"tag":83,"props":1420,"children":1421},{"style":686},[1422],{"type":49,"value":1079},{"type":43,"tag":83,"props":1424,"children":1425},{"style":90},[1426],{"type":49,"value":1427}," string",{"type":43,"tag":83,"props":1429,"children":1430},{"style":686},[1431],{"type":49,"value":1432},";",{"type":43,"tag":83,"props":1434,"children":1435},{"style":140},[1436],{"type":49,"value":1437},"   \u002F\u002F ISO-8601 fetch time\n",{"type":43,"tag":83,"props":1439,"children":1440},{"class":85,"line":200},[1441,1446,1450,1455],{"type":43,"tag":83,"props":1442,"children":1443},{"style":1071},[1444],{"type":49,"value":1445},"  cached",{"type":43,"tag":83,"props":1447,"children":1448},{"style":686},[1449],{"type":49,"value":1079},{"type":43,"tag":83,"props":1451,"children":1452},{"style":90},[1453],{"type":49,"value":1454},"    boolean",{"type":43,"tag":83,"props":1456,"children":1457},{"style":686},[1458],{"type":49,"value":1300},{"type":43,"tag":83,"props":1460,"children":1461},{"class":85,"line":209},[1462],{"type":43,"tag":83,"props":1463,"children":1464},{"style":686},[1465],{"type":49,"value":1466},"}\n",{"type":43,"tag":83,"props":1468,"children":1469},{"class":85,"line":251},[1470],{"type":43,"tag":83,"props":1471,"children":1472},{"emptyLinePlaceholder":194},[1473],{"type":49,"value":197},{"type":43,"tag":83,"props":1475,"children":1476},{"class":85,"line":259},[1477,1481,1486],{"type":43,"tag":83,"props":1478,"children":1479},{"style":1012},[1480],{"type":49,"value":1375},{"type":43,"tag":83,"props":1482,"children":1483},{"style":90},[1484],{"type":49,"value":1485}," EarnPool",{"type":43,"tag":83,"props":1487,"children":1488},{"style":686},[1489],{"type":49,"value":1065},{"type":43,"tag":83,"props":1491,"children":1492},{"class":85,"line":268},[1493,1498,1502,1507,1511],{"type":43,"tag":83,"props":1494,"children":1495},{"style":1071},[1496],{"type":49,"value":1497},"  id",{"type":43,"tag":83,"props":1499,"children":1500},{"style":686},[1501],{"type":49,"value":1079},{"type":43,"tag":83,"props":1503,"children":1504},{"style":90},[1505],{"type":49,"value":1506},"                          string",{"type":43,"tag":83,"props":1508,"children":1509},{"style":686},[1510],{"type":49,"value":1432},{"type":43,"tag":83,"props":1512,"children":1513},{"style":140},[1514],{"type":49,"value":1515},"  \u002F\u002F \"{protocol}-{chainId}-{address}\"\n",{"type":43,"tag":83,"props":1517,"children":1518},{"class":85,"line":1303},[1519,1524,1528,1533,1537],{"type":43,"tag":83,"props":1520,"children":1521},{"style":1071},[1522],{"type":49,"value":1523},"  name",{"type":43,"tag":83,"props":1525,"children":1526},{"style":686},[1527],{"type":49,"value":1079},{"type":43,"tag":83,"props":1529,"children":1530},{"style":90},[1531],{"type":49,"value":1532},"                        string",{"type":43,"tag":83,"props":1534,"children":1535},{"style":686},[1536],{"type":49,"value":1432},{"type":43,"tag":83,"props":1538,"children":1539},{"style":140},[1540],{"type":49,"value":1541},"  \u002F\u002F e.g. \"USDC Market\"\n",{"type":43,"tag":83,"props":1543,"children":1545},{"class":85,"line":1544},10,[1546,1551,1555,1560,1564],{"type":43,"tag":83,"props":1547,"children":1548},{"style":1071},[1549],{"type":49,"value":1550},"  protocol",{"type":43,"tag":83,"props":1552,"children":1553},{"style":686},[1554],{"type":49,"value":1079},{"type":43,"tag":83,"props":1556,"children":1557},{"style":90},[1558],{"type":49,"value":1559},"                    string",{"type":43,"tag":83,"props":1561,"children":1562},{"style":686},[1563],{"type":49,"value":1432},{"type":43,"tag":83,"props":1565,"children":1566},{"style":140},[1567],{"type":49,"value":1568},"  \u002F\u002F \"Aave\" | \"Morpho\"\n",{"type":43,"tag":83,"props":1570,"children":1572},{"class":85,"line":1571},11,[1573,1578,1582,1587],{"type":43,"tag":83,"props":1574,"children":1575},{"style":1071},[1576],{"type":49,"value":1577},"  chainId",{"type":43,"tag":83,"props":1579,"children":1580},{"style":686},[1581],{"type":49,"value":1079},{"type":43,"tag":83,"props":1583,"children":1584},{"style":90},[1585],{"type":49,"value":1586},"                     number",{"type":43,"tag":83,"props":1588,"children":1589},{"style":686},[1590],{"type":49,"value":1300},{"type":43,"tag":83,"props":1592,"children":1594},{"class":85,"line":1593},12,[1595,1600,1604,1609,1613],{"type":43,"tag":83,"props":1596,"children":1597},{"style":1071},[1598],{"type":49,"value":1599},"  apy",{"type":43,"tag":83,"props":1601,"children":1602},{"style":686},[1603],{"type":49,"value":1079},{"type":43,"tag":83,"props":1605,"children":1606},{"style":90},[1607],{"type":49,"value":1608},"                         number",{"type":43,"tag":83,"props":1610,"children":1611},{"style":686},[1612],{"type":49,"value":1432},{"type":43,"tag":83,"props":1614,"children":1615},{"style":140},[1616],{"type":49,"value":1617},"  \u002F\u002F annualised yield as a percentage (e.g. 2.8 = 2.8% APY — NOT a decimal fraction)\n",{"type":43,"tag":83,"props":1619,"children":1621},{"class":85,"line":1620},13,[1622,1627,1631,1635,1639],{"type":43,"tag":83,"props":1623,"children":1624},{"style":1071},[1625],{"type":49,"value":1626},"  tvl",{"type":43,"tag":83,"props":1628,"children":1629},{"style":686},[1630],{"type":49,"value":1079},{"type":43,"tag":83,"props":1632,"children":1633},{"style":90},[1634],{"type":49,"value":1608},{"type":43,"tag":83,"props":1636,"children":1637},{"style":686},[1638],{"type":49,"value":1432},{"type":43,"tag":83,"props":1640,"children":1641},{"style":140},[1642],{"type":49,"value":1643},"  \u002F\u002F USD\n",{"type":43,"tag":83,"props":1645,"children":1647},{"class":85,"line":1646},14,[1648,1653,1657,1662],{"type":43,"tag":83,"props":1649,"children":1650},{"style":1071},[1651],{"type":49,"value":1652},"  token",{"type":43,"tag":83,"props":1654,"children":1655},{"style":686},[1656],{"type":49,"value":1079},{"type":43,"tag":83,"props":1658,"children":1659},{"style":90},[1660],{"type":49,"value":1661},"                       PoolTokenInfo",{"type":43,"tag":83,"props":1663,"children":1664},{"style":686},[1665],{"type":49,"value":1300},{"type":43,"tag":83,"props":1667,"children":1669},{"class":85,"line":1668},15,[1670,1675,1679,1684,1688],{"type":43,"tag":83,"props":1671,"children":1672},{"style":1071},[1673],{"type":49,"value":1674},"  depositAddress",{"type":43,"tag":83,"props":1676,"children":1677},{"style":686},[1678],{"type":49,"value":1079},{"type":43,"tag":83,"props":1680,"children":1681},{"style":90},[1682],{"type":49,"value":1683},"              string",{"type":43,"tag":83,"props":1685,"children":1686},{"style":686},[1687],{"type":49,"value":1432},{"type":43,"tag":83,"props":1689,"children":1690},{"style":140},[1691],{"type":49,"value":1692},"  \u002F\u002F contract to approve\u002Fsend to\n",{"type":43,"tag":83,"props":1694,"children":1695},{"class":85,"line":30},[1696,1701,1705,1710],{"type":43,"tag":83,"props":1697,"children":1698},{"style":1071},[1699],{"type":49,"value":1700},"  isActive",{"type":43,"tag":83,"props":1702,"children":1703},{"style":686},[1704],{"type":49,"value":1079},{"type":43,"tag":83,"props":1706,"children":1707},{"style":90},[1708],{"type":49,"value":1709},"                    boolean",{"type":43,"tag":83,"props":1711,"children":1712},{"style":686},[1713],{"type":49,"value":1300},{"type":43,"tag":83,"props":1715,"children":1717},{"class":85,"line":1716},17,[1718,1723,1728,1732],{"type":43,"tag":83,"props":1719,"children":1720},{"style":1071},[1721],{"type":49,"value":1722},"  poolUrl",{"type":43,"tag":83,"props":1724,"children":1725},{"style":686},[1726],{"type":49,"value":1727},"?:",{"type":43,"tag":83,"props":1729,"children":1730},{"style":90},[1731],{"type":49,"value":1559},{"type":43,"tag":83,"props":1733,"children":1734},{"style":686},[1735],{"type":49,"value":1300},{"type":43,"tag":83,"props":1737,"children":1739},{"class":85,"line":1738},18,[1740,1745,1749,1754],{"type":43,"tag":83,"props":1741,"children":1742},{"style":1071},[1743],{"type":49,"value":1744},"  protocolUrl",{"type":43,"tag":83,"props":1746,"children":1747},{"style":686},[1748],{"type":49,"value":1727},{"type":43,"tag":83,"props":1750,"children":1751},{"style":90},[1752],{"type":49,"value":1753},"                string",{"type":43,"tag":83,"props":1755,"children":1756},{"style":686},[1757],{"type":49,"value":1300},{"type":43,"tag":83,"props":1759,"children":1761},{"class":85,"line":1760},19,[1762,1767,1771,1775,1779],{"type":43,"tag":83,"props":1763,"children":1764},{"style":1071},[1765],{"type":49,"value":1766},"  wrappedTokenGatewayAddress",{"type":43,"tag":83,"props":1768,"children":1769},{"style":686},[1770],{"type":49,"value":1727},{"type":43,"tag":83,"props":1772,"children":1773},{"style":90},[1774],{"type":49,"value":1427},{"type":43,"tag":83,"props":1776,"children":1777},{"style":686},[1778],{"type":49,"value":1432},{"type":43,"tag":83,"props":1780,"children":1781},{"style":140},[1782],{"type":49,"value":1783}," \u002F\u002F non-null for Aave native-token markets\n",{"type":43,"tag":83,"props":1785,"children":1787},{"class":85,"line":1786},20,[1788],{"type":43,"tag":83,"props":1789,"children":1790},{"style":686},[1791],{"type":49,"value":1466},{"type":43,"tag":83,"props":1793,"children":1795},{"class":85,"line":1794},21,[1796],{"type":43,"tag":83,"props":1797,"children":1798},{"emptyLinePlaceholder":194},[1799],{"type":49,"value":197},{"type":43,"tag":83,"props":1801,"children":1803},{"class":85,"line":1802},22,[1804,1808,1813],{"type":43,"tag":83,"props":1805,"children":1806},{"style":1012},[1807],{"type":49,"value":1375},{"type":43,"tag":83,"props":1809,"children":1810},{"style":90},[1811],{"type":49,"value":1812}," PoolTokenInfo",{"type":43,"tag":83,"props":1814,"children":1815},{"style":686},[1816],{"type":49,"value":1065},{"type":43,"tag":83,"props":1818,"children":1820},{"class":85,"line":1819},23,[1821,1826,1830,1835],{"type":43,"tag":83,"props":1822,"children":1823},{"style":1071},[1824],{"type":49,"value":1825},"  symbol",{"type":43,"tag":83,"props":1827,"children":1828},{"style":686},[1829],{"type":49,"value":1079},{"type":43,"tag":83,"props":1831,"children":1832},{"style":90},[1833],{"type":49,"value":1834},"   string",{"type":43,"tag":83,"props":1836,"children":1837},{"style":686},[1838],{"type":49,"value":1300},{"type":43,"tag":83,"props":1840,"children":1842},{"class":85,"line":1841},24,[1843,1847,1851,1856],{"type":43,"tag":83,"props":1844,"children":1845},{"style":1071},[1846],{"type":49,"value":1523},{"type":43,"tag":83,"props":1848,"children":1849},{"style":686},[1850],{"type":49,"value":1079},{"type":43,"tag":83,"props":1852,"children":1853},{"style":90},[1854],{"type":49,"value":1855},"     string",{"type":43,"tag":83,"props":1857,"children":1858},{"style":686},[1859],{"type":49,"value":1300},{"type":43,"tag":83,"props":1861,"children":1863},{"class":85,"line":1862},25,[1864,1869,1873,1878],{"type":43,"tag":83,"props":1865,"children":1866},{"style":1071},[1867],{"type":49,"value":1868},"  address",{"type":43,"tag":83,"props":1870,"children":1871},{"style":686},[1872],{"type":49,"value":1079},{"type":43,"tag":83,"props":1874,"children":1875},{"style":90},[1876],{"type":49,"value":1877},"  string",{"type":43,"tag":83,"props":1879,"children":1880},{"style":686},[1881],{"type":49,"value":1300},{"type":43,"tag":83,"props":1883,"children":1884},{"class":85,"line":26},[1885,1890,1894,1899],{"type":43,"tag":83,"props":1886,"children":1887},{"style":1071},[1888],{"type":49,"value":1889},"  decimals",{"type":43,"tag":83,"props":1891,"children":1892},{"style":686},[1893],{"type":49,"value":1079},{"type":43,"tag":83,"props":1895,"children":1896},{"style":90},[1897],{"type":49,"value":1898}," number",{"type":43,"tag":83,"props":1900,"children":1901},{"style":686},[1902],{"type":49,"value":1300},{"type":43,"tag":83,"props":1904,"children":1906},{"class":85,"line":1905},27,[1907,1912,1916,1920],{"type":43,"tag":83,"props":1908,"children":1909},{"style":1071},[1910],{"type":49,"value":1911},"  logoUrl",{"type":43,"tag":83,"props":1913,"children":1914},{"style":686},[1915],{"type":49,"value":1727},{"type":43,"tag":83,"props":1917,"children":1918},{"style":90},[1919],{"type":49,"value":1427},{"type":43,"tag":83,"props":1921,"children":1922},{"style":686},[1923],{"type":49,"value":1300},{"type":43,"tag":83,"props":1925,"children":1927},{"class":85,"line":1926},28,[1928],{"type":43,"tag":83,"props":1929,"children":1930},{"style":686},[1931],{"type":49,"value":1466},{"type":43,"tag":1933,"props":1934,"children":1935},"blockquote",{},[1936],{"type":43,"tag":59,"props":1937,"children":1938},{},[1939,1944,1946,1952,1954,1960],{"type":43,"tag":63,"props":1940,"children":1941},{},[1942],{"type":49,"value":1943},"Tip:",{"type":49,"value":1945}," ",{"type":43,"tag":79,"props":1947,"children":1949},{"className":1948},[],[1950],{"type":49,"value":1951},"wrappedTokenGatewayAddress",{"type":49,"value":1953}," is set on Aave markets that accept a wrapped native token (WPOL, WETH). Pass this address instead of ",{"type":43,"tag":79,"props":1955,"children":1957},{"className":1956},[],[1958],{"type":49,"value":1959},"depositAddress",{"type":49,"value":1961}," when depositing POL\u002FETH directly.",{"type":43,"tag":622,"props":1963,"children":1965},{"id":1964},"current-trails-earn-surface-yield-api",[1966],{"type":49,"value":1967},"Current Trails earn surface (Yield API)",{"type":43,"tag":59,"props":1969,"children":1970},{},[1971,1976,1978,1984,1986,1991,1993,1999,2000,2006,2007,2013,2014,2020,2022,2028,2030,2036,2038,2043,2045,2050],{"type":43,"tag":79,"props":1972,"children":1974},{"className":1973},[],[1975],{"type":49,"value":953},{"type":49,"value":1977}," is the endpoint the CLI's ",{"type":43,"tag":79,"props":1979,"children":1981},{"className":1980},[],[1982],{"type":49,"value":1983},"deposit",{"type":49,"value":1985}," command uses today and it remains live, but Trails' current generation earn surface is the ",{"type":43,"tag":63,"props":1987,"children":1988},{},[1989],{"type":49,"value":1990},"Yield API",{"type":49,"value":1992}," at the same base URL: ",{"type":43,"tag":79,"props":1994,"children":1996},{"className":1995},[],[1997],{"type":49,"value":1998},"YieldGetMarkets",{"type":49,"value":566},{"type":43,"tag":79,"props":2001,"children":2003},{"className":2002},[],[2004],{"type":49,"value":2005},"YieldGetProviders",{"type":49,"value":566},{"type":43,"tag":79,"props":2008,"children":2010},{"className":2009},[],[2011],{"type":49,"value":2012},"YieldCreateEnterAction",{"type":49,"value":566},{"type":43,"tag":79,"props":2015,"children":2017},{"className":2016},[],[2018],{"type":49,"value":2019},"YieldCreateExitAction",{"type":49,"value":2021},", and ",{"type":43,"tag":79,"props":2023,"children":2025},{"className":2024},[],[2026],{"type":49,"value":2027},"YieldGetAggregateBalances",{"type":49,"value":2029}," (docs: ",{"type":43,"tag":939,"props":2031,"children":2034},{"href":2032,"rel":2033},"https:\u002F\u002Fdocs.trails.build",[943],[2035],{"type":49,"value":2032},{"type":49,"value":2037},"). Query ",{"type":43,"tag":79,"props":2039,"children":2041},{"className":2040},[],[2042],{"type":49,"value":1998},{"type":49,"value":2044}," when you need markets beyond the Aave and Morpho pools that ",{"type":43,"tag":79,"props":2046,"children":2048},{"className":2047},[],[2049],{"type":49,"value":953},{"type":49,"value":2051}," returns:",{"type":43,"tag":71,"props":2053,"children":2055},{"className":73,"code":2054,"language":75,"meta":76,"style":76},"curl --request POST \\\n  --url https:\u002F\u002Ftrails-api.sequence.app\u002Frpc\u002FTrails\u002FYieldGetMarkets \\\n  --header 'Content-Type: application\u002Fjson' \\\n  --header \"X-Access-Key: $TRAILS_API_KEY\" \\\n  --data '{}'\n",[2056],{"type":43,"tag":79,"props":2057,"children":2058},{"__ignoreMap":76},[2059,2078,2094,2117,2144],{"type":43,"tag":83,"props":2060,"children":2061},{"class":85,"line":86},[2062,2066,2070,2074],{"type":43,"tag":83,"props":2063,"children":2064},{"style":90},[2065],{"type":49,"value":642},{"type":43,"tag":83,"props":2067,"children":2068},{"style":96},[2069],{"type":49,"value":647},{"type":43,"tag":83,"props":2071,"children":2072},{"style":96},[2073],{"type":49,"value":652},{"type":43,"tag":83,"props":2075,"children":2076},{"style":655},[2077],{"type":49,"value":658},{"type":43,"tag":83,"props":2079,"children":2080},{"class":85,"line":146},[2081,2085,2090],{"type":43,"tag":83,"props":2082,"children":2083},{"style":96},[2084],{"type":49,"value":666},{"type":43,"tag":83,"props":2086,"children":2087},{"style":96},[2088],{"type":49,"value":2089}," https:\u002F\u002Ftrails-api.sequence.app\u002Frpc\u002FTrails\u002FYieldGetMarkets",{"type":43,"tag":83,"props":2091,"children":2092},{"style":655},[2093],{"type":49,"value":658},{"type":43,"tag":83,"props":2095,"children":2096},{"class":85,"line":190},[2097,2101,2105,2109,2113],{"type":43,"tag":83,"props":2098,"children":2099},{"style":96},[2100],{"type":49,"value":683},{"type":43,"tag":83,"props":2102,"children":2103},{"style":686},[2104],{"type":49,"value":689},{"type":43,"tag":83,"props":2106,"children":2107},{"style":96},[2108],{"type":49,"value":694},{"type":43,"tag":83,"props":2110,"children":2111},{"style":686},[2112],{"type":49,"value":699},{"type":43,"tag":83,"props":2114,"children":2115},{"style":655},[2116],{"type":49,"value":658},{"type":43,"tag":83,"props":2118,"children":2119},{"class":85,"line":200},[2120,2124,2128,2132,2136,2140],{"type":43,"tag":83,"props":2121,"children":2122},{"style":96},[2123],{"type":49,"value":683},{"type":43,"tag":83,"props":2125,"children":2126},{"style":686},[2127],{"type":49,"value":715},{"type":43,"tag":83,"props":2129,"children":2130},{"style":96},[2131],{"type":49,"value":720},{"type":43,"tag":83,"props":2133,"children":2134},{"style":655},[2135],{"type":49,"value":725},{"type":43,"tag":83,"props":2137,"children":2138},{"style":686},[2139],{"type":49,"value":730},{"type":43,"tag":83,"props":2141,"children":2142},{"style":655},[2143],{"type":49,"value":658},{"type":43,"tag":83,"props":2145,"children":2146},{"class":85,"line":209},[2147,2151,2155,2160],{"type":43,"tag":83,"props":2148,"children":2149},{"style":96},[2150],{"type":49,"value":742},{"type":43,"tag":83,"props":2152,"children":2153},{"style":686},[2154],{"type":49,"value":689},{"type":43,"tag":83,"props":2156,"children":2157},{"style":96},[2158],{"type":49,"value":2159},"{}",{"type":43,"tag":83,"props":2161,"children":2162},{"style":686},[2163],{"type":49,"value":756},{"type":43,"tag":59,"props":2165,"children":2166},{},[2167,2169,2175,2177,2183,2185,2191],{"type":49,"value":2168},"The response is ",{"type":43,"tag":79,"props":2170,"children":2172},{"className":2171},[],[2173],{"type":49,"value":2174},"{ items: [...] }",{"type":49,"value":2176}," with per-market ",{"type":43,"tag":79,"props":2178,"children":2180},{"className":2179},[],[2181],{"type":49,"value":2182},"inputTokens",{"type":49,"value":2184},", provider, and network fields. Note that Trails' intent protocol is now v1.5 (HydrateProxy executor); the API still serves the v1 flow that ",{"type":43,"tag":79,"props":2186,"children":2188},{"className":2187},[],[2189],{"type":49,"value":2190},"agent swap",{"type":49,"value":2192}," uses, so existing commands are unaffected.",{"type":43,"tag":119,"props":2194,"children":2195},{},[],{"type":43,"tag":52,"props":2197,"children":2199},{"id":2198},"deposit-to-earn-yield",[2200],{"type":49,"value":2201},"Deposit to Earn Yield",{"type":43,"tag":59,"props":2203,"children":2204},{},[2205,2207,2213],{"type":49,"value":2206},"Pool discovery uses ",{"type":43,"tag":79,"props":2208,"children":2210},{"className":2209},[],[2211],{"type":49,"value":2212},"TrailsApi.getEarnPools",{"type":49,"value":2214}," — picks the most liquid pool (highest TVL) for the asset on the requested chain. No hardcoded addresses — the pool is resolved at runtime. Supported chains: Polygon, Base, Arbitrum, Optimism, Ethereum mainnet (any chain Trails indexes).",{"type":43,"tag":59,"props":2216,"children":2217},{},[2218,2223],{"type":43,"tag":63,"props":2219,"children":2220},{},[2221],{"type":49,"value":2222},"Gas requirement:",{"type":49,"value":2224}," The relayer pays gas in USDC or POL, whichever the wallet can afford — so the only requirement is that the wallet holds the funds being deposited plus a little POL or USDC for gas. The CLI always reserves 0.1 USDC for gas — never deposit the full balance. If the requested amount would leave less than 0.1 USDC, the CLI auto-reduces the deposit and prints a note.",{"type":43,"tag":59,"props":2226,"children":2227},{},[2228],{"type":49,"value":2229},"The embedded wallet can call any contract, so deposits work without pre-authorizing the token or pool contract — just dry-run, then broadcast:",{"type":43,"tag":71,"props":2231,"children":2233},{"className":73,"code":2232,"language":75,"meta":76,"style":76},"# Dry-run — shows pool name, APY, TVL, and deposit address before committing\nagent deposit --asset USDC --amount 0.3\n\n# Execute — deposits into the highest-TVL active pool\nagent deposit --asset USDC --amount 0.3 --broadcast\n\n# Filter by protocol\nagent deposit --asset USDC --amount 0.3 --protocol aave --broadcast\nagent deposit --asset USDC --amount 0.3 --protocol morpho --broadcast\n",[2234],{"type":43,"tag":79,"props":2235,"children":2236},{"__ignoreMap":76},[2237,2245,2275,2282,2290,2322,2329,2337,2378],{"type":43,"tag":83,"props":2238,"children":2239},{"class":85,"line":86},[2240],{"type":43,"tag":83,"props":2241,"children":2242},{"style":140},[2243],{"type":49,"value":2244},"# Dry-run — shows pool name, APY, TVL, and deposit address before committing\n",{"type":43,"tag":83,"props":2246,"children":2247},{"class":85,"line":146},[2248,2252,2257,2262,2266,2270],{"type":43,"tag":83,"props":2249,"children":2250},{"style":90},[2251],{"type":49,"value":93},{"type":43,"tag":83,"props":2253,"children":2254},{"style":96},[2255],{"type":49,"value":2256}," deposit",{"type":43,"tag":83,"props":2258,"children":2259},{"style":96},[2260],{"type":49,"value":2261}," --asset",{"type":43,"tag":83,"props":2263,"children":2264},{"style":96},[2265],{"type":49,"value":166},{"type":43,"tag":83,"props":2267,"children":2268},{"style":96},[2269],{"type":49,"value":181},{"type":43,"tag":83,"props":2271,"children":2272},{"style":184},[2273],{"type":49,"value":2274}," 0.3\n",{"type":43,"tag":83,"props":2276,"children":2277},{"class":85,"line":190},[2278],{"type":43,"tag":83,"props":2279,"children":2280},{"emptyLinePlaceholder":194},[2281],{"type":49,"value":197},{"type":43,"tag":83,"props":2283,"children":2284},{"class":85,"line":200},[2285],{"type":43,"tag":83,"props":2286,"children":2287},{"style":140},[2288],{"type":49,"value":2289},"# Execute — deposits into the highest-TVL active pool\n",{"type":43,"tag":83,"props":2291,"children":2292},{"class":85,"line":209},[2293,2297,2301,2305,2309,2313,2318],{"type":43,"tag":83,"props":2294,"children":2295},{"style":90},[2296],{"type":49,"value":93},{"type":43,"tag":83,"props":2298,"children":2299},{"style":96},[2300],{"type":49,"value":2256},{"type":43,"tag":83,"props":2302,"children":2303},{"style":96},[2304],{"type":49,"value":2261},{"type":43,"tag":83,"props":2306,"children":2307},{"style":96},[2308],{"type":49,"value":166},{"type":43,"tag":83,"props":2310,"children":2311},{"style":96},[2312],{"type":49,"value":181},{"type":43,"tag":83,"props":2314,"children":2315},{"style":184},[2316],{"type":49,"value":2317}," 0.3",{"type":43,"tag":83,"props":2319,"children":2320},{"style":96},[2321],{"type":49,"value":248},{"type":43,"tag":83,"props":2323,"children":2324},{"class":85,"line":251},[2325],{"type":43,"tag":83,"props":2326,"children":2327},{"emptyLinePlaceholder":194},[2328],{"type":49,"value":197},{"type":43,"tag":83,"props":2330,"children":2331},{"class":85,"line":259},[2332],{"type":43,"tag":83,"props":2333,"children":2334},{"style":140},[2335],{"type":49,"value":2336},"# Filter by protocol\n",{"type":43,"tag":83,"props":2338,"children":2339},{"class":85,"line":268},[2340,2344,2348,2352,2356,2360,2364,2369,2374],{"type":43,"tag":83,"props":2341,"children":2342},{"style":90},[2343],{"type":49,"value":93},{"type":43,"tag":83,"props":2345,"children":2346},{"style":96},[2347],{"type":49,"value":2256},{"type":43,"tag":83,"props":2349,"children":2350},{"style":96},[2351],{"type":49,"value":2261},{"type":43,"tag":83,"props":2353,"children":2354},{"style":96},[2355],{"type":49,"value":166},{"type":43,"tag":83,"props":2357,"children":2358},{"style":96},[2359],{"type":49,"value":181},{"type":43,"tag":83,"props":2361,"children":2362},{"style":184},[2363],{"type":49,"value":2317},{"type":43,"tag":83,"props":2365,"children":2366},{"style":96},[2367],{"type":49,"value":2368}," --protocol",{"type":43,"tag":83,"props":2370,"children":2371},{"style":96},[2372],{"type":49,"value":2373}," aave",{"type":43,"tag":83,"props":2375,"children":2376},{"style":96},[2377],{"type":49,"value":248},{"type":43,"tag":83,"props":2379,"children":2380},{"class":85,"line":1303},[2381,2385,2389,2393,2397,2401,2405,2409,2414],{"type":43,"tag":83,"props":2382,"children":2383},{"style":90},[2384],{"type":49,"value":93},{"type":43,"tag":83,"props":2386,"children":2387},{"style":96},[2388],{"type":49,"value":2256},{"type":43,"tag":83,"props":2390,"children":2391},{"style":96},[2392],{"type":49,"value":2261},{"type":43,"tag":83,"props":2394,"children":2395},{"style":96},[2396],{"type":49,"value":166},{"type":43,"tag":83,"props":2398,"children":2399},{"style":96},[2400],{"type":49,"value":181},{"type":43,"tag":83,"props":2402,"children":2403},{"style":184},[2404],{"type":49,"value":2317},{"type":43,"tag":83,"props":2406,"children":2407},{"style":96},[2408],{"type":49,"value":2368},{"type":43,"tag":83,"props":2410,"children":2411},{"style":96},[2412],{"type":49,"value":2413}," morpho",{"type":43,"tag":83,"props":2415,"children":2416},{"style":96},[2417],{"type":49,"value":248},{"type":43,"tag":622,"props":2419,"children":2421},{"id":2420},"supported-protocols",[2422],{"type":49,"value":2423},"Supported Protocols",{"type":43,"tag":763,"props":2425,"children":2426},{},[2427,2447],{"type":43,"tag":767,"props":2428,"children":2429},{},[2430],{"type":43,"tag":771,"props":2431,"children":2432},{},[2433,2438,2443],{"type":43,"tag":775,"props":2434,"children":2435},{},[2436],{"type":49,"value":2437},"Protocol",{"type":43,"tag":775,"props":2439,"children":2440},{},[2441],{"type":49,"value":2442},"Encoding",{"type":43,"tag":775,"props":2444,"children":2445},{},[2446],{"type":49,"value":789},{"type":43,"tag":791,"props":2448,"children":2449},{},[2450,2475],{"type":43,"tag":771,"props":2451,"children":2452},{},[2453,2461,2470],{"type":43,"tag":798,"props":2454,"children":2455},{},[2456],{"type":43,"tag":63,"props":2457,"children":2458},{},[2459],{"type":49,"value":2460},"Aave v3",{"type":43,"tag":798,"props":2462,"children":2463},{},[2464],{"type":43,"tag":79,"props":2465,"children":2467},{"className":2466},[],[2468],{"type":49,"value":2469},"supply(asset, amount, onBehalfOf, referralCode)",{"type":43,"tag":798,"props":2471,"children":2472},{},[2473],{"type":49,"value":2474},"Lending pool deposit",{"type":43,"tag":771,"props":2476,"children":2477},{},[2478,2486,2497],{"type":43,"tag":798,"props":2479,"children":2480},{},[2481],{"type":43,"tag":63,"props":2482,"children":2483},{},[2484],{"type":49,"value":2485},"Morpho",{"type":43,"tag":798,"props":2487,"children":2488},{},[2489,2495],{"type":43,"tag":79,"props":2490,"children":2492},{"className":2491},[],[2493],{"type":49,"value":2494},"deposit(assets, receiver)",{"type":49,"value":2496}," — ERC-4626",{"type":43,"tag":798,"props":2498,"children":2499},{},[2500],{"type":49,"value":2501},"Vault deposit",{"type":43,"tag":59,"props":2503,"children":2504},{},[2505,2507,2512],{"type":49,"value":2506},"Vault\u002Fpool addresses are resolved dynamically from Trails — they are not hardcoded. The dry-run output includes ",{"type":43,"tag":79,"props":2508,"children":2510},{"className":2509},[],[2511],{"type":49,"value":1959},{"type":49,"value":2513}," so you can inspect the exact contract before broadcasting.",{"type":43,"tag":52,"props":2515,"children":2517},{"id":2516},"withdraw-aave-atoken-or-erc-4626-vault",[2518],{"type":49,"value":2519},"Withdraw (Aave aToken or ERC-4626 vault)",{"type":43,"tag":59,"props":2521,"children":2522},{},[2523,2525,2530,2532,2537,2539,2544,2546,2551,2553,2559,2561,2567],{"type":49,"value":2524},"Pass the ",{"type":43,"tag":63,"props":2526,"children":2527},{},[2528],{"type":49,"value":2529},"position token",{"type":49,"value":2531}," you hold: an ",{"type":43,"tag":63,"props":2533,"children":2534},{},[2535],{"type":49,"value":2536},"Aave aToken",{"type":49,"value":2538}," address, or a ",{"type":43,"tag":63,"props":2540,"children":2541},{},[2542],{"type":49,"value":2543},"Morpho \u002F ERC-4626 vault",{"type":49,"value":2545}," (share) address. The CLI resolves the Aave ",{"type":43,"tag":63,"props":2547,"children":2548},{},[2549],{"type":49,"value":2550},"Pool",{"type":49,"value":2552}," via ",{"type":43,"tag":79,"props":2554,"children":2556},{"className":2555},[],[2557],{"type":49,"value":2558},"POOL()",{"type":49,"value":2560}," on the aToken, or uses ",{"type":43,"tag":79,"props":2562,"children":2564},{"className":2563},[],[2565],{"type":49,"value":2566},"redeem",{"type":49,"value":2568}," on the vault. Dry-run by default.",{"type":43,"tag":71,"props":2570,"children":2572},{"className":73,"code":2571,"language":75,"meta":76,"style":76},"# Full exit from an Aave position (aToken from balances output)\nagent withdraw --position 0x68215b6533c47ff9f7125ac95adf00fe4a62f79e --amount max --chain mainnet\n\n# Partial Aave withdraw (underlying units, e.g. USDC)\nagent withdraw --position \u003CaToken> --amount 0.5 --chain mainnet --broadcast\n\n# ERC-4626: max redeems all shares; partial amount is underlying units (convertToShares)\nagent withdraw --position \u003Cvault> --amount max --chain polygon --broadcast\n",[2573],{"type":43,"tag":79,"props":2574,"children":2575},{"__ignoreMap":76},[2576,2584,2625,2632,2640,2695,2702,2710],{"type":43,"tag":83,"props":2577,"children":2578},{"class":85,"line":86},[2579],{"type":43,"tag":83,"props":2580,"children":2581},{"style":140},[2582],{"type":49,"value":2583},"# Full exit from an Aave position (aToken from balances output)\n",{"type":43,"tag":83,"props":2585,"children":2586},{"class":85,"line":146},[2587,2591,2596,2601,2606,2610,2615,2620],{"type":43,"tag":83,"props":2588,"children":2589},{"style":90},[2590],{"type":49,"value":93},{"type":43,"tag":83,"props":2592,"children":2593},{"style":96},[2594],{"type":49,"value":2595}," withdraw",{"type":43,"tag":83,"props":2597,"children":2598},{"style":96},[2599],{"type":49,"value":2600}," --position",{"type":43,"tag":83,"props":2602,"children":2603},{"style":184},[2604],{"type":49,"value":2605}," 0x68215b6533c47ff9f7125ac95adf00fe4a62f79e",{"type":43,"tag":83,"props":2607,"children":2608},{"style":96},[2609],{"type":49,"value":181},{"type":43,"tag":83,"props":2611,"children":2612},{"style":96},[2613],{"type":49,"value":2614}," max",{"type":43,"tag":83,"props":2616,"children":2617},{"style":96},[2618],{"type":49,"value":2619}," --chain",{"type":43,"tag":83,"props":2621,"children":2622},{"style":96},[2623],{"type":49,"value":2624}," mainnet\n",{"type":43,"tag":83,"props":2626,"children":2627},{"class":85,"line":190},[2628],{"type":43,"tag":83,"props":2629,"children":2630},{"emptyLinePlaceholder":194},[2631],{"type":49,"value":197},{"type":43,"tag":83,"props":2633,"children":2634},{"class":85,"line":200},[2635],{"type":43,"tag":83,"props":2636,"children":2637},{"style":140},[2638],{"type":49,"value":2639},"# Partial Aave withdraw (underlying units, e.g. USDC)\n",{"type":43,"tag":83,"props":2641,"children":2642},{"class":85,"line":209},[2643,2647,2651,2655,2660,2665,2670,2675,2679,2683,2687,2691],{"type":43,"tag":83,"props":2644,"children":2645},{"style":90},[2646],{"type":49,"value":93},{"type":43,"tag":83,"props":2648,"children":2649},{"style":96},[2650],{"type":49,"value":2595},{"type":43,"tag":83,"props":2652,"children":2653},{"style":96},[2654],{"type":49,"value":2600},{"type":43,"tag":83,"props":2656,"children":2657},{"style":686},[2658],{"type":49,"value":2659}," \u003C",{"type":43,"tag":83,"props":2661,"children":2662},{"style":96},[2663],{"type":49,"value":2664},"aToke",{"type":43,"tag":83,"props":2666,"children":2667},{"style":655},[2668],{"type":49,"value":2669},"n",{"type":43,"tag":83,"props":2671,"children":2672},{"style":686},[2673],{"type":49,"value":2674},">",{"type":43,"tag":83,"props":2676,"children":2677},{"style":96},[2678],{"type":49,"value":181},{"type":43,"tag":83,"props":2680,"children":2681},{"style":184},[2682],{"type":49,"value":372},{"type":43,"tag":83,"props":2684,"children":2685},{"style":96},[2686],{"type":49,"value":2619},{"type":43,"tag":83,"props":2688,"children":2689},{"style":96},[2690],{"type":49,"value":542},{"type":43,"tag":83,"props":2692,"children":2693},{"style":96},[2694],{"type":49,"value":248},{"type":43,"tag":83,"props":2696,"children":2697},{"class":85,"line":251},[2698],{"type":43,"tag":83,"props":2699,"children":2700},{"emptyLinePlaceholder":194},[2701],{"type":49,"value":197},{"type":43,"tag":83,"props":2703,"children":2704},{"class":85,"line":259},[2705],{"type":43,"tag":83,"props":2706,"children":2707},{"style":140},[2708],{"type":49,"value":2709},"# ERC-4626: max redeems all shares; partial amount is underlying units (convertToShares)\n",{"type":43,"tag":83,"props":2711,"children":2712},{"class":85,"line":268},[2713,2717,2721,2725,2729,2734,2739,2743,2747,2751,2755,2760],{"type":43,"tag":83,"props":2714,"children":2715},{"style":90},[2716],{"type":49,"value":93},{"type":43,"tag":83,"props":2718,"children":2719},{"style":96},[2720],{"type":49,"value":2595},{"type":43,"tag":83,"props":2722,"children":2723},{"style":96},[2724],{"type":49,"value":2600},{"type":43,"tag":83,"props":2726,"children":2727},{"style":686},[2728],{"type":49,"value":2659},{"type":43,"tag":83,"props":2730,"children":2731},{"style":96},[2732],{"type":49,"value":2733},"vaul",{"type":43,"tag":83,"props":2735,"children":2736},{"style":655},[2737],{"type":49,"value":2738},"t",{"type":43,"tag":83,"props":2740,"children":2741},{"style":686},[2742],{"type":49,"value":2674},{"type":43,"tag":83,"props":2744,"children":2745},{"style":96},[2746],{"type":49,"value":181},{"type":43,"tag":83,"props":2748,"children":2749},{"style":96},[2750],{"type":49,"value":2614},{"type":43,"tag":83,"props":2752,"children":2753},{"style":96},[2754],{"type":49,"value":2619},{"type":43,"tag":83,"props":2756,"children":2757},{"style":96},[2758],{"type":49,"value":2759}," polygon",{"type":43,"tag":83,"props":2761,"children":2762},{"style":96},[2763],{"type":49,"value":248},{"type":43,"tag":59,"props":2765,"children":2766},{},[2767,2769,2775,2777,2783],{"type":49,"value":2768},"The embedded wallet can call the pool or vault on any chain, so no contract authorization is needed — just make sure the wallet holds a little POL or USDC on that chain for gas. To withdraw on a chain other than Polygon, pass ",{"type":43,"tag":79,"props":2770,"children":2772},{"className":2771},[],[2773],{"type":49,"value":2774},"--chain mainnet",{"type":49,"value":2776}," (or another supported chain) on the ",{"type":43,"tag":79,"props":2778,"children":2780},{"className":2779},[],[2781],{"type":49,"value":2782},"withdraw",{"type":49,"value":2784}," command itself.",{"type":43,"tag":119,"props":2786,"children":2787},{},[],{"type":43,"tag":52,"props":2789,"children":2791},{"id":2790},"full-defi-flow-example",[2792],{"type":49,"value":2793},"Full DeFi Flow Example",{"type":43,"tag":71,"props":2795,"children":2797},{"className":73,"code":2796,"language":75,"meta":76,"style":76},"# 1. Check balances\nagent balances\n\n# 2. Swap POL → USDC\nagent swap --from POL --to USDC --amount 1 --broadcast\n\n# 3. Deposit USDC into highest-TVL yield pool\nagent deposit --asset USDC --amount 1 --broadcast\n# → protocol: morpho (or aave, whichever has highest TVL at the time)\n# → poolApy shown in dry-run output\n\n# 4. Bridge remaining USDC to Arbitrum\nagent swap --from USDC --to USDC --amount 0.5 --to-chain arbitrum --broadcast\n",[2798],{"type":43,"tag":79,"props":2799,"children":2800},{"__ignoreMap":76},[2801,2809,2821,2828,2836,2876,2883,2891,2922,2930,2938,2945,2953],{"type":43,"tag":83,"props":2802,"children":2803},{"class":85,"line":86},[2804],{"type":43,"tag":83,"props":2805,"children":2806},{"style":140},[2807],{"type":49,"value":2808},"# 1. Check balances\n",{"type":43,"tag":83,"props":2810,"children":2811},{"class":85,"line":146},[2812,2816],{"type":43,"tag":83,"props":2813,"children":2814},{"style":90},[2815],{"type":49,"value":93},{"type":43,"tag":83,"props":2817,"children":2818},{"style":96},[2819],{"type":49,"value":2820}," balances\n",{"type":43,"tag":83,"props":2822,"children":2823},{"class":85,"line":190},[2824],{"type":43,"tag":83,"props":2825,"children":2826},{"emptyLinePlaceholder":194},[2827],{"type":49,"value":197},{"type":43,"tag":83,"props":2829,"children":2830},{"class":85,"line":200},[2831],{"type":43,"tag":83,"props":2832,"children":2833},{"style":140},[2834],{"type":49,"value":2835},"# 2. Swap POL → USDC\n",{"type":43,"tag":83,"props":2837,"children":2838},{"class":85,"line":209},[2839,2843,2847,2851,2856,2860,2864,2868,2872],{"type":43,"tag":83,"props":2840,"children":2841},{"style":90},[2842],{"type":49,"value":93},{"type":43,"tag":83,"props":2844,"children":2845},{"style":96},[2846],{"type":49,"value":156},{"type":43,"tag":83,"props":2848,"children":2849},{"style":96},[2850],{"type":49,"value":161},{"type":43,"tag":83,"props":2852,"children":2853},{"style":96},[2854],{"type":49,"value":2855}," POL",{"type":43,"tag":83,"props":2857,"children":2858},{"style":96},[2859],{"type":49,"value":171},{"type":43,"tag":83,"props":2861,"children":2862},{"style":96},[2863],{"type":49,"value":166},{"type":43,"tag":83,"props":2865,"children":2866},{"style":96},[2867],{"type":49,"value":181},{"type":43,"tag":83,"props":2869,"children":2870},{"style":184},[2871],{"type":49,"value":437},{"type":43,"tag":83,"props":2873,"children":2874},{"style":96},[2875],{"type":49,"value":248},{"type":43,"tag":83,"props":2877,"children":2878},{"class":85,"line":251},[2879],{"type":43,"tag":83,"props":2880,"children":2881},{"emptyLinePlaceholder":194},[2882],{"type":49,"value":197},{"type":43,"tag":83,"props":2884,"children":2885},{"class":85,"line":259},[2886],{"type":43,"tag":83,"props":2887,"children":2888},{"style":140},[2889],{"type":49,"value":2890},"# 3. Deposit USDC into highest-TVL yield pool\n",{"type":43,"tag":83,"props":2892,"children":2893},{"class":85,"line":268},[2894,2898,2902,2906,2910,2914,2918],{"type":43,"tag":83,"props":2895,"children":2896},{"style":90},[2897],{"type":49,"value":93},{"type":43,"tag":83,"props":2899,"children":2900},{"style":96},[2901],{"type":49,"value":2256},{"type":43,"tag":83,"props":2903,"children":2904},{"style":96},[2905],{"type":49,"value":2261},{"type":43,"tag":83,"props":2907,"children":2908},{"style":96},[2909],{"type":49,"value":166},{"type":43,"tag":83,"props":2911,"children":2912},{"style":96},[2913],{"type":49,"value":181},{"type":43,"tag":83,"props":2915,"children":2916},{"style":184},[2917],{"type":49,"value":437},{"type":43,"tag":83,"props":2919,"children":2920},{"style":96},[2921],{"type":49,"value":248},{"type":43,"tag":83,"props":2923,"children":2924},{"class":85,"line":1303},[2925],{"type":43,"tag":83,"props":2926,"children":2927},{"style":140},[2928],{"type":49,"value":2929},"# → protocol: morpho (or aave, whichever has highest TVL at the time)\n",{"type":43,"tag":83,"props":2931,"children":2932},{"class":85,"line":1544},[2933],{"type":43,"tag":83,"props":2934,"children":2935},{"style":140},[2936],{"type":49,"value":2937},"# → poolApy shown in dry-run output\n",{"type":43,"tag":83,"props":2939,"children":2940},{"class":85,"line":1571},[2941],{"type":43,"tag":83,"props":2942,"children":2943},{"emptyLinePlaceholder":194},[2944],{"type":49,"value":197},{"type":43,"tag":83,"props":2946,"children":2947},{"class":85,"line":1593},[2948],{"type":43,"tag":83,"props":2949,"children":2950},{"style":140},[2951],{"type":49,"value":2952},"# 4. Bridge remaining USDC to Arbitrum\n",{"type":43,"tag":83,"props":2954,"children":2955},{"class":85,"line":1620},[2956,2960,2964,2968,2972,2976,2980,2984,2988,2992,2996],{"type":43,"tag":83,"props":2957,"children":2958},{"style":90},[2959],{"type":49,"value":93},{"type":43,"tag":83,"props":2961,"children":2962},{"style":96},[2963],{"type":49,"value":156},{"type":43,"tag":83,"props":2965,"children":2966},{"style":96},[2967],{"type":49,"value":161},{"type":43,"tag":83,"props":2969,"children":2970},{"style":96},[2971],{"type":49,"value":166},{"type":43,"tag":83,"props":2973,"children":2974},{"style":96},[2975],{"type":49,"value":171},{"type":43,"tag":83,"props":2977,"children":2978},{"style":96},[2979],{"type":49,"value":166},{"type":43,"tag":83,"props":2981,"children":2982},{"style":96},[2983],{"type":49,"value":181},{"type":43,"tag":83,"props":2985,"children":2986},{"style":184},[2987],{"type":49,"value":372},{"type":43,"tag":83,"props":2989,"children":2990},{"style":96},[2991],{"type":49,"value":377},{"type":43,"tag":83,"props":2993,"children":2994},{"style":96},[2995],{"type":49,"value":382},{"type":43,"tag":83,"props":2997,"children":2998},{"style":96},[2999],{"type":49,"value":248},{"type":43,"tag":119,"props":3001,"children":3002},{},[],{"type":43,"tag":52,"props":3004,"children":3006},{"id":3005},"arbitrary-contract-calls",[3007],{"type":49,"value":3008},"Arbitrary Contract Calls",{"type":43,"tag":59,"props":3010,"children":3011},{},[3012,3014,3020],{"type":49,"value":3013},"For any operation not covered by the dedicated commands, use ",{"type":43,"tag":79,"props":3015,"children":3017},{"className":3016},[],[3018],{"type":49,"value":3019},"call",{"type":49,"value":3021}," to send a raw transaction to any contract (the embedded wallet can call anything):",{"type":43,"tag":71,"props":3023,"children":3025},{"className":73,"code":3024,"language":75,"meta":76,"style":76},"# Dry-run an arbitrary call\nagent call --to 0x... --data 0x...\n\n# With an attached native value, then broadcast\nagent call --to 0x... --data 0x... --value 0.1 --broadcast\n\n# For a native-only wallet, force the relayer to take its fee in POL\nagent call --to 0x... --data 0x... --prefer-native-fee --broadcast\n",[3026],{"type":43,"tag":79,"props":3027,"children":3028},{"__ignoreMap":76},[3029,3037,3068,3075,3083,3124,3131,3139],{"type":43,"tag":83,"props":3030,"children":3031},{"class":85,"line":86},[3032],{"type":43,"tag":83,"props":3033,"children":3034},{"style":140},[3035],{"type":49,"value":3036},"# Dry-run an arbitrary call\n",{"type":43,"tag":83,"props":3038,"children":3039},{"class":85,"line":146},[3040,3044,3049,3053,3058,3063],{"type":43,"tag":83,"props":3041,"children":3042},{"style":90},[3043],{"type":49,"value":93},{"type":43,"tag":83,"props":3045,"children":3046},{"style":96},[3047],{"type":49,"value":3048}," call",{"type":43,"tag":83,"props":3050,"children":3051},{"style":96},[3052],{"type":49,"value":171},{"type":43,"tag":83,"props":3054,"children":3055},{"style":96},[3056],{"type":49,"value":3057}," 0x...",{"type":43,"tag":83,"props":3059,"children":3060},{"style":96},[3061],{"type":49,"value":3062}," --data",{"type":43,"tag":83,"props":3064,"children":3065},{"style":96},[3066],{"type":49,"value":3067}," 0x...\n",{"type":43,"tag":83,"props":3069,"children":3070},{"class":85,"line":190},[3071],{"type":43,"tag":83,"props":3072,"children":3073},{"emptyLinePlaceholder":194},[3074],{"type":49,"value":197},{"type":43,"tag":83,"props":3076,"children":3077},{"class":85,"line":200},[3078],{"type":43,"tag":83,"props":3079,"children":3080},{"style":140},[3081],{"type":49,"value":3082},"# With an attached native value, then broadcast\n",{"type":43,"tag":83,"props":3084,"children":3085},{"class":85,"line":209},[3086,3090,3094,3098,3102,3106,3110,3115,3120],{"type":43,"tag":83,"props":3087,"children":3088},{"style":90},[3089],{"type":49,"value":93},{"type":43,"tag":83,"props":3091,"children":3092},{"style":96},[3093],{"type":49,"value":3048},{"type":43,"tag":83,"props":3095,"children":3096},{"style":96},[3097],{"type":49,"value":171},{"type":43,"tag":83,"props":3099,"children":3100},{"style":96},[3101],{"type":49,"value":3057},{"type":43,"tag":83,"props":3103,"children":3104},{"style":96},[3105],{"type":49,"value":3062},{"type":43,"tag":83,"props":3107,"children":3108},{"style":96},[3109],{"type":49,"value":3057},{"type":43,"tag":83,"props":3111,"children":3112},{"style":96},[3113],{"type":49,"value":3114}," --value",{"type":43,"tag":83,"props":3116,"children":3117},{"style":184},[3118],{"type":49,"value":3119}," 0.1",{"type":43,"tag":83,"props":3121,"children":3122},{"style":96},[3123],{"type":49,"value":248},{"type":43,"tag":83,"props":3125,"children":3126},{"class":85,"line":251},[3127],{"type":43,"tag":83,"props":3128,"children":3129},{"emptyLinePlaceholder":194},[3130],{"type":49,"value":197},{"type":43,"tag":83,"props":3132,"children":3133},{"class":85,"line":259},[3134],{"type":43,"tag":83,"props":3135,"children":3136},{"style":140},[3137],{"type":49,"value":3138},"# For a native-only wallet, force the relayer to take its fee in POL\n",{"type":43,"tag":83,"props":3140,"children":3141},{"class":85,"line":268},[3142,3146,3150,3154,3158,3162,3166,3171],{"type":43,"tag":83,"props":3143,"children":3144},{"style":90},[3145],{"type":49,"value":93},{"type":43,"tag":83,"props":3147,"children":3148},{"style":96},[3149],{"type":49,"value":3048},{"type":43,"tag":83,"props":3151,"children":3152},{"style":96},[3153],{"type":49,"value":171},{"type":43,"tag":83,"props":3155,"children":3156},{"style":96},[3157],{"type":49,"value":3057},{"type":43,"tag":83,"props":3159,"children":3160},{"style":96},[3161],{"type":49,"value":3062},{"type":43,"tag":83,"props":3163,"children":3164},{"style":96},[3165],{"type":49,"value":3057},{"type":43,"tag":83,"props":3167,"children":3168},{"style":96},[3169],{"type":49,"value":3170}," --prefer-native-fee",{"type":43,"tag":83,"props":3172,"children":3173},{"style":96},[3174],{"type":49,"value":248},{"type":43,"tag":119,"props":3176,"children":3177},{},[],{"type":43,"tag":52,"props":3179,"children":3181},{"id":3180},"troubleshooting",[3182],{"type":49,"value":3183},"Troubleshooting",{"type":43,"tag":763,"props":3185,"children":3186},{},[3187,3208],{"type":43,"tag":767,"props":3188,"children":3189},{},[3190],{"type":43,"tag":771,"props":3191,"children":3192},{},[3193,3198,3203],{"type":43,"tag":775,"props":3194,"children":3195},{},[3196],{"type":49,"value":3197},"Error",{"type":43,"tag":775,"props":3199,"children":3200},{},[3201],{"type":49,"value":3202},"Cause",{"type":43,"tag":775,"props":3204,"children":3205},{},[3206],{"type":49,"value":3207},"Fix",{"type":43,"tag":791,"props":3209,"children":3210},{},[3211,3241,3263,3298,3341,3369],{"type":43,"tag":771,"props":3212,"children":3213},{},[3214,3225,3230],{"type":43,"tag":798,"props":3215,"children":3216},{},[3217,3223],{"type":43,"tag":79,"props":3218,"children":3220},{"className":3219},[],[3221],{"type":49,"value":3222},"Not logged in",{"type":49,"value":3224}," \u002F no wallet found",{"type":43,"tag":798,"props":3226,"children":3227},{},[3228],{"type":49,"value":3229},"No active wallet session",{"type":43,"tag":798,"props":3231,"children":3232},{},[3233,3235],{"type":49,"value":3234},"Run ",{"type":43,"tag":79,"props":3236,"children":3238},{"className":3237},[],[3239],{"type":49,"value":3240},"agent wallet login",{"type":43,"tag":771,"props":3242,"children":3243},{},[3244,3249,3254],{"type":43,"tag":798,"props":3245,"children":3246},{},[3247],{"type":49,"value":3248},"Session expired",{"type":43,"tag":798,"props":3250,"children":3251},{},[3252],{"type":49,"value":3253},"Sessions last about a week",{"type":43,"tag":798,"props":3255,"children":3256},{},[3257,3258],{"type":49,"value":3234},{"type":43,"tag":79,"props":3259,"children":3261},{"className":3260},[],[3262],{"type":49,"value":3240},{"type":43,"tag":771,"props":3264,"children":3265},{},[3266,3275,3280],{"type":43,"tag":798,"props":3267,"children":3268},{},[3269],{"type":43,"tag":79,"props":3270,"children":3272},{"className":3271},[],[3273],{"type":49,"value":3274},"Insufficient \u003Ctoken>: wallet has X",{"type":43,"tag":798,"props":3276,"children":3277},{},[3278],{"type":49,"value":3279},"Balance too low for the requested deposit amount",{"type":43,"tag":798,"props":3281,"children":3282},{},[3283,3284,3290,3292],{"type":49,"value":3234},{"type":43,"tag":79,"props":3285,"children":3287},{"className":3286},[],[3288],{"type":49,"value":3289},"agent balances",{"type":49,"value":3291}," and adjust ",{"type":43,"tag":79,"props":3293,"children":3295},{"className":3294},[],[3296],{"type":49,"value":3297},"--amount",{"type":43,"tag":771,"props":3299,"children":3300},{},[3301,3318,3323],{"type":43,"tag":798,"props":3302,"children":3303},{},[3304,3310,3312],{"type":43,"tag":79,"props":3305,"children":3307},{"className":3306},[],[3308],{"type":49,"value":3309},"Unable to pay gas",{"type":49,"value":3311}," \u002F ",{"type":43,"tag":79,"props":3313,"children":3315},{"className":3314},[],[3316],{"type":49,"value":3317},"Wallet has no POL for gas",{"type":43,"tag":798,"props":3319,"children":3320},{},[3321],{"type":49,"value":3322},"Wallet can't cover the relayer fee in USDC or POL",{"type":43,"tag":798,"props":3324,"children":3325},{},[3326,3328,3334,3336],{"type":49,"value":3327},"Fund the wallet with a little POL or USDC; for a native-only wallet, pass ",{"type":43,"tag":79,"props":3329,"children":3331},{"className":3330},[],[3332],{"type":49,"value":3333},"--prefer-native-fee",{"type":49,"value":3335}," on ",{"type":43,"tag":79,"props":3337,"children":3339},{"className":3338},[],[3340],{"type":49,"value":3019},{"type":43,"tag":771,"props":3342,"children":3343},{},[3344,3353,3358],{"type":43,"tag":798,"props":3345,"children":3346},{},[3347],{"type":43,"tag":79,"props":3348,"children":3350},{"className":3349},[],[3351],{"type":49,"value":3352},"Protocol X not yet supported",{"type":43,"tag":798,"props":3354,"children":3355},{},[3356],{"type":49,"value":3357},"Trails returned a protocol other than aave\u002Fmorpho",{"type":43,"tag":798,"props":3359,"children":3360},{},[3361,3362,3367],{"type":49,"value":612},{"type":43,"tag":79,"props":3363,"children":3365},{"className":3364},[],[3366],{"type":49,"value":2190},{"type":49,"value":3368}," to obtain the yield-bearing token manually",{"type":43,"tag":771,"props":3370,"children":3371},{},[3372,3383,3388],{"type":43,"tag":798,"props":3373,"children":3374},{},[3375,3381],{"type":43,"tag":79,"props":3376,"children":3378},{"className":3377},[],[3379],{"type":49,"value":3380},"swap",{"type":49,"value":3382},": no route found",{"type":43,"tag":798,"props":3384,"children":3385},{},[3386],{"type":49,"value":3387},"Insufficient liquidity for the pair",{"type":43,"tag":798,"props":3389,"children":3390},{},[3391],{"type":49,"value":3392},"Try a different amount or token pair",{"type":43,"tag":3394,"props":3395,"children":3396},"style",{},[3397],{"type":49,"value":3398},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3400,"total":200},[3401,3416,3423,3439],{"slug":3402,"name":3402,"fn":3403,"description":3404,"org":3405,"tags":3406,"stars":26,"repoUrl":27,"updatedAt":3415},"polygon-agent-cli","perform on-chain operations on Polygon","Complete Polygon agent toolkit for on-chain operations on Polygon. Use this skill whenever helping an agent set up a wallet, check balances, send or swap tokens, bridge assets, deposit or withdraw from yield (Aave aTokens, ERC-4626 vaults), register on-chain identity, submit or query reputation\u002Ffeedback, or make x402 micropayments. Covers the full lifecycle: OMS smart contract wallets, Trails DeFi actions, ERC-8004 identity + reputation, x402 payments. Single CLI entry point (`agent`), AES-256-GCM encrypted storage.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3407,3410,3413,3414],{"name":3408,"slug":3409,"type":16},"Automation","automation",{"name":3411,"slug":3412,"type":16},"CLI","cli",{"name":24,"slug":25,"type":16},{"name":14,"slug":15,"type":16},"2026-07-27T06:07:29.717032",{"slug":4,"name":4,"fn":5,"description":6,"org":3417,"tags":3418,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3419,3420,3421,3422],{"name":18,"slug":19,"type":16},{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},{"slug":3424,"name":3424,"fn":3425,"description":3426,"org":3427,"tags":3428,"stars":26,"repoUrl":27,"updatedAt":3438},"polygon-discovery","access pay-per-call services via Polygon","Agentic Services on Polygon — pay-per-call APIs gated by the x402 payment protocol, callable via the Polygon Agent CLI. No API keys or subscriptions; each call costs a small USDC amount drawn from the agent's smart wallet. Covers web search (Exa, SearchApi), web scraping (Firecrawl), news (NewsAPI), LLM inference (Llama 3.3\u002F3.2 via NVIDIA NIM, OpenRouter), cloud browsers (Browserbase), email (Resend, AgentMail), on-chain wallet analytics and prices (Allium), and multi-chain JSON-RPC (QuickNode, 16 chains).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3429,3432,3435,3436],{"name":3430,"slug":3431,"type":16},"API Development","api-development",{"name":3433,"slug":3434,"type":16},"Payments","payments",{"name":14,"slug":15,"type":16},{"name":3437,"slug":3437,"type":16},"x402","2026-07-24T05:37:26.414181",{"slug":3440,"name":3440,"fn":3441,"description":3442,"org":3443,"tags":3444,"stars":26,"repoUrl":27,"updatedAt":3448},"polymarket-skill","place bets on Polymarket prediction markets","Place bets on Polymarket prediction markets using the Polygon Agent CLI (CLOB V2). Browse markets, check prices, buy YES\u002FNO positions, sell positions, manage orders. Collateral is pUSD (auto-wrapped from USDC.e). All commands are JSON output. Dry-run by default — always add --broadcast to execute.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3445,3446,3447],{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},"2026-07-24T05:37:28.436997",{"items":3450,"total":200},[3451,3458,3465,3472],{"slug":3402,"name":3402,"fn":3403,"description":3404,"org":3452,"tags":3453,"stars":26,"repoUrl":27,"updatedAt":3415},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3454,3455,3456,3457],{"name":3408,"slug":3409,"type":16},{"name":3411,"slug":3412,"type":16},{"name":24,"slug":25,"type":16},{"name":14,"slug":15,"type":16},{"slug":4,"name":4,"fn":5,"description":6,"org":3459,"tags":3460,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3461,3462,3463,3464],{"name":18,"slug":19,"type":16},{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},{"slug":3424,"name":3424,"fn":3425,"description":3426,"org":3466,"tags":3467,"stars":26,"repoUrl":27,"updatedAt":3438},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3468,3469,3470,3471],{"name":3430,"slug":3431,"type":16},{"name":3433,"slug":3434,"type":16},{"name":14,"slug":15,"type":16},{"name":3437,"slug":3437,"type":16},{"slug":3440,"name":3440,"fn":3441,"description":3442,"org":3473,"tags":3474,"stars":26,"repoUrl":27,"updatedAt":3448},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3475,3476,3477],{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16}]