<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: memosr.eth</title>
    <description>The latest articles on DEV Community by memosr.eth (@memosr).</description>
    <link>https://dev.to/memosr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4192096%2F62c268a2-aff8-413b-889a-867290715878.jpg</url>
      <title>DEV Community: memosr.eth</title>
      <link>https://dev.to/memosr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/memosr"/>
    <language>en</language>
    <item>
      <title>Make your agent gas-aware on Base in 5 minutes</title>
      <dc:creator>memosr.eth</dc:creator>
      <pubDate>Wed, 18 Nov 2026 07:56:51 +0000</pubDate>
      <link>https://dev.to/memosr/make-your-agent-gas-aware-on-base-in-5-minutes-217o</link>
      <guid>https://dev.to/memosr/make-your-agent-gas-aware-on-base-in-5-minutes-217o</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzzchds2tw5xjklytdk9y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzzchds2tw5xjklytdk9y.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Last week Base gas sat on its 0.006 gwei floor for 91% of 2,016 readings. One real spike hit on Nov 10 (2.3x, gone in about 15 minutes). A Uniswap swap cost about $0.0024.&lt;/p&gt;

&lt;p&gt;So the useful question for an agent is not "when is gas cheap?" It is: &lt;strong&gt;"is right now a spike, and what will this transaction cost in dollars?"&lt;/strong&gt; An RPC call gives you gwei. Your agent budgets in dollars.&lt;/p&gt;

&lt;p&gt;This guide adds that answer to an agent in three ways, from fastest to most flexible. Each call is paid per request in USDC over &lt;a href="https://www.x402.org" rel="noopener noreferrer"&gt;x402&lt;/a&gt;: no API key, no signup.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;separate&lt;/strong&gt; Base mainnet wallet with a dollar or two of USDC. No ETH needed: payments are EIP-3009 signatures.&lt;/li&gt;
&lt;li&gt;Node.js 18+&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Never use a key from a wallet that holds real funds. Never paste it into chat or commit it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Option 1: one command, no code
&lt;/h2&gt;

&lt;p&gt;See what the endpoint asks for (free, returns HTTP 402 with the price):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -i &lt;span class="s2"&gt;"https://base-gas-x402-production.up.railway.app/gas?gasLimit=180000"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pay and fetch with the AgentCash CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx agentcash@latest fetch &lt;span class="s2"&gt;"https://base-gas-x402-production.up.railway.app/gas?gasLimit=180000"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;gasLimit&lt;/code&gt; cheat sheet: 21000 ETH transfer, 65000 ERC-20 transfer, 85000 NFT mint, 180000 swap, 1500000 deploy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 2: MCP (Claude Desktop, Claude Code, Cursor)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add base-gas \
  --env &lt;span class="nv"&gt;BUYER_PRIVATE_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0xYOUR_SEPARATE_WALLET_KEY \
  -- npx -y base-gas-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then just ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"What does a Uniswap swap on Base cost right now, in dollars?"&lt;/li&gt;
&lt;li&gt;"Is Base gas high right now, or should I wait?"&lt;/li&gt;
&lt;li&gt;"Is Base or Arbitrum cheaper for a token transfer?"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The server only ever pays one origin and refuses any single payment above $0.05, so a prompt cannot redirect your wallet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 3: in your own code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i @x402/fetch @x402/evm viem
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;wrapFetchWithPaymentFromConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"@x402/fetch"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;ExactEvmScheme&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"@x402/evm/exact/client"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;privateKeyToAccount&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"viem/accounts"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;account&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;privateKeyToAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;BUYER_PRIVATE_KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;pay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;wrapFetchWithPaymentFromConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;schemes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;network&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"eip155:8453"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ExactEvmScheme&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;account&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;pay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="s2"&gt;"https://base-gas-x402-production.up.railway.app/gas?gasLimit=180000"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;gas&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Swap cost (USD):"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;estimatedTransferCost&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;usd&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Fees to sign:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;suggestedFees&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;medium&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;suggestedFees.medium&lt;/code&gt; holds &lt;code&gt;maxFeePerGas&lt;/code&gt; and &lt;code&gt;maxPriorityFeePerGas&lt;/code&gt; in wei, ready for viem's &lt;code&gt;sendTransaction&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;maxFeePerGas&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;maxPriorityFeePerGas&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;suggestedFees&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;medium&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;walletClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendTransaction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;maxFeePerGas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;BigInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;maxFeePerGas&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;maxPriorityFeePerGas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;BigInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;maxPriorityFeePerGas&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;maxFeePerGas&lt;/code&gt; is a ceiling (2x base fee + tip). You pay base fee + tip; the rest is not spent.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple rule for agents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Call &lt;code&gt;/gas&lt;/code&gt; before a transaction and read the USD cost.&lt;/li&gt;
&lt;li&gt;If the cost is above your budget, call &lt;code&gt;/gas/history&lt;/code&gt; and check the verdict (cheap / normal / expensive / flat).&lt;/li&gt;
&lt;li&gt;If it says expensive, wait 15 minutes. On Base, spikes are short.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Endpoints and prices
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Endpoint&lt;/th&gt;
&lt;th&gt;Price&lt;/th&gt;
&lt;th&gt;Returns&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /gas&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$0.002&lt;/td&gt;
&lt;td&gt;Base fee, priority tiers, cost in USD/ETH/gwei, ready-to-sign fees&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /gas/compare&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$0.01&lt;/td&gt;
&lt;td&gt;Same transaction on Base, OP Mainnet, Arbitrum, Ethereum&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /gas/history&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$0.01&lt;/td&gt;
&lt;td&gt;Last N hours, with a cheap/normal/expensive/flat verdict&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /gas/cheapest-window&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$0.02&lt;/td&gt;
&lt;td&gt;Cheapest hour of day from 7 days of data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /health&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;free&lt;/td&gt;
&lt;td&gt;Service status&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A failed call is never charged: settlement happens only on a successful response.&lt;/p&gt;

&lt;p&gt;Docs and code: &lt;a href="https://base-gas-x402.vercel.app" rel="noopener noreferrer"&gt;base-gas-x402.vercel.app&lt;/a&gt; · &lt;a href="https://github.com/memosr/base-gas-x402" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>web3</category>
      <category>base</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>One 25-minute spike made 2 AM the most expensive hour on Base</title>
      <dc:creator>memosr.eth</dc:creator>
      <pubDate>Sun, 18 Oct 2026 12:49:07 +0000</pubDate>
      <link>https://dev.to/memosr/one-25-minute-spike-made-2-am-the-most-expensive-hour-on-base-emk</link>
      <guid>https://dev.to/memosr/one-25-minute-spike-made-2-am-the-most-expensive-hour-on-base-emk</guid>
      <description>&lt;p&gt;I sampled Base mainnet gas every 5 minutes for 7 days: 2,023 readings. 93% of them sat exactly on the fee floor of 0.006 gwei, and a single 25-minute spike on October 15 was enough to make 02:00 UTC the "most expensive hour" of the week.&lt;/p&gt;

&lt;h2&gt;
  
  
  The floor
&lt;/h2&gt;

&lt;p&gt;Base gas is flat almost all the time. In 93.3% of readings the base fee sat at exactly 0.005 gwei and the gas price at 0.006 gwei; 98.3% were within 5% of that. Averaged over the week, gas ran just 1.3% above the floor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp91p0mhjj1eb845cvfbf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp91p0mhjj1eb845cvfbf.png" alt=" " width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The spikes
&lt;/h2&gt;

&lt;p&gt;In 7 days gas left the floor by more than 5% in 23 separate events, most of them a single 5-minute reading. Only one was large: on October 15 the base fee jumped from 0.005 to 0.049 gwei and stayed elevated for about half an hour.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Start (UTC)&lt;/th&gt;
&lt;th&gt;Peak gas price&lt;/th&gt;
&lt;th&gt;vs floor&lt;/th&gt;
&lt;th&gt;Seen for&lt;/th&gt;
&lt;th&gt;Uniswap swap at peak&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Oct 15, 02:24&lt;/td&gt;
&lt;td&gt;0.0499 gwei&lt;/td&gt;
&lt;td&gt;8.3x&lt;/td&gt;
&lt;td&gt;~25 min&lt;/td&gt;
&lt;td&gt;$0.021&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 13, 00:08&lt;/td&gt;
&lt;td&gt;0.0137 gwei&lt;/td&gt;
&lt;td&gt;2.3x&lt;/td&gt;
&lt;td&gt;~10 min&lt;/td&gt;
&lt;td&gt;$0.006&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 13, 00:53&lt;/td&gt;
&lt;td&gt;0.0099 gwei&lt;/td&gt;
&lt;td&gt;1.7x&lt;/td&gt;
&lt;td&gt;~5 min&lt;/td&gt;
&lt;td&gt;$0.004&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 14, 12:34&lt;/td&gt;
&lt;td&gt;0.0091 gwei&lt;/td&gt;
&lt;td&gt;1.5x&lt;/td&gt;
&lt;td&gt;one reading&lt;/td&gt;
&lt;td&gt;$0.004&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oct 17, 21:40&lt;/td&gt;
&lt;td&gt;0.0086 gwei&lt;/td&gt;
&lt;td&gt;1.4x&lt;/td&gt;
&lt;td&gt;one reading&lt;/td&gt;
&lt;td&gt;$0.004&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;On the floor the same swap (180,000 gas) costs $0.0026 and a plain transfer $0.0003. Dollar figures use ETH at $2,387, the Chainlink price on October 17; durations are bounded by the 5-minute sampling, so a spike could have started or ended up to 5 minutes either side. The base fee drove every event: the median priority fee stayed near 0.001 gwei throughout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a "cheapest hour" ranking misleads
&lt;/h2&gt;

&lt;p&gt;Average the week by hour of day and 02:00 UTC comes out 21.6% above the floor, the most expensive hour by far. Leave out the hour of October 15 that held the spike (02:00 to 03:00 UTC) and the same hour drops to +0.2%, no different from any other.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1por2wfzgzadivd5ah6y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1por2wfzgzadivd5ah6y.png" alt=" " width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The ranking also moves week to week. For September 23 to 30 the same method named 08:00 and 14:00 UTC as the hours to avoid; this week it named 02:00. On a chain that sits on its floor, an hour-of-day average mostly records where the week's one or two spikes happened to land.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an agent should do with this
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Transact when the work is ready.&lt;/strong&gt; On a normal hour the floor is the price. Waiting for a cheaper hour saved about 1.3% against the average hour this week, a fraction of a cent on a swap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch for spikes, not schedules.&lt;/strong&gt; The risk is a short burst like October 15, not a daily rush hour. If a batch can wait, check whether gas is above the floor right now and retry in 15 to 30 minutes; every large spike this week was gone within half an hour.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distrust a single week's hour ranking.&lt;/strong&gt; One event can make any hour look expensive. A ranking needs several weeks behind it before it says anything about a time of day.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Budget in dollars.&lt;/strong&gt; At $0.0003 a transfer and $0.0026 a swap, gas is rarely the cost that matters. Price it in dollars before deciding it is worth optimizing at all.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How the data was collected
&lt;/h2&gt;

&lt;p&gt;The readings come from &lt;a href="https://github.com/memosr/base-gas-x402" rel="noopener noreferrer"&gt;base-gas-x402&lt;/a&gt;, an open-source gas API I run on Base. Every 5 minutes it reads the latest block, &lt;code&gt;eth_feeHistory&lt;/code&gt; over 10 blocks and &lt;code&gt;eth_gasPrice&lt;/code&gt; from Base mainnet, and keeps 7 days of samples. The window here is October 11, 12:33 UTC to October 18, 12:32 UTC: 2,023 readings. Each gas price is base fee plus the network's suggested priority fee, in gwei; dollar figures are execution cost only, since Base's L1 data fee was under 1% of the total for these transactions.&lt;/p&gt;

&lt;p&gt;The same data is available to agents, paid per call in USDC over &lt;a href="https://www.x402.org" rel="noopener noreferrer"&gt;x402&lt;/a&gt;, no API key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx agentcash@latest fetch &lt;span class="s2"&gt;"https://base-gas-x402-production.up.railway.app/gas/history?hours=168"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;/gas/cheapest-window&lt;/code&gt; turns it into the answer above: the hours to avoid, the cheapest hour, and the saving against the average hour in percent and dollars, and it says so when timing saves nothing. There is also an &lt;a href="https://www.npmjs.com/package/base-gas-mcp" rel="noopener noreferrer"&gt;MCP server&lt;/a&gt; and an &lt;a href="https://github.com/memosr/base-gas-skill" rel="noopener noreferrer"&gt;agent skill&lt;/a&gt;. Site: &lt;a href="https://base-gas-x402.vercel.app" rel="noopener noreferrer"&gt;base-gas-x402.vercel.app&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>base</category>
      <category>web3</category>
      <category>ai</category>
      <category>ethereum</category>
    </item>
  </channel>
</rss>
