[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GYZKDRX74FCHAXF9BNVCXX":3,"skill-same:01M6GYZKDRX74FCHAXF9BNVCXX":85},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":24,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":54,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M6GYZKDRX74FCHAXF9BNVCXX","invoice-in-crypto-with-a-quote-expiry",null,"Use when invoicing a customer in crypto and the price moves between issue and payment. Fixes the amount in crypto at a rate with a short expiry and states the exact unit and chain.","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-invoice-in-crypto-with-a-quote-expiry\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-invoice-in-crypto-with-a-quote-expiry\u002FSKILL.md",[19],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01JBSEEDCAT000000000000040","财务","PROFESSION","适用职业",[25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"invoice in crypto with a quote expiry","crypto","quote","invoice","with","unit","when","rate","fixes","at","states","customer","price","chain","payment","issue","use","short","2026-11-10 10:12:30",false,"---\nname: invoice-in-crypto-with-a-quote-expiry\ndescription: Use when invoicing a customer in crypto and the price moves between issue and payment. Fixes the amount in crypto at a rate with a short expiry and states the exact unit and chain.\n---\n\n# Invoice in crypto with a quote expiry\n\nA crypto invoice with no expiry is an open FX position: the customer pays in the right coin at the wrong rate a day later. Fix the amount in base units, tie it to a rate with a short validity window, and state chain and token unambiguously.\n\n## Procedure\n\n1. Choose the denomination: bill in fiat and convert, or bill in crypto. Billing in fiat with a crypto settlement amount makes the FX risk explicit and short.\n2. Fetch the rate from a source with a timestamp (exchange ticker, Chainlink feed):\n   `cast call $FEED \"latestRoundData()(uint80,int256,uint256,uint256,uint80)\" --rpc-url $RPC`.\n3. Add a buffer for volatility over the payment window (e.g. +1.5% for a 24h window on ETH).\n4. Convert to base units with the correct decimals and floor, never round up:\n   `python3 -c \"print(int(1500\u002F(rate*1.015)*10**6))\"` for a 6-decimal stablecoin.\n5. Set the expiry: both a block height and a wall-clock time. After expiry the invoice is void and a new rate is issued.\n6. On the invoice state the token contract address, chain id, amount in base units, destination address, and the accepted tolerance. Do not rely on ticker symbols alone.\n7. Record the rate, timestamp, feed id, and expiry alongside the invoice for reconciliation and tax.\n\n## Pitfalls\n\n- Omitting the token contract address: two tokens share a ticker and the customer pays the worthless one.\n- Using a rate with no timestamp; you cannot prove the rate at dispute time.\n- Rounding the crypto amount up for the customer creates a mismatch you reconcile forever.\n- A long expiry silently becomes a free option for the customer against you.\n- A quote expiry in wall-clock time means nothing if the chain halts; pair it with a block-height expiry.\n- Buffering the rate protects against adverse moves but can silently overcharge and look like a hidden fee.\n- An invoice can be paid late and still land on-chain before your void; reconcile the on-chain time, not the receipt time.\n- A stablecoin invoice still carries peg risk; the buffer for a stablecoin is depeg risk, not volatility.\n\n## Verification\n\n    python3 -c \"print(int(1500\u002F(rate*1.015)*10**6))\"   # amount in base units\n    # cross-check: amount_base_units \u002F 10**decimals * rate ~= invoice_usd + buffer\n\nReport the locked rate and its timestamp, the base-unit amount, the expiry, and the token contract on the invoice.\n","# Invoice in crypto with a quote expiry\n\nA crypto invoice with no expiry is an open FX position: the customer pays in the right coin at the wrong rate a day later. Fix the amount in base units, tie it to a rate with a short validity window, and state chain and token unambiguously.\n\n## Procedure\n\n1. Choose the denomination: bill in fiat and convert, or bill in crypto. Billing in fiat with a crypto settlement amount makes the FX risk explicit and short.\n2. Fetch the rate from a source with a timestamp (exchange ticker, Chainlink feed):\n   `cast call $FEED \"latestRoundData()(uint80,int256,uint256,uint256,uint80)\" --rpc-url $RPC`.\n3. Add a buffer for volatility over the payment window (e.g. +1.5% for a 24h window on ETH).\n4. Convert to base units with the correct decimals and floor, never round up:\n   `python3 -c \"print(int(1500\u002F(rate*1.015)*10**6))\"` for a 6-decimal stablecoin.\n5. Set the expiry: both a block height and a wall-clock time. After expiry the invoice is void and a new rate is issued.\n6. On the invoice state the token contract address, chain id, amount in base units, destination address, and the accepted tolerance. Do not rely on ticker symbols alone.\n7. Record the rate, timestamp, feed id, and expiry alongside the invoice for reconciliation and tax.\n\n## Pitfalls\n\n- Omitting the token contract address: two tokens share a ticker and the customer pays the worthless one.\n- Using a rate with no timestamp; you cannot prove the rate at dispute time.\n- Rounding the crypto amount up for the customer creates a mismatch you reconcile forever.\n- A long expiry silently becomes a free option for the customer against you.\n- A quote expiry in wall-clock time means nothing if the chain halts; pair it with a block-height expiry.\n- Buffering the rate protects against adverse moves but can silently overcharge and look like a hidden fee.\n- An invoice can be paid late and still land on-chain before your void; reconcile the on-chain time, not the receipt time.\n- A stablecoin invoice still carries peg risk; the buffer for a stablecoin is depeg risk, not volatility.\n\n## Verification\n\n    python3 -c \"print(int(1500\u002F(rate*1.015)*10**6))\"   # amount in base units\n    # cross-check: amount_base_units \u002F 10**decimals * rate ~= invoice_usd + buffer\n\nReport the locked rate and its timestamp, the base-unit amount, the expiry, and the token contract on the invoice.\n",{"name":5,"description":7},"main","3df1d0d67b30ff15236561f8c0f9f06d33f42dfd","skills\u002Fpayments\u002F0xklen-invoice-in-crypto-with-a-quote-expiry",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-13 02:31:19",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add jiayaoqijia\u002Fcryptoskill --skill invoice-in-crypto-with-a-quote-expiry",{"tool":63,"command":64},"bunx","bunx skills add jiayaoqijia\u002Fcryptoskill --skill invoice-in-crypto-with-a-quote-expiry",{"tool":66,"command":67},"pnpm","pnpm dlx skills add jiayaoqijia\u002Fcryptoskill --skill invoice-in-crypto-with-a-quote-expiry","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-invoice-in-crypto-with-a-quote-expiry\u002FSKILL.md",true,[71,75,81],{"path":72,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":16},"LICENSE","许可证",1063,{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"SOURCE.md","REFERENCE","参考文档",363,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-invoice-in-crypto-with-a-quote-expiry\u002FSOURCE.md",{"path":82,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":83,"sourceHtmlUrl":84},"TRUST.auto.yaml",2217,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fpayments\u002F0xklen-invoice-in-crypto-with-a-quote-expiry\u002FTRUST.auto.yaml",[86,114,137,155,168,178],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":90,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":43},"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.","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",[],[94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],"performance","recipe performance","recipe","mm","sentry","harness","app","deterministic","recipes","flow","cold","critical","analysis","tasks","react","browser","layout","screen","network","metamask",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":118,"licenseFileUrl":119,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":43},"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",[],[123,124,125,126,127,128,129,130,131,132,133,134,135,136],"mexc spot websocket","spot","websocket","api","workflows","public","listen","streams","depth","keys","for","api keys","maintenance","protobuf",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":118,"licenseFileUrl":141,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":43},"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",[],[145,124,146,147,148,149,150,134,133,132,151,152,153,128,154,127,126],"mexc spot rest","REST","admin","signing","Wallet","requests","actions","secure","data","orders",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":118,"licenseFileUrl":159,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":43},"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",[],[163,164,125,165,166,135,133,167,131,130,128,127],"mexc futures websocket","futures","position","ping","subscriptions",{"skillNo":169,"name":170,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":171,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":43},"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",[],[175,176,177],"refresh","0xklen version and refresh sanctions lists","version",{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":182,"sourceHtmlUrl":183,"categories":184,"keywords":185,"publishedAt":43},"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",[],[186,187,188,189,190,191,192,41,193,194,195],"tests","cover","verify tests cover changed lines","verify","coverage","pr","exercise","patch","code","share"]