[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GRFD01E2F26DBC6A8NT6SS":3,"skill-same:01M6GRFD01E2F26DBC6A8NT6SS":88},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6GRFD01E2F26DBC6A8NT6SS","uniswap-swap-simulation",null,"Simulate and analyze Uniswap swaps including price impact, slippage, optimal routing, and gas estimation. Use when the user asks about swap execution, routing, price impact, or MEV considerations.","jiayaoqijia\u002Fcryptoskill","jiayaoqijia","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1453879?v=4","01M6GMYTX7Q7S504VC6E756ENR","YQ","01M6GMYV1QKJ1CC75MTTGT9PR0",81,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Funiswap-swap-simulation\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"simulation","uniswap swap simulation","swap","uniswap","when","routing","simulate","mev","about","impact","price","swaps","slippage","estimation","use","gas","user","analyze","execution","2026-11-10 10:12:30",false,"---\nname: uniswap-swap-simulation\ndescription: Simulate and analyze Uniswap swaps including price impact, slippage, optimal routing, and gas estimation. Use when the user asks about swap execution, routing, price impact, or MEV considerations.\n---\n\n# Uniswap Swap Simulation\n\n## Overview\n\nThis skill covers simulating Uniswap swaps, calculating price impact, and analyzing routing decisions.\n\n## Key Concepts\n\n- **Price Impact**: The change in pool price caused by a swap. Larger swaps have higher impact.\n- **Slippage**: Difference between expected and executed price, including price movement between submission and execution.\n- **Routing**: Finding the optimal path across pools and protocols for best execution.\n\n## Simulating a Swap\n\nUse the Quoter contract to simulate swaps without executing:\n\n```typescript\nimport { createPublicClient, http, encodeFunctionData } from \"viem\";\n\n\u002F\u002F QuoterV2 for v3 pools\nconst quote = await client.readContract({\n  address: quoterV2Address,\n  abi: quoterV2Abi,\n  functionName: \"quoteExactInputSingle\",\n  args: [\n    {\n      tokenIn,\n      tokenOut,\n      amountIn,\n      fee,\n      sqrtPriceLimitX96: 0n,\n    },\n  ],\n});\n\n\u002F\u002F Returns: [amountOut, sqrtPriceX96After, initializedTicksCrossed, gasEstimate]\n```\n\n## Price Impact Calculation\n\n```typescript\nfunction calculatePriceImpact(\n  amountIn: bigint,\n  amountOut: bigint,\n  marketPrice: number, \u002F\u002F token1\u002Ftoken0\n  decimals0: number,\n  decimals1: number,\n): number {\n  const executionPrice =\n    Number(amountOut) \u002F 10 ** decimals1 \u002F (Number(amountIn) \u002F 10 ** decimals0);\n  return Math.abs(1 - executionPrice \u002F marketPrice);\n}\n```\n\n## Slippage Tolerance\n\n- **Stablecoin pairs**: 0.01% - 0.05%\n- **Major pairs** (ETH\u002FUSDC): 0.1% - 0.5%\n- **Volatile pairs**: 0.5% - 1.0%\n- **Low liquidity**: 1% - 5%\n\nCalculate minimum amount out:\n\n```typescript\nconst minAmountOut = (amountOut * (10000n - BigInt(slippageBps))) \u002F 10000n;\n```\n\n## Multi-hop Routing\n\nFor tokens without direct pools, route through intermediary tokens:\n\n```typescript\n\u002F\u002F ETH -> USDC -> DAI (two hops)\nconst path = encodePacked(\n  [\"address\", \"uint24\", \"address\", \"uint24\", \"address\"],\n  [WETH, 3000, USDC, 100, DAI],\n);\n\nconst quote = await client.readContract({\n  address: quoterV2Address,\n  abi: quoterV2Abi,\n  functionName: \"quoteExactInput\",\n  args: [path, amountIn],\n});\n```\n\n## Gas Estimation\n\nTypical gas costs by swap complexity:\n\n- Single hop: ~130,000 gas\n- Two hops: ~200,000 gas\n- Three hops: ~270,000 gas\n\nAlways add a 15-20% buffer to gas estimates.\n\n## MEV Considerations\n\nWhen building swap tools:\n\n- Recommend private RPCs (Flashbots Protect) for large swaps\n- Warn users about sandwich attack risk for high-impact swaps\n- Suggest using deadline parameters to limit exposure\n","# Uniswap Swap Simulation\n\n## Overview\n\nThis skill covers simulating Uniswap swaps, calculating price impact, and analyzing routing decisions.\n\n## Key Concepts\n\n- **Price Impact**: The change in pool price caused by a swap. Larger swaps have higher impact.\n- **Slippage**: Difference between expected and executed price, including price movement between submission and execution.\n- **Routing**: Finding the optimal path across pools and protocols for best execution.\n\n## Simulating a Swap\n\nUse the Quoter contract to simulate swaps without executing:\n\n```typescript\nimport { createPublicClient, http, encodeFunctionData } from \"viem\";\n\n\u002F\u002F QuoterV2 for v3 pools\nconst quote = await client.readContract({\n  address: quoterV2Address,\n  abi: quoterV2Abi,\n  functionName: \"quoteExactInputSingle\",\n  args: [\n    {\n      tokenIn,\n      tokenOut,\n      amountIn,\n      fee,\n      sqrtPriceLimitX96: 0n,\n    },\n  ],\n});\n\n\u002F\u002F Returns: [amountOut, sqrtPriceX96After, initializedTicksCrossed, gasEstimate]\n```\n\n## Price Impact Calculation\n\n```typescript\nfunction calculatePriceImpact(\n  amountIn: bigint,\n  amountOut: bigint,\n  marketPrice: number, \u002F\u002F token1\u002Ftoken0\n  decimals0: number,\n  decimals1: number,\n): number {\n  const executionPrice =\n    Number(amountOut) \u002F 10 ** decimals1 \u002F (Number(amountIn) \u002F 10 ** decimals0);\n  return Math.abs(1 - executionPrice \u002F marketPrice);\n}\n```\n\n## Slippage Tolerance\n\n- **Stablecoin pairs**: 0.01% - 0.05%\n- **Major pairs** (ETH\u002FUSDC): 0.1% - 0.5%\n- **Volatile pairs**: 0.5% - 1.0%\n- **Low liquidity**: 1% - 5%\n\nCalculate minimum amount out:\n\n```typescript\nconst minAmountOut = (amountOut * (10000n - BigInt(slippageBps))) \u002F 10000n;\n```\n\n## Multi-hop Routing\n\nFor tokens without direct pools, route through intermediary tokens:\n\n```typescript\n\u002F\u002F ETH -> USDC -> DAI (two hops)\nconst path = encodePacked(\n  [\"address\", \"uint24\", \"address\", \"uint24\", \"address\"],\n  [WETH, 3000, USDC, 100, DAI],\n);\n\nconst quote = await client.readContract({\n  address: quoterV2Address,\n  abi: quoterV2Abi,\n  functionName: \"quoteExactInput\",\n  args: [path, amountIn],\n});\n```\n\n## Gas Estimation\n\nTypical gas costs by swap complexity:\n\n- Single hop: ~130,000 gas\n- Two hops: ~200,000 gas\n- Three hops: ~270,000 gas\n\nAlways add a 15-20% buffer to gas estimates.\n\n## MEV Considerations\n\nWhen building swap tools:\n\n- Recommend private RPCs (Flashbots Protect) for large swaps\n- Warn users about sandwich attack risk for high-impact swaps\n- Suggest using deadline parameters to limit exposure\n",{"name":5,"description":7},"main","3df1d0d67b30ff15236561f8c0f9f06d33f42dfd","skills\u002Fdefi\u002Funiswap-swap-simulation",17,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia","https:\u002F\u002Feth2030.com","Hardcore infra. Building @alt-research and applied cryptography.","2026-11-15 02:28:10",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add jiayaoqijia\u002Fcryptoskill --skill uniswap-swap-simulation",{"tool":58,"command":59},"bunx","bunx skills add jiayaoqijia\u002Fcryptoskill --skill uniswap-swap-simulation",{"tool":61,"command":62},"pnpm","pnpm dlx skills add jiayaoqijia\u002Fcryptoskill --skill uniswap-swap-simulation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Funiswap-swap-simulation\u002FSKILL.md",true,[66,72,76,80,84],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"_meta.json","REFERENCE","参考文档",142,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Funiswap-swap-simulation\u002F_meta.json",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"README.md",986,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Funiswap-swap-simulation\u002FREADME.md",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"skill-card.md",2146,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Funiswap-swap-simulation\u002Fskill-card.md",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"SOURCE.md",264,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Funiswap-swap-simulation\u002FSOURCE.md",{"path":85,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":86,"sourceHtmlUrl":87},"TRUST.auto.yaml",2200,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Funiswap-swap-simulation\u002FTRUST.auto.yaml",[89,118,141,159,172,182],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":38},"01M712C436EQYE43342Q4E7GG1","recipe-performance","Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold\u002Fwarm\u002Fbackground-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout\u002Fpaint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.","MIT","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fwallets\u002Fmetamask-official-recipe-performance\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fwallets\u002Fmetamask-official-recipe-performance\u002FSKILL.md",[],[98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117],"performance","recipe performance","recipe","mm","sentry","harness","app","deterministic","recipes","flow","cold","critical","analysis","tasks","react","browser","layout","screen","network","metamask",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":122,"licenseFileUrl":123,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":38},"01M70XT2F8A5CQZ81JBP98KSW3","mexc-spot-websocket","MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-spot-websocket\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-spot-websocket\u002FSKILL.md",[],[127,128,129,130,131,132,133,134,135,136,137,138,139,140],"mexc spot websocket","spot","websocket","api","workflows","public","listen","streams","depth","keys","for","api keys","maintenance","protobuf",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":122,"licenseFileUrl":145,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":38},"01M70XT0MBXN3WZY1BKN0CPNKR","mexc-spot-rest","MEXC Spot REST workflows for public data, signed account requests, orders, wallet\u002Fadmin actions, and secure signing without exposing API keys.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-spot-rest\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-spot-rest\u002FSKILL.md",[],[149,128,150,151,152,153,154,138,137,136,155,156,157,132,158,131,130],"mexc spot rest","REST","admin","signing","Wallet","requests","actions","secure","data","orders",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":122,"licenseFileUrl":163,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":38},"01M70XSYSVZ2N0N91XCAR2CAK0","mexc-futures-websocket","MEXC Futures WebSocket workflows for public streams, private account\u002Forder\u002Fposition streams, ping\u002Fpong, subscriptions, and depth maintenance.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-futures-websocket\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fmncrftfrcnm-mexc-futures-websocket\u002FSKILL.md",[],[167,168,129,169,170,139,137,171,135,134,132,131],"mexc futures websocket","futures","position","ping","subscriptions",{"skillNo":173,"name":174,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":175,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":38},"01M6H0ZWHVE5W04WG2DKQE2SQC","0xklen-version-and-refresh-sanctions-lists","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-version-and-refresh-sanctions-lists\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-version-and-refresh-sanctions-lists\u002FSKILL.md",[],[179,180,181],"refresh","0xklen version and refresh sanctions lists","version",{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":186,"sourceHtmlUrl":187,"categories":188,"keywords":189,"publishedAt":38},"01M6H0Z28Q3R8J0S799GJQWXM3","verify-tests-cover-changed-lines","Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-verify-tests-cover-changed-lines\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-verify-tests-cover-changed-lines\u002FSKILL.md",[],[190,191,192,193,194,195,196,33,197,198,199],"tests","cover","verify tests cover changed lines","verify","coverage","pr","exercise","patch","code","share"]