<?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: Brett Moore</title>
    <description>The latest articles on DEV Community by Brett Moore (@moorebrett0).</description>
    <link>https://dev.to/moorebrett0</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3480263%2Fb13d1532-7889-4138-ab2e-6aed590ccaed.jpeg</url>
      <title>DEV Community: Brett Moore</title>
      <link>https://dev.to/moorebrett0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moorebrett0"/>
    <language>en</language>
    <item>
      <title>We Replayed the Nomad Hack. Our Tool Fired at Block 15259101 Zero Minutes In.</title>
      <dc:creator>Brett Moore</dc:creator>
      <pubDate>Mon, 08 Jun 2026 22:56:02 +0000</pubDate>
      <link>https://dev.to/moorebrett0/we-replayed-the-nomad-hack-our-tool-fired-at-block-15259101-zero-minutes-in-57o0</link>
      <guid>https://dev.to/moorebrett0/we-replayed-the-nomad-hack-our-tool-fired-at-block-15259101-zero-minutes-in-57o0</guid>
      <description>&lt;p&gt;In August 2022, the Nomad bridge was drained of $190 million over eight hours. The on-chain signal was there from the very first transaction. Nobody caught it in time.&lt;/p&gt;

&lt;p&gt;We built &lt;a href="https://github.com/moorebrett0/heimdall" rel="noopener noreferrer"&gt;Heimdall&lt;/a&gt; to change that. &lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem With Bridge Security
&lt;/h2&gt;

&lt;p&gt;Cross-chain bridges are the most hacked infrastructure in crypto. Ronin: $625M. Wormhole: $320M. Nomad: $190M. The pattern repeats because bridges hold enormous amounts of locked value and monitoring tooling has never kept up.&lt;/p&gt;

&lt;p&gt;Existing tools like Forta and OpenZeppelin Defender are general-purpose. They weren't built with bridge-specific heuristics in mind. The result: slow alerts, high false-positive rates, and teams flying blind during the most critical minutes of an exploit.&lt;/p&gt;

&lt;p&gt;Heimdall is a focused, open-source bridge monitoring and anomaly detection system built specifically for cross-chain bridges. It watches TVL, mint/burn flows, and transaction patterns in real time and fires alerts when something looks wrong.&lt;/p&gt;




&lt;h2&gt;
  
  
  Three Rules, Three Signals
&lt;/h2&gt;

&lt;p&gt;Heimdall's detection engine is rule-based by design. No black box, no ML, just precise heuristics that map directly to known exploit patterns.&lt;/p&gt;

&lt;p&gt;The three core rules:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;large-fill&lt;/code&gt;&lt;/strong&gt; — fires when a single withdrawal exceeds a configurable % of TVL. Catches the opening move of most bridge drains.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;rapid-drain&lt;/code&gt;&lt;/strong&gt; — fires when N large fills occur within a rolling time window. Catches the copycat cascade that followed Nomad's initial exploit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;imbalance&lt;/code&gt;&lt;/strong&gt; — fires when fills across all chains exceed deposits by a configurable multiplier. The most robust signal: legitimate bridge activity always has deposits on one side. A drain doesn't.&lt;/p&gt;




&lt;h2&gt;
  
  
  Replaying the Nomad Hack
&lt;/h2&gt;

&lt;p&gt;To validate the detection logic, We replayed the Nomad exploit against real on-chain data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setup:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Block range: &lt;code&gt;15259000 → 15261500&lt;/code&gt; (~8 hour window)&lt;/li&gt;
&lt;li&gt;Pre-seeded TVL matching Nomad's actual holdings: $85M USDC, $40M DAI, ~$26.5M WETH, ~$30M WBTC&lt;/li&gt;
&lt;li&gt;1,308 real events indexed from RPC, 1,208 of which were fills&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Results:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[CRITICAL][large-fill]   Single fill of 33.3% of TVL on nomad chain 1
                         @ block 15259101 (+0.0 min into hack)

[CRITICAL][rapid-drain]  20 fills in a 50-block window on nomad
                         for token 0x2260fac5… (WBTC)

[HIGH][imbalance]        WBTC fills exceed deposits by 2,570,626.8%
                         across all chains on nomad
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;First CRITICAL alert: block 15259101, the same block the exploit began.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not ten minutes later. Not after the second wave of copycats. The first transaction.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;large-fill&lt;/code&gt; rule caught a single fill representing 33% of Nomad's total TVL. The &lt;code&gt;imbalance&lt;/code&gt; rule flagged a 2.5 million percent excess of fills over deposits, a number that is simply impossible under any legitimate bridge activity.&lt;/p&gt;

&lt;p&gt;Had Heimdall been running on August 1, 2022, it would have fired before a single copycat joined the drain.&lt;/p&gt;




&lt;h2&gt;
  
  
  What the Numbers Mean
&lt;/h2&gt;

&lt;p&gt;The 2,570,626% imbalance figure deserves a moment. That's not a threshold tuning question. That's not a noisy signal requiring human judgment. That is an unambiguous on-chain fact: millions of dollars leaving a bridge with nothing coming in.&lt;/p&gt;

&lt;p&gt;The Nomad hack was unique because it was chaotic, nearly 300 addresses piled on over 150 minutes, many just copying the original transaction calldata. That chaos is exactly what the &lt;code&gt;rapid-drain&lt;/code&gt; rule was built to catch: not one sophisticated actor, but a flood of sequential large withdrawals in a tight window.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Real-time Telegram alerts&lt;/li&gt;
&lt;li&gt;Public dashboard with live TVL and alert feed&lt;/li&gt;
&lt;li&gt;Retroactive analysis of the Hop Protocol exploit&lt;/li&gt;
&lt;li&gt;Historical false-positive audit against 6 weeks of Across data
The repo is live at &lt;a href="https://github.com/moorebrett0/heimdall" rel="noopener noreferrer"&gt;github.com/moorebrett0/heimdall&lt;/a&gt;. If you work on a bridge team and want your bridge added, open an issue it's just a config file, not a PR into core logic.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Broader Point
&lt;/h2&gt;

&lt;p&gt;Bridges are not going away. Cross-chain activity is growing. The tooling to protect it needs to catch up.&lt;/p&gt;

&lt;p&gt;Heimdall is one piece of that. Open source, focused, and built on the premise that the signal for most bridge exploits is not subtle, it's just not being watched.&lt;/p&gt;

&lt;p&gt;Block 15259101 was eight hours before the last dollar left Nomad. That's eight hours to alert, respond, pause, and potentially save $190 million.&lt;/p&gt;

&lt;p&gt;That window exists for the next bridge too. Heimdall is watching for it.&lt;/p&gt;

</description>
      <category>ethereum</category>
      <category>bridge</category>
      <category>blockchain</category>
      <category>security</category>
    </item>
    <item>
      <title>Liten: A Tiny API Gateway for Solo Devs - Looking for Feedback!</title>
      <dc:creator>Brett Moore</dc:creator>
      <pubDate>Thu, 04 Sep 2025 19:39:52 +0000</pubDate>
      <link>https://dev.to/moorebrett0/liten-a-tiny-api-gateway-for-solo-devs-looking-for-feedback-21od</link>
      <guid>https://dev.to/moorebrett0/liten-a-tiny-api-gateway-for-solo-devs-looking-for-feedback-21od</guid>
      <description>&lt;p&gt;Hey folks, I've been working on &lt;a href="https://www.npmjs.com/package/liten-gateway" rel="noopener noreferrer"&gt;Liten&lt;/a&gt;. A lightweight, developer-friendly API gateway CLI that you can run anywhere - your laptop, Raspberry Pi, cloud VM, wherever. &lt;/p&gt;

&lt;p&gt;I'm hoping to get some feedback from you all to make sure the README makes sense, and you can get data flowing easily. &lt;/p&gt;

&lt;p&gt;Much appreciated!&lt;/p&gt;

&lt;p&gt;Try it out: &lt;code&gt;npm install -g liten-gateway&lt;/code&gt;&lt;br&gt;
Demo video: &lt;a href="https://www.youtube.com/watch?v=v_9V29u7fyU&amp;amp;t=197s" rel="noopener noreferrer"&gt;Running on Raspberry Pi&lt;/a&gt;&lt;br&gt;
Repo: &lt;a href="https://github.com/moorebrett0/liten" rel="noopener noreferrer"&gt;https://github.com/moorebrett0/liten&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>node</category>
      <category>raspberrypi</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
