[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GZ71QW80R4BAA28G18TKXM":3,"skill-same:01M6GZ71QW80R4BAA28G18TKXM":64},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":22,"linkOnly":23,"markdownContent":24,"markdownBody":25,"frontMatter":26,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M6GZ71QW80R4BAA28G18TKXM","0xklen-measure-mempool-to-inclusion-latency",null,"jiayaoqijia\u002Fcryptoskill","jiayaoqijia","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1453879?v=4","01M6GMYTX7Q7S504VC6E756ENR","YQ","01M6GMYV1QKJ1CC75MTTGT9PR0",81,"MIT","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-measure-mempool-to-inclusion-latency\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-measure-mempool-to-inclusion-latency\u002FSKILL.md",[],[19,20,21],"inclusion","latency","0xklen measure mempool to inclusion latency","2026-11-10 10:12:30",false,"---\nname: measure-mempool-to-inclusion-latency\ndescription: Use when tuning maxBlockNumber or judging whether a route lands fast enough: measuring broadcast-to-inclusion time in blocks and seconds for public and private submission paths.\n---\n\n# Measure mempool-to-inclusion latency\n\nThe number that decides your `maxBlockNumber` and your route is how many blocks a submission takes to land, measured rather than assumed, and it differs by an order of magnitude between the public mempool and a private relay.\n\n## Procedure\n\n1. Stamp the broadcast: record the wall-clock epoch ms at the moment the signed transaction or bundle hits the endpoint, from the client, not from a log line elsewhere.\n\n2. Record the inclusion: poll for the receipt and read its block number and the block's timestamp.\n\n   ```bash\n   H=$TXHASH; while true; do cast receipt $H --rpc-url $RPC 2>\u002Fdev\u002Fnull | grep -q blockNumber && break; sleep 2; done\n   cast block $(cast receipt $H --rpc-url $RPC --field blockNumber) --rpc-url $RPC --field timestamp\n   ```\n\n3. Compute two figures: blocks-to-inclusion (`receipt_block - head_at_broadcast`) and seconds (`receipt_ts - broadcast_ts`). Blocks is what matters for `maxBlockNumber`; seconds tells you about the route's latency.\n\n4. Run 100 samples per route and keep the distribution, not the mean. Public mempool inclusion is bimodal — most land in block N+1, the rest stall for a fee spike — so a median of 1 block hides a p95 of 15.\n\n5. Set `maxBlockNumber = head + ceil(p95_blocks)`. A private tx that outlives its relevance is worse than one that expires, because it can land hours later at a stale price.\n\n6. Compare routes on the same trade size. A private RPC adds latency by design (it waits for a builder) but removes reordering; a public send is faster but exposed. Measure both before choosing.\n\n7. Watch for the reverting-throughput case: when the chain is busy, inclusion latency for low-tip transactions jumps because blocks are full. Re-measure during a spike, not only on a quiet day.\n\n## Pitfalls\n\n- Measuring seconds only and ignoring blocks; a 4 s route that skips three blocks is more dangerous than a 12 s route that lands in the next one.\n- Starting the clock when the client logs instead of when bytes leave the host; the transport skew is a real part of route latency.\n- Assuming private equals slow. Some protected RPCs land in the next block more reliably than the public mempool.\n- Polling the receipt against a lagging node, which reports a stale head and makes inclusion look later than it was.\n- Taking p50 only. The tail is where stuck transactions and stale fills come from.\n\n## Verification\n\n    cast receipt $TXHASH --rpc-url $RPC --field blockNumber\n\nSubtract the head at broadcast from the receipt block across 100 samples; a p95 of one or two blocks justifies a tight `maxBlockNumber`. Report p50\u002Fp95 blocks-to-inclusion and seconds per route.\n","# Measure mempool-to-inclusion latency\n\nThe number that decides your `maxBlockNumber` and your route is how many blocks a submission takes to land, measured rather than assumed, and it differs by an order of magnitude between the public mempool and a private relay.\n\n## Procedure\n\n1. Stamp the broadcast: record the wall-clock epoch ms at the moment the signed transaction or bundle hits the endpoint, from the client, not from a log line elsewhere.\n\n2. Record the inclusion: poll for the receipt and read its block number and the block's timestamp.\n\n   ```bash\n   H=$TXHASH; while true; do cast receipt $H --rpc-url $RPC 2>\u002Fdev\u002Fnull | grep -q blockNumber && break; sleep 2; done\n   cast block $(cast receipt $H --rpc-url $RPC --field blockNumber) --rpc-url $RPC --field timestamp\n   ```\n\n3. Compute two figures: blocks-to-inclusion (`receipt_block - head_at_broadcast`) and seconds (`receipt_ts - broadcast_ts`). Blocks is what matters for `maxBlockNumber`; seconds tells you about the route's latency.\n\n4. Run 100 samples per route and keep the distribution, not the mean. Public mempool inclusion is bimodal — most land in block N+1, the rest stall for a fee spike — so a median of 1 block hides a p95 of 15.\n\n5. Set `maxBlockNumber = head + ceil(p95_blocks)`. A private tx that outlives its relevance is worse than one that expires, because it can land hours later at a stale price.\n\n6. Compare routes on the same trade size. A private RPC adds latency by design (it waits for a builder) but removes reordering; a public send is faster but exposed. Measure both before choosing.\n\n7. Watch for the reverting-throughput case: when the chain is busy, inclusion latency for low-tip transactions jumps because blocks are full. Re-measure during a spike, not only on a quiet day.\n\n## Pitfalls\n\n- Measuring seconds only and ignoring blocks; a 4 s route that skips three blocks is more dangerous than a 12 s route that lands in the next one.\n- Starting the clock when the client logs instead of when bytes leave the host; the transport skew is a real part of route latency.\n- Assuming private equals slow. Some protected RPCs land in the next block more reliably than the public mempool.\n- Polling the receipt against a lagging node, which reports a stale head and makes inclusion look later than it was.\n- Taking p50 only. The tail is where stuck transactions and stale fills come from.\n\n## Verification\n\n    cast receipt $TXHASH --rpc-url $RPC --field blockNumber\n\nSubtract the head at broadcast from the receipt block across 100 samples; a p95 of one or two blocks justifies a tight `maxBlockNumber`. Report p50\u002Fp95 blocks-to-inclusion and seconds per route.\n",{},"main","3df1d0d67b30ff15236561f8c0f9f06d33f42dfd","skills\u002Fpayments\u002F0xklen-measure-mempool-to-inclusion-latency",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":7,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add jiayaoqijia\u002Fcryptoskill --skill 0xklen-measure-mempool-to-inclusion-latency",{"tool":42,"command":43},"bunx","bunx skills add jiayaoqijia\u002Fcryptoskill --skill 0xklen-measure-mempool-to-inclusion-latency",{"tool":45,"command":46},"pnpm","pnpm dlx skills add jiayaoqijia\u002Fcryptoskill --skill 0xklen-measure-mempool-to-inclusion-latency","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-measure-mempool-to-inclusion-latency\u002FSKILL.md",true,[50,54,60],{"path":51,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":15},"LICENSE","许可证",1063,{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"SOURCE.md","REFERENCE","参考文档",362,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-measure-mempool-to-inclusion-latency\u002FSOURCE.md",{"path":61,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":62,"sourceHtmlUrl":63},"TRUST.auto.yaml",2243,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-measure-mempool-to-inclusion-latency\u002FTRUST.auto.yaml",[65,74,82,90,98,106],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":69,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":73},"01M7DTKCERMV0RNX3HZJP4CZ26","troves","Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say \"Troves\" explicitly.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-troves\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-troves\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":78,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":73},"01M7DTK6CJSMGC8KCQHGNYFZBD","trade","Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say \"swap\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-trade\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-trade\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":73},"01M7DTJZ6A0X4PAW3Y8W4J9K64","staking","Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say \"stake\" explicitly.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-staking\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-staking\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":73},"01M7DTJSDZJKCDMW7GHRF4BRH5","send","Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say \"pay 10 STRK to 0x...\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-send\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-send\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":102,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":73},"01M7DTJG1E480D51ZQ7WKDQ26K","portfolio","View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks \"what do I have\", \"show me everything\", \"how much am I worth\", \"my positions\", \"my investments\", \"rebalance my portfolio\", \"I want 50% ETH\", \"optimize my holdings\", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say \"portfolio\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-portfolio\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-portfolio\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":110,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":73},"01M7DTJ7M8TE9R2N36HFBZDGVD","multi-swap","Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions \"two swaps\", \"three swaps\", \"swap X and Y at the same time\", or wants to convert multiple tokens in a single call.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-multi-swap\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-multi-swap\u002FSKILL.md",[],[]]