<?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: jackpeking</title>
    <description>The latest articles on DEV Community by jackpeking (@jackpeking).</description>
    <link>https://dev.to/jackpeking</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%2F4233348%2Fcb5b9ce9-c0aa-4c87-a739-ad7b8c918ce5.png</url>
      <title>DEV Community: jackpeking</title>
      <link>https://dev.to/jackpeking</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jackpeking"/>
    <language>en</language>
    <item>
      <title>Why Parsing 35 Bytecode Flags in an LLM Prompt is Slowing Down Autonomous Trading Agents</title>
      <dc:creator>jackpeking</dc:creator>
      <pubDate>Sun, 08 Nov 2026 09:34:57 +0000</pubDate>
      <link>https://dev.to/jackpeking/why-parsing-35-bytecode-flags-in-an-llm-prompt-is-slowing-down-autonomous-trading-agents-1kd4</link>
      <guid>https://dev.to/jackpeking/why-parsing-35-bytecode-flags-in-an-llm-prompt-is-slowing-down-autonomous-trading-agents-1kd4</guid>
      <description>&lt;p&gt;Over the past few months building execution loops for autonomous trading agents across EVM and Solana, our engineering team ran into an architectural bottleneck: &lt;strong&gt;the "raw data supermarket" anti-pattern in Web3 security APIs.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When an autonomous LLM agent decides to execute an on-chain action (a swap, liquidity provision, or smart contract interaction), existing security tooling dumps 35+ unopinionated bytecode flags over HTTP:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;is_honeypot: false&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;has_blacklist: true&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hidden_owner_slot: 0x0...&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sell_tax: 0.15&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;can_take_back_ownership: false&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;...and expects the LLM prompt to reason through what combination constitutes a critical rug pull.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Flaws of Prompt-Level Bytecode Reasoning
&lt;/h2&gt;

&lt;p&gt;Running this in high-frequency agent loops exposes two fatal problems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Latency and Token Overhead&lt;/strong&gt;: Injecting a 2KB JSON blob of raw security telemetry into every trade evaluation burns context tokens and spikes reasoning latency by 400ms–1,200ms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hallucination Under Ambiguity&lt;/strong&gt;: LLMs are probabilistic engines. Under edge cases (e.g., dynamic tax hooks or multi-sig proxies), small variations in system prompts cause models to misjudge dangerous trapdoors.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  First Principles: "The Verdict is the Product"
&lt;/h2&gt;

&lt;p&gt;For autonomous execution pipelines, agents don't need raw telemetry; they need a &lt;strong&gt;deterministic go/no-go boundary&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We designed &lt;strong&gt;GuardDog&lt;/strong&gt; (&lt;code&gt;https://guarddog.top&lt;/code&gt;) around a single principle: evaluate the bytecode deterministically off-chain, and return an actionable verdict within &lt;strong&gt;23ms (P95 server-side)&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Verdict Specification:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PASS&lt;/strong&gt;: Clean contract, mainstream liquidity verification, zero trapdoor bytecode.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WARN&lt;/strong&gt;: High tax, unrenounced ownership, or unverified proxy logic (requires downstream agent risk threshold logic).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BITE&lt;/strong&gt;: Verified honeypot, transfer blacklists, or malicious drain logic. Immediate execution abort.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Integrating with Rust Agents (Rig Framework)
&lt;/h2&gt;

&lt;p&gt;Following the community interest check on Rig issue #2908, we submitted the integration PR to &lt;strong&gt;awesome-rig&lt;/strong&gt; (&lt;a href="https://github.com/0xPlaygrounds/awesome-rig/pull/24" rel="noopener noreferrer"&gt;PR #24&lt;/a&gt;) and open-sourced the Rust client &lt;a href="https://github.com/Guarddog-top/guarddog-rs" rel="noopener noreferrer"&gt;guarddog-rs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here is the entire 90-line implementation using standard &lt;code&gt;reqwest&lt;/code&gt; + &lt;code&gt;serde&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;serde&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Deserialize&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;#[derive(Debug,&lt;/span&gt; &lt;span class="nd"&gt;Deserialize,&lt;/span&gt; &lt;span class="nd"&gt;PartialEq)]&lt;/span&gt;
&lt;span class="nd"&gt;#[serde(rename_all&lt;/span&gt; &lt;span class="nd"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"UPPERCASE"&lt;/span&gt;&lt;span class="nd"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;Verdict&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Pass&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Warn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nd"&gt;#[serde(alias&lt;/span&gt; &lt;span class="nd"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"BLOCK"&lt;/span&gt;&lt;span class="nd"&gt;)]&lt;/span&gt;
    &lt;span class="n"&gt;Bite&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// the API returns BLOCK; BITE is the brand name&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nd"&gt;#[derive(Debug,&lt;/span&gt; &lt;span class="nd"&gt;Deserialize)]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;SafetyReport&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;verdict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Verdict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;risk_score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;covered&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;reasons&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Vec&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;data_limited&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;GuardDog&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="nn"&gt;reqwest&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="n"&gt;base_url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;GuardDog&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;Self&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;Self&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="nn"&gt;reqwest&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
            &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"https://api.guarddog.top/v1"&lt;/span&gt;&lt;span class="nf"&gt;.to_string&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="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;contract&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;SafetyReport&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;reqwest&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// NOTE: the param name is `target`, not `address`&lt;/span&gt;
        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nd"&gt;format!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{}/check?chain={}&amp;amp;target={}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.base_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;contract&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.client&lt;/span&gt;&lt;span class="nf"&gt;.get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.send&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="py"&gt;.json&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;SafetyReport&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="k"&gt;.await&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;h3&gt;
  
  
  Usage in an Agent Loop:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;guard&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;GuardDog&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;guard&lt;/span&gt;&lt;span class="nf"&gt;.check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"solana"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"TokenContractAddressHere"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;report&lt;/span&gt;&lt;span class="py"&gt;.verdict&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nn"&gt;Verdict&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Bite&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Malicious contract detected: {:?}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;report&lt;/span&gt;&lt;span class="py"&gt;.reasons&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;ExecutionResult&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Aborted&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;h2&gt;
  
  
  Reproducible Testing: Open Benchmarks Over Marketing
&lt;/h2&gt;

&lt;p&gt;To ground our detection claims, we open-sourced the &lt;strong&gt;Agent Honeypot Benchmark (AHB-1000)&lt;/strong&gt; on GitHub:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repository&lt;/strong&gt;: &lt;a href="https://github.com/guarddog-top/agent-honeypot-benchmark" rel="noopener noreferrer"&gt;https://github.com/guarddog-top/agent-honeypot-benchmark&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dataset&lt;/strong&gt;: 1,000 real-world malicious contracts collected from academic corpora and live DEX telemetry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Results&lt;/strong&gt;: 100% dataset coverage (1,000/1,000 contracts evaluated, zero unhandled errors), 48.1% alert rate on active deceptive tokens, 0.0% false positives across top 100 mainstream liquidity pairs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Developer Free Tier
&lt;/h2&gt;

&lt;p&gt;We provide an anonymous, zero-signup free tier (50 checks/day per IP):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Direct endpoint: &lt;code&gt;https://api.guarddog.top/v1/check?chain=solana&amp;amp;target=&amp;lt;CONTRACT&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;LLM Machine-readable spec: &lt;code&gt;https://guarddog.top/llms.txt&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;npm package: &lt;a href="https://www.npmjs.com/package/guarddog-mcp" rel="noopener noreferrer"&gt;guarddog-mcp&lt;/a&gt; — &lt;code&gt;npx guarddog-mcp&lt;/code&gt; runs it locally in seconds.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Let's Discuss
&lt;/h3&gt;

&lt;p&gt;For developers building autonomous trading agents and MCP workflows: &lt;strong&gt;how are you currently handling contract risk boundaries? Do you offload deterministic checks to specialized APIs, or do you let your prompt reason over raw data?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>ai</category>
      <category>web3</category>
      <category>autonomousagents</category>
    </item>
  </channel>
</rss>
