<?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:  David fadoju</title>
    <description>The latest articles on DEV Community by  David fadoju (@bobo2005).</description>
    <link>https://dev.to/bobo2005</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%2F4053962%2Fdd0659aa-5cc2-40aa-9b52-83b0613b9448.jpg</url>
      <title>DEV Community:  David fadoju</title>
      <link>https://dev.to/bobo2005</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bobo2005"/>
    <language>en</language>
    <item>
      <title>AlphaAgent: A prediction auditor that remembers what tipsters delete</title>
      <dc:creator> David fadoju</dc:creator>
      <pubDate>Wed, 04 Nov 2026 13:12:40 +0000</pubDate>
      <link>https://dev.to/bobo2005/alphaagent-a-prediction-auditor-that-remembers-what-tipsters-delete-26mj</link>
      <guid>https://dev.to/bobo2005/alphaagent-a-prediction-auditor-that-remembers-what-tipsters-delete-26mj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Building a memory-powered quantitative due-diligence agent and autonomous copy-trading bot with Tatum, Sui Testnet, and Walrus Memory&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We have built sports betting and prediction platforms that record almost everything about a wager.&lt;/p&gt;

&lt;p&gt;The matchup. The side. The stake. The payout. Whether the bet won or lost.&lt;/p&gt;

&lt;p&gt;But there is something critical that almost every public leaderboard, social feed, and tipster marketplace still forgets.&lt;/p&gt;

&lt;p&gt;Every weekend the same headlines appear across X, Telegram, and Discord: a self-proclaimed sports "guru" is 5–0 this week, boasting a 100% win rate and selling access to a VIP picks group for \$500 a month.&lt;/p&gt;

&lt;p&gt;Someone sees the streak, trusts the screenshot, and copies the next bet. When the bet loses, the post quietly disappears. By Monday morning, the losing ticket is gone, the bio still says "78% lifetime accuracy," and the next visitor starts evaluating that forecaster from zero.&lt;/p&gt;

&lt;p&gt;Questions that should be central to any financial due-diligence process rarely get answered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Was that prediction actually locked &lt;em&gt;before&lt;/em&gt; kickoff, or posted after the opening drive?&lt;/li&gt;
&lt;li&gt;How many losing picks were made and quietly deleted along the way?&lt;/li&gt;
&lt;li&gt;Did the forecaster actually beat the closing market odds, or just bet heavy favorites at &lt;code&gt;-400&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;Is a 5–0 run genuine predictive skill, or the 1-in-32 coin-flip variance that happens by pure chance every single week?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A raw win-loss counter can show a streak. It almost never preserves the denominator, the closing market baseline, or the unrevealed bets behind it.&lt;/p&gt;

&lt;p&gt;That gap became the foundation for &lt;strong&gt;AlphaAgent&lt;/strong&gt;, a decentralized quantitative due-diligence agent and autonomous copy-trading bot built for the &lt;strong&gt;Tatum × Walrus Total Recall Hackathon&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem: We See Streaks, Not the Deleted Denominator
&lt;/h2&gt;

&lt;p&gt;Imagine following a sports forecaster online. They post five consecutive winners across NFL and NBA games. Five wins, zero losses.&lt;/p&gt;

&lt;p&gt;On the surface, 5–0 looks extraordinary. Most leaderboards immediately rank that account at the top, and most copy-traders rush to allocate bankroll.&lt;/p&gt;

&lt;p&gt;Yet three different realities can hide behind the exact same 5–0 headline:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pure coin-flip variance:&lt;/strong&gt; If 32 people flip a fair coin five times, one of them will land five heads in a row (&lt;code&gt;(0.5)^5 = 3.125%&lt;/code&gt;, or &lt;strong&gt;1 in 32&lt;/strong&gt;). A 5–0 streak requires zero predictive skill to occur naturally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Selective deletion (cherry-picking):&lt;/strong&gt; A tipster locks ten picks before kickoff, watches four of them fall behind by halftime, and only reveals or publicizes the six that won. Without an immutable record of every pre-game commitment, the four abandoned picks vanish from the denominator.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-edge favorites:&lt;/strong&gt; Picking five heavy favorites at 85% implied market probability and going 5–0 is not alpha—and when the inevitable upset arrives, the bettor's bankroll is wiped out.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your wallet knows how much SUI you hold. A block explorer knows that a transaction occurred. Neither automatically remembers whether a forecaster's historical edge beats the closing line after accounting for sample-size shrinkage, forfeited commitments, and category-specific blindspots.&lt;/p&gt;

&lt;p&gt;We have plenty of tools for placing bets and displaying leaderboards, but remarkably few tools for preserving &lt;strong&gt;verifiable forecasting judgment&lt;/strong&gt; over time.&lt;/p&gt;

&lt;p&gt;Knowing that someone won five bets is surface noise. Knowing &lt;em&gt;when&lt;/em&gt; they locked each pick, &lt;em&gt;what&lt;/em&gt; the market odds were at commitment time, &lt;em&gt;which&lt;/em&gt; commits they refused to reveal, and &lt;em&gt;why&lt;/em&gt; their historical calibration fails in specific odds bands is what protects capital.&lt;/p&gt;

&lt;p&gt;I wanted to build an agent that preserves all of that evidence permanently and enforces it mathematically before a single SUI is risked. Not a hype leaderboard. Not a blind copy-trader.&lt;/p&gt;

&lt;p&gt;A quantitative due-diligence agent with permanent memory. That is how &lt;strong&gt;AlphaAgent&lt;/strong&gt; began.&lt;/p&gt;




&lt;h2&gt;
  
  
  Introducing AlphaAgent
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;AlphaAgent&lt;/strong&gt; is a cryptographic due-diligence auditor and Fractional Kelly copy-trading agent built on &lt;strong&gt;Sui Testnet&lt;/strong&gt; and &lt;strong&gt;Walrus Memory&lt;/strong&gt;. It combines four core capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pre-kickoff blockchain commitments:&lt;/strong&gt; &lt;strong&gt;Tatum&lt;/strong&gt; connects AlphaAgent to Sui Testnet RPC to verify &lt;code&gt;alphaagent::commits::PickCommitted&lt;/code&gt; events stamped against the official on-chain Sui Clock (&lt;code&gt;0x6&lt;/code&gt;), inspect transaction blocks, and check live SUI balances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permanent episodic and behavioral memory:&lt;/strong&gt; &lt;strong&gt;Walrus Memory&lt;/strong&gt; (&lt;code&gt;@mysten-incubation/memwal&lt;/code&gt; and direct Walrus Testnet publisher nodes) stores resolved episodes, forfeited commits, synthesized behavioral lessons, and verdict transitions in tamper-evident blobs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic 6-gate statistical auditing:&lt;/strong&gt; A mathematical decision engine evaluates Forfeit Rate, Minimum Sample Size (&lt;code&gt;n &amp;gt;= 15&lt;/code&gt;), Market Information Depth, Bayesian-shrunk Brier Skill Score (&lt;code&gt;k = 10&lt;/code&gt;), 2,000-iteration Bootstrap Confidence, and Category/Lesson overrides before issuing a verdict.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safe-Shield autonomous copy-trading &amp;amp; x402 agent commerce:&lt;/strong&gt; An automated copy-trading bot sizes positions using the Fractional Kelly Criterion (&lt;code&gt;f* = (p - m) / (1 - m)&lt;/code&gt;) exclusively for verified &lt;code&gt;FOLLOW&lt;/code&gt; forecasters, while an HTTP &lt;code&gt;402 Payment Required&lt;/code&gt; gateway lets external AI agents purchase signed audit attestations for &lt;code&gt;0.01 SUI&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The experience walks a quantitative bettor or Web3 trader through the complete lifecycle:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Connect &amp;amp; Explore Directory (&lt;code&gt;/tipsters&lt;/code&gt;):&lt;/strong&gt; Provision a 1-Click Guest Sandbox wallet pre-funded on Sui Testnet (or connect a browser wallet), inspect the live leaderboard sorted by shrunk Brier Skill Score rather than raw streaks, and whitelist verified forecasters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cryptographic Due-Diligence Audit (&lt;code&gt;/check&lt;/code&gt;):&lt;/strong&gt; Paste any Sui address to run the independent mathematical gates, reconcile on-chain Sui commitments against Walrus memory blobs, and inspect every historical pick against the closing market line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Math Behind The Gate (&lt;code&gt;/luck-lab&lt;/code&gt;):&lt;/strong&gt; Drag interactive sliders in the Luck Lab to see why a 5–0 run happens 1 in 32 times by coin-flip chance and why AlphaAgent requires at least 15 verified picks before unlocking a &lt;code&gt;FOLLOW&lt;/code&gt; verdict.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Locking an Immutable Prediction (&lt;code&gt;/pick&lt;/code&gt;):&lt;/strong&gt; Select a live upcoming fixture fetched directly from the ESPN Scoreboard API (NBA, NFL, EPL, UCL, La Liga, Serie A, Bundesliga, NHL), enter a win probability, and commit a salted &lt;code&gt;SHA-256&lt;/code&gt; hash on Sui before kickoff alongside a permanent Walrus storage blob.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous Copy-Trading Bot (&lt;code&gt;/copy-bot&lt;/code&gt;):&lt;/strong&gt; Configure bankroll, Fractional Kelly multiplier (Quarter, Half, or Full Kelly), maximum bet cap, and minimum edge threshold—then run the &lt;strong&gt;Audit &amp;amp; Copy Scan&lt;/strong&gt; to watch Safe-Shield block &lt;code&gt;WATCH&lt;/code&gt; (5–0 coin-toss streaks) and &lt;code&gt;SKIP&lt;/code&gt; (cherry-pickers) while executing mathematically sized copy-trades with on-chain Sui digests and Walrus blob receipts.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every audit produces one of three explicit verdicts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;FOLLOW&lt;/code&gt;:&lt;/strong&gt; Verified predictive alpha. The forecaster has cleared all 6 mathematical gates (&lt;code&gt;n &amp;gt;= 15&lt;/code&gt; resolved picks, forfeit rate &lt;code&gt;&amp;lt;= 10%&lt;/code&gt;, market information depth &lt;code&gt;&amp;gt;= 1.0&lt;/code&gt;, shrunk Brier Skill Score &lt;code&gt;&amp;gt;= +0.02&lt;/code&gt;, 80% bootstrap lower bound &lt;code&gt;&amp;gt; 0&lt;/code&gt;, and no active &lt;code&gt;LESSON&lt;/code&gt; override).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;WATCH&lt;/code&gt;:&lt;/strong&gt; Insufficient statistical proof. The record looks promising (such as a 5–0 hot streak), but the sample size is too small to rule out coin-flip luck. AlphaAgent refuses to risk capital until more picks resolve.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;SKIP&lt;/code&gt;:&lt;/strong&gt; Negative skill, cherry-picking, or behavioral blindspot. The forecaster either underperforms closing market odds, hides more than 10% of their on-chain commits, or triggers a learned Walrus &lt;code&gt;LESSON&lt;/code&gt; rule.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is a closed-loop accountability pipeline:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commit Pre-Kickoff → Verify on Sui via Tatum → Reveal &amp;amp; Capture Market Odds → Resolve Outcome → Persist to Walrus Memory → Synthesize Lessons → Audit &amp;amp; Gate → Size via Fractional Kelly&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Tatum and Walrus?
&lt;/h2&gt;

&lt;p&gt;Building a lie detector for forecasters required two fundamentally different layers of infrastructure.&lt;/p&gt;

&lt;p&gt;The first layer needed to answer questions about &lt;strong&gt;cryptographic time and on-chain state&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Did this forecaster commit their pick hash &lt;em&gt;before&lt;/em&gt; the game kicked off according to the Sui blockchain clock?&lt;/li&gt;
&lt;li&gt;How many total &lt;code&gt;PickCommitted&lt;/code&gt; events has this wallet emitted on Sui?&lt;/li&gt;
&lt;li&gt;Did an external buyer agent's &lt;code&gt;0.01 SUI&lt;/code&gt; payment transaction actually succeed on-chain?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The second layer needed to answer questions about &lt;strong&gt;longitudinal memory and behavioral patterns&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What were the revealed details, de-vigged market probabilities, and resolved outcomes of every past prediction?&lt;/li&gt;
&lt;li&gt;Which on-chain commits were abandoned and never revealed after the game started?&lt;/li&gt;
&lt;li&gt;Does this forecaster consistently lose money when betting high-confidence NBA favorites (&lt;code&gt;&amp;gt;= 75%&lt;/code&gt;) or heavy underdogs (&lt;code&gt;&amp;lt;= 40%&lt;/code&gt;), even if their overall record looks acceptable?&lt;/li&gt;
&lt;li&gt;If the local server database is wiped completely, can the agent reconstruct every forecaster's exact reputation, shrunk Brier Skill Score, and verdict from decentralized memory alone?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither layer can do the job alone. Blockchain timestamps prove &lt;em&gt;when&lt;/em&gt; a commitment happened, but storing rich multi-field evaluation episodes, market baselines, and semantic behavioral lessons directly in smart contract state is rigid and expensive. Conversely, Walrus Memory preserves rich historical episodes and lessons permanently, but needs Tatum's Sui RPC verification to anchor each memory to an unforgeable pre-kickoff timestamp.&lt;/p&gt;

&lt;p&gt;AlphaAgent bridges both layers through a deterministic reconciliation and scoring engine.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Application Architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                       LIVE ESPN SCOREBOARD &amp;amp; ODDS FEED
                  Matchups / Kickoff Times / Market Baselines
                                       |
                                       v
                         PRE-KICKOFF PICK COMMITMENT
                    Canonical JSON + 32-Byte Salt -&amp;gt; SHA-256
                                       |
                    +------------------+------------------+
                    |                                     |
                    v                                     v
                TATUM API                           WALRUS MEMORY
           Sui Testnet JSON-RPC               MemWal SDK + Publisher Nodes
                    |                                     |
      Sui Clock (0x6) Timestamp Check          EPISODE / STATUS / LESSON
      PickCommitted Event Queries             VERDICT Schemas &amp;amp; Blob Proofs
      Account Balance &amp;amp; Tx Inspection         Semantic Recall &amp;amp; Namespace List
                    |                                     |
                    +------------------+------------------+
                                       |
                                       v
                        COMPLETENESS AUDIT INVARIANT
           Sui Commits == Resolved + Forfeited + Disputed + Pending
                                       |
                                       v
                      6-GATE MATHEMATICAL DECISION ENGINE
              Shrunk Brier Skill Score (k=10) + 2,000x Bootstrap
              + Dynamic Lesson Override -&amp;gt; FOLLOW / WATCH / SKIP
                                       |
                    +------------------+------------------+
                    |                                     |
                    v                                     v
           SAFE-SHIELD COPY BOT                   x402 AGENT GATEWAY
      Fractional Kelly: f*=(p-m)/(1-m)         HTTP 402 Challenge (0.01 SUI)
      Blocks WATCH/SKIP · Copies FOLLOW        Signed HMAC-SHA256 Attestation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every module in the repository maps directly to one stage of this pipeline, ensuring that neither Tatum nor Walrus is treated as a decorative wrapper.&lt;/p&gt;




&lt;h2&gt;
  
  
  Integrating Tatum: Cryptographic Time and On-Chain Verification
&lt;/h2&gt;

&lt;p&gt;Tatum serves as AlphaAgent's gateway to Sui Testnet. In &lt;code&gt;src/lib/tatumClient.ts&lt;/code&gt;, the &lt;code&gt;TatumClient&lt;/code&gt; class wraps &lt;code&gt;@mysten/sui/jsonRpc&lt;/code&gt; (&lt;code&gt;SuiJsonRpcClient&lt;/code&gt; and &lt;code&gt;JsonRpcHTTPTransport&lt;/code&gt;) configured with &lt;code&gt;env.TATUM_SUI_RPC_URL&lt;/code&gt; and authenticates requests via the &lt;code&gt;x-api-key&lt;/code&gt; header on the backend so credentials are never exposed to browser clients.&lt;/p&gt;

&lt;h3&gt;
  
  
  Token-bucket rate pacing and resilient failover
&lt;/h3&gt;

&lt;p&gt;Public and free-tier RPC gateways enforce strict throughput limits (~3 requests per second). To prevent burst failures during multi-forecaster directory audits, &lt;code&gt;TatumClient&lt;/code&gt; implements a deterministic token-bucket &lt;code&gt;RateLimiter&lt;/code&gt; enforcing a minimum &lt;code&gt;350ms&lt;/code&gt; interval between consecutive RPC dispatches, paired with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An &lt;strong&gt;indefinite LRU cache&lt;/strong&gt; (&lt;code&gt;max: 10,000&lt;/code&gt; entries) for immutable transaction block lookups (&lt;code&gt;getTransactionBlock&lt;/code&gt;), so once a commit or payment digest is verified, it never consumes redundant RPC quota.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;60-second TTL cache&lt;/strong&gt; for &lt;code&gt;queryEvents&lt;/code&gt; calls looking up &lt;code&gt;MoveEventType: "${PACKAGE_ID}::commits::PickCommitted"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Automatic failover to the Sui Testnet fullnode (&lt;code&gt;https://fullnode.testnet.sui.io:443&lt;/code&gt;) if a gateway timeout or protocol error occurs, ensuring zero downtime during live demos.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Enforcing the Anti-Time Travel and 2-Minute Anti-Stale gates
&lt;/h3&gt;

&lt;p&gt;When a forecaster locks a prediction in &lt;code&gt;src/lib/commitProtocol.ts&lt;/code&gt;, AlphaAgent canonicalizes the pick payload (&lt;code&gt;category&lt;/code&gt;, &lt;code&gt;eventId&lt;/code&gt;, &lt;code&gt;probability&lt;/code&gt;, &lt;code&gt;salt&lt;/code&gt;, &lt;code&gt;side&lt;/code&gt; with alphabetically sorted keys), hashes it with &lt;code&gt;SHA-256&lt;/code&gt;, and builds a Programmable Transaction Block (PTB) calling &lt;code&gt;alphaagent::commits::commit&lt;/code&gt; with the official Sui Clock object (&lt;code&gt;0x0000000000000000000000000000000000000000000000000000000000000006&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;When the forecaster reveals the pick in &lt;code&gt;src/services/revealService.ts&lt;/code&gt;, AlphaAgent uses Tatum to fetch the on-chain transaction block (&lt;code&gt;showInput&lt;/code&gt;, &lt;code&gt;showEffects&lt;/code&gt;, &lt;code&gt;showEvents&lt;/code&gt;, &lt;code&gt;showObjectChanges&lt;/code&gt;) and enforces three cryptographic gates:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Hash Parity Gate:&lt;/strong&gt; The revealed fields and 32-byte salt must hash to the exact &lt;code&gt;commit_hash&lt;/code&gt; emitted in the on-chain &lt;code&gt;PickCommitted&lt;/code&gt; event. Any altered side or probability is rejected as &lt;code&gt;HASH_MISMATCH&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-Kickoff Timestamp Gate:&lt;/strong&gt; The on-chain &lt;code&gt;committed_at_ms&lt;/code&gt; timestamp recorded by the Sui Clock must be strictly prior to the game's kickoff timestamp (&lt;code&gt;commitTs &amp;lt; gameStartTimeTs&lt;/code&gt;). Late posts are rejected as &lt;code&gt;AFTER_KICKOFF&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2-Minute Anti-Stale Line Gate:&lt;/strong&gt; Forecasters cannot commit a hash early and wait an hour to see whether injury news moves the betting line in their favor before revealing. If &lt;code&gt;revealTs - commitTs &amp;gt; 120&lt;/code&gt; seconds, the reveal is flagged &lt;code&gt;LATE&lt;/code&gt; and counted toward the forecaster's forfeit rate.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Completeness Audit Invariant
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;src/services/auditService.ts&lt;/code&gt;, AlphaAgent queries all on-chain &lt;code&gt;PickCommitted&lt;/code&gt; events for a forecaster via Tatum and reconciles them one-by-one against that forecaster's Walrus Memory namespace. It enforces a strict accounting invariant:&lt;/p&gt;

&lt;p&gt;$$\text{Total Commits on Sui} \equiv \text{Resolved Episodes} + \text{Forfeited} + \text{Disputed} + \text{Voided} + \text{Pending}$$&lt;/p&gt;

&lt;p&gt;If a forecaster commits a pick on Sui and refuses to reveal it after their team loses, the unrevealed commit cannot be hidden. AlphaAgent records a &lt;code&gt;FORFEITED&lt;/code&gt; status in Walrus Memory and penalizes the forecaster. Any forecaster whose forfeit rate exceeds &lt;strong&gt;10%&lt;/strong&gt; (&lt;code&gt;MAX_FORFEIT_RATE = 0.10&lt;/code&gt;) automatically fails Gate 1 and receives an immediate &lt;strong&gt;&lt;code&gt;SKIP&lt;/code&gt;&lt;/strong&gt; verdict.&lt;/p&gt;




&lt;h2&gt;
  
  
  Integrating Walrus: Permanent Episodic and Behavioral Memory
&lt;/h2&gt;

&lt;p&gt;While Tatum proves &lt;em&gt;what&lt;/em&gt; was committed on Sui and &lt;em&gt;when&lt;/em&gt;, &lt;strong&gt;Walrus Memory&lt;/strong&gt; gives AlphaAgent a permanent, reconstructible brain that remembers &lt;em&gt;how&lt;/em&gt; each forecaster performs over time and &lt;em&gt;why&lt;/em&gt; specific categories or confidence bands are dangerous.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;src/lib/walrusClient.ts&lt;/code&gt;, &lt;code&gt;WalrusClient&lt;/code&gt; integrates both:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Direct Walrus Testnet Publisher Nodes&lt;/strong&gt; (&lt;code&gt;https://publisher.walrus-testnet.walrus.space/v1/blobs?epochs=5&lt;/code&gt;, with automatic fallback across secondary testnet publishers) to store raw memory buffers and return verifiable on-chain &lt;strong&gt;Walrus Blob IDs&lt;/strong&gt; and &lt;strong&gt;Sui Object IDs&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Walrus Memory SDK (&lt;code&gt;@mysten-incubation/memwal&lt;/code&gt;)&lt;/strong&gt; connected to the Walrus Memory relayer for namespace-scoped storage and semantic vector recall (&lt;code&gt;recallMemories&lt;/code&gt;), governed by a &lt;code&gt;2,000ms&lt;/code&gt; paced write queue so burst logging never triggers relayer throttling.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Four canonical Walrus Memory schemas
&lt;/h3&gt;

&lt;p&gt;Rather than dumping unstructured JSON into storage, AlphaAgent defines four versioned, human-readable, pipe-delimited canonical schemas in &lt;code&gt;MemoryCodec&lt;/code&gt; (&lt;code&gt;src/lib/walrusClient.ts&lt;/code&gt;) stored under forecaster-specific partitions (&lt;code&gt;aa-f-&amp;lt;address_prefix&amp;gt;&lt;/code&gt;) and a global discovery registry (&lt;code&gt;aa-registry&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;EPISODE&lt;/code&gt; (Resolved Pick Record):&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   EPISODE | v1 | forecaster 0x... | category NBA | event nba_game_42 | pick HOME | forecast 0.6500 | market 0.5000 (OddsAPI, de-vigged, ts 1730246400) | outcome win | commit_tx tx_digest_99 | commit_ts 1730246400 | sources agree 2/2 | resolved 1730300000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;STATUS&lt;/code&gt; (Forfeited, Disputed, or Voided Commit):&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   STATUS | v1 | forecaster 0x... | commit_tx tx_abandoned_1 | state forfeited | reason unrevealed by kickoff | ts 1730248000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;LESSON&lt;/code&gt; (Synthesized Behavioral Blindspot Rule):&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   LESSON | v1 | forecaster 0x... | category NBA | band confident | finding: 1 of 5 confident picks won, raw BSS -0.76 | rule: SKIP confident NBA picks until n&amp;gt;=8 and BSS&amp;gt;0 | trigger_n 5 | ts 1730300000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;VERDICT&lt;/code&gt; (Reputation State Transition &amp;amp; Cited Blobs):&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   VERDICT | v1 | forecaster 0x... | state_transition WATCH -&amp;gt; SKIP | category NBA | score -0.7600 | sample_n 5 | cited_lessons blob_id_1 | ts 1730300000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Dynamic Lesson Synthesis: Memory that overrides future decisions
&lt;/h3&gt;

&lt;p&gt;One of the most important capabilities in &lt;code&gt;src/services/lessonEngine.ts&lt;/code&gt; is that AlphaAgent doesn't just passively archive outcomes—it actively learns from them.&lt;/p&gt;

&lt;p&gt;Every 5 resolved picks, &lt;code&gt;LessonEngine.analyzeAndSynthesizeLessons&lt;/code&gt; groups a forecaster's history by sport category and probability band:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;underdog&lt;/code&gt;:&lt;/strong&gt; &lt;code&gt;forecast &amp;lt;= 0.40&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;balanced&lt;/code&gt;:&lt;/strong&gt; &lt;code&gt;0.41 &amp;lt;= forecast &amp;lt;= 0.74&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;confident&lt;/code&gt;:&lt;/strong&gt; &lt;code&gt;forecast &amp;gt;= 0.75&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a forecaster exhibits severe negative calibration in a specific band (for example, &lt;code&gt;rawBss &amp;lt; -0.20&lt;/code&gt;, winning fewer than 40% of &lt;code&gt;confident&lt;/code&gt; picks, or going &lt;code&gt;0-for-3+&lt;/code&gt; on &lt;code&gt;underdog&lt;/code&gt; picks), AlphaAgent automatically synthesizes a &lt;code&gt;LESSON&lt;/code&gt; record and writes it to Walrus Memory along with a &lt;code&gt;VERDICT&lt;/code&gt; state-transition blob citing that lesson.&lt;/p&gt;

&lt;p&gt;Later, when a new pick arrives for that forecaster, &lt;code&gt;decisionEngine.evaluateWithMemoryRecall&lt;/code&gt; queries Walrus Memory (&lt;code&gt;checkLessonOverrideForPick&lt;/code&gt;). If an active &lt;code&gt;LESSON&lt;/code&gt; matches the upcoming pick's category and confidence band, &lt;strong&gt;the recalled memory overrides the evaluation and forces a &lt;code&gt;SKIP&lt;/code&gt; verdict&lt;/strong&gt;—even if the forecaster's aggregate win rate across other bands looks healthy.&lt;/p&gt;




&lt;h2&gt;
  
  
  Building a Mathematical Decision Engine That Refuses the 5–0 Streak
&lt;/h2&gt;

&lt;p&gt;Like a disciplined quantitative fund, AlphaAgent does not ask an LLM to guess whether a tipster "sounds trustworthy." The scoring and decision engines (&lt;code&gt;src/lib/scoringEngine.ts&lt;/code&gt; and &lt;code&gt;src/services/decisionEngine.ts&lt;/code&gt;) are 100% deterministic.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Proper scoring against the de-vigged closing line
&lt;/h3&gt;

&lt;p&gt;For every resolved episode $i \in {1, \dots, n}$ with forecaster probability $f_i$, de-vigged market baseline probability $m_i$, and binary outcome $o_i \in {0, 1}$, AlphaAgent computes the quadratic Brier Score for both the forecaster and the bookmaker market:&lt;/p&gt;

&lt;p&gt;$$\text{BS}&lt;em&gt;{\text{user}, i} = (f_i - o_i)^2, \qquad \text{BS}&lt;/em&gt;{\text{mkt}, i} = (m_i - o_i)^2$$&lt;/p&gt;

&lt;p&gt;The raw &lt;strong&gt;Brier Skill Score ($\text{BSS}_{\text{raw}}$)&lt;/strong&gt; measures the forecaster's proportional improvement over the closing market baseline:&lt;/p&gt;

&lt;p&gt;$$\text{BSS}&lt;em&gt;{\text{raw}} = 1 - \frac{\sum&lt;/em&gt;{i=1}^{n} \text{BS}&lt;em&gt;{\text{user}, i}}{\sum&lt;/em&gt;{i=1}^{n} \text{BS}_{\text{mkt}, i}}$$&lt;/p&gt;

&lt;p&gt;A positive $\text{BSS}_{\text{raw}}$ means the forecaster is more accurate than the de-vigged closing market; a negative score means copying them loses money relative to the market line.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Bayesian prior shrinkage ($k = 10$) and 2,000-iteration bootstrap
&lt;/h3&gt;

&lt;p&gt;Small samples produce extreme, noisy raw skill scores. To prevent a 5–0 coin-flip run from fooling the system, AlphaAgent dampens $\text{BSS}_{\text{raw}}$ toward a zero-skill prior with weight $k = 10$:&lt;/p&gt;

&lt;p&gt;$$\text{BSS}&lt;em&gt;{\text{shrunk}} = \text{BSS}&lt;/em&gt;{\text{raw}} \cdot \frac{n}{n + k} = \text{BSS}_{\text{raw}} \cdot \frac{n}{n + 10}$$&lt;/p&gt;

&lt;p&gt;At $n = 5$ picks, two-thirds of the raw score is shrunk away ($\frac{5}{15} = 0.333$). For example, a 5–0 streak with a raw Brier Skill Score of &lt;code&gt;+41.2%&lt;/code&gt; is dampened to &lt;code&gt;+13.7%&lt;/code&gt;, and simultaneously blocked by the minimum sample gate ($n \ge 15$). In addition, &lt;code&gt;ScoringEngine&lt;/code&gt; runs &lt;strong&gt;2,000 bootstrap resampling iterations&lt;/strong&gt; with replacement to compute the empirical 80% confidence lower bound (&lt;code&gt;bootstrapLowerBound80&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The 6 independent audit gates
&lt;/h3&gt;

&lt;p&gt;Before any forecaster can earn a &lt;code&gt;FOLLOW&lt;/code&gt; verdict, they must pass all six gates in &lt;code&gt;DecisionEngine.evaluate&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Gate&lt;/th&gt;
&lt;th&gt;Requirement&lt;/th&gt;
&lt;th&gt;What It Prevents&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1. Forfeit Rate Gate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;forfeitRate &amp;lt;= 10.0%&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cherry-picking and deleting losing picks after kickoff&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;2. Minimum Sample Size Gate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;n &amp;gt;= 15&lt;/code&gt; resolved picks&lt;/td&gt;
&lt;td&gt;Coin-flip hot streaks (5–0 happens 1 in 32 times by chance)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3. Market Information Depth Gate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$\sum \text{BS}_{\text{mkt}} \ge 1.000$&lt;/td&gt;
&lt;td&gt;Padding win rates by only betting &lt;code&gt;-500&lt;/code&gt; heavy favorites&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;4. Shrunk Skill Score Gate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$\text{BSS}_{\text{shrunk}} \ge +0.0200$&lt;/td&gt;
&lt;td&gt;Following forecasters who fail to beat closing market odds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;5. 80% Bootstrap Confidence Gate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bootstrapLowerBound80 &amp;gt; 0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;High-variance flukes where skill isn't statistically distinct from zero&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;6. Category &amp;amp; Lesson Gate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$n_{\text{cat}} \ge 8$, $\text{BSS}_{\text{cat}} &amp;gt; 0$, no &lt;code&gt;SKIP&lt;/code&gt; Lesson&lt;/td&gt;
&lt;td&gt;Copying a soccer specialist when they make an overconfident NBA pick&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Proving That Walrus Is the True Brain: The Database Wipe &amp;amp; Rebuild Test
&lt;/h2&gt;

&lt;p&gt;A common failure mode in hackathon projects is treating decentralized memory as a write-only log while actually serving the application from a local SQLite or JSON file.&lt;/p&gt;

&lt;p&gt;To prove that &lt;strong&gt;Walrus Memory&lt;/strong&gt; is AlphaAgent's genuine source of truth, I built an automated disaster recovery verification script in &lt;code&gt;scripts/wipe-and-rebuild.ts&lt;/code&gt; (&lt;code&gt;pnpm run test:wipe-rebuild&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Seed a 3-Forecaster Cohort into Walrus Memory:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Novice (&lt;code&gt;0x1111...&lt;/code&gt;):&lt;/strong&gt; 5–0 record (&lt;code&gt;n = 5&lt;/code&gt; wins). Expected verdict: &lt;strong&gt;&lt;code&gt;WATCH&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verified Pro (&lt;code&gt;0x2222...&lt;/code&gt;):&lt;/strong&gt; 18–7 record (&lt;code&gt;n = 25&lt;/code&gt; resolved picks beating the closing line, &lt;code&gt;0&lt;/code&gt; forfeits). Expected verdict: &lt;strong&gt;&lt;code&gt;FOLLOW&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cherry-Picker (&lt;code&gt;0x3333...&lt;/code&gt;):&lt;/strong&gt; 10 resolved wins plus 3 unrevealed &lt;code&gt;FORFEITED&lt;/code&gt; commits (&lt;code&gt;23.1%&lt;/code&gt; forfeit rate). Expected verdict: &lt;strong&gt;&lt;code&gt;SKIP&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Snapshot Pre-Wipe Verdicts:&lt;/strong&gt; AlphaAgent evaluates all three forecasters and writes their verdicts, shrunk Brier Skill Scores, and sample sizes to &lt;code&gt;data/local-cache.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simulate Total Server Failure (&lt;code&gt;unlinkSync&lt;/code&gt;):&lt;/strong&gt; The script deletes &lt;code&gt;data/local-cache.json&lt;/code&gt; from disk and cold-boots the evaluation pipeline with zero local cache.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cold-Boot Reconstruction from Walrus:&lt;/strong&gt; AlphaAgent queries the global &lt;code&gt;aa-registry&lt;/code&gt; namespace on Walrus, discovers all registered forecaster addresses, streams every &lt;code&gt;EPISODE&lt;/code&gt;, &lt;code&gt;STATUS&lt;/code&gt;, and &lt;code&gt;LESSON&lt;/code&gt; blob from each &lt;code&gt;aa-f-&amp;lt;prefix&amp;gt;&lt;/code&gt; partition, and recomputes every statistical profile.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bit-for-Bit Parity Assertion:&lt;/strong&gt; The script asserts that every restored verdict (&lt;code&gt;WATCH&lt;/code&gt;, &lt;code&gt;FOLLOW&lt;/code&gt;, &lt;code&gt;SKIP&lt;/code&gt;), sample size (&lt;code&gt;5&lt;/code&gt;, &lt;code&gt;25&lt;/code&gt;, &lt;code&gt;10&lt;/code&gt;), and shrunk Brier Skill Score matches the pre-wipe snapshot within &lt;code&gt;&amp;lt; 0.0001&lt;/code&gt; tolerance.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Safe-Shield Autonomous Copy-Trading and Fractional Kelly Sizing
&lt;/h2&gt;

&lt;p&gt;Auditing tipsters is valuable for human bettors, but AlphaAgent goes a step further by embedding those verdicts directly into an &lt;strong&gt;Autonomous Copy-Trading Bot&lt;/strong&gt; (&lt;code&gt;src/services/copyTradingBot.ts&lt;/code&gt; and &lt;code&gt;src/lib/kellyCalculator.ts&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;When the bot scans pending pre-kickoff fixtures from monitored forecasters, every candidate trade must pass &lt;strong&gt;Three-Stage Gate Enforcement&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Stage 1 — Anti-Time Travel Gate:&lt;/strong&gt; The match must be more than 1 minute away from kickoff (&lt;code&gt;minsUntilKickoff &amp;gt; 1&lt;/code&gt;), and no duplicate position can exist for that event and forecaster.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 2 — AlphaAgent Safe-Shield Gate:&lt;/strong&gt; The bot queries the forecaster's Walrus Memory namespace and runs &lt;code&gt;decisionEngine.evaluate&lt;/code&gt;. &lt;strong&gt;Only forecasters with a verified &lt;code&gt;FOLLOW&lt;/code&gt; verdict are eligible.&lt;/strong&gt; Any candidate pick from a &lt;code&gt;WATCH&lt;/code&gt; forecaster (such as &lt;code&gt;StreakKing&lt;/code&gt; at 5–0) or a &lt;code&gt;SKIP&lt;/code&gt; forecaster (such as &lt;code&gt;HypeTips&lt;/code&gt; with an 18% forfeit rate) is automatically blocked before capital is touched.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 3 — Fractional Kelly Sizer:&lt;/strong&gt; For approved &lt;code&gt;FOLLOW&lt;/code&gt; picks, &lt;code&gt;KellyCalculator.calculate&lt;/code&gt; computes the exact mathematical stake from the forecaster's probability $p$ and de-vigged market probability $m$ (where fair decimal odds $O = 1/m$ and net odds $b = O - 1$):&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;$$f^* = \frac{b \cdot p - (1 - p)}{b} = \frac{p - m}{1 - m}$$&lt;/p&gt;

&lt;p&gt;To protect the bankroll from estimation variance, AlphaAgent multiplies $f^&lt;em&gt;$ by the user's chosen **Fractional Kelly multiplier&lt;/em&gt;* (default &lt;strong&gt;Quarter Kelly&lt;/strong&gt;, &lt;code&gt;0.25x&lt;/code&gt;) and caps any single position at a configurable maximum percentage of bankroll (e.g., &lt;code&gt;2.5%&lt;/code&gt; or &lt;code&gt;5.0%&lt;/code&gt;), rejecting any bet whose edge $p - m$ falls below the minimum edge threshold (&lt;code&gt;minEdge = 2.0%&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Every executed copy-trade generates a salted &lt;code&gt;SHA-256&lt;/code&gt; commitment hash, logs a permanent &lt;code&gt;COPY_TRADE | v1 | ...&lt;/code&gt; record to Walrus storage (returning a verifiable Walrus Blob ID and Sui Object ID), and records the transaction receipt in the &lt;strong&gt;Executed Copy Trades Ledger&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Machine-to-Machine Agent Commerce via HTTP 402 (&lt;code&gt;x402&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;AlphaAgent is designed not only for human bettors via its web interface, but also as an oracle for other autonomous trading agents in the Web3 agent economy.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;src/services/x402Service.ts&lt;/code&gt; and &lt;code&gt;scripts/buyer-agent.ts&lt;/code&gt;, AlphaAgent implements the &lt;strong&gt;x402 micropayment protocol&lt;/strong&gt; (&lt;code&gt;protocol: "x402/sui-v1"&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Unauthenticated Inquiry → HTTP &lt;code&gt;402 Payment Required&lt;/code&gt;:&lt;/strong&gt; When an external AI agent queries &lt;code&gt;/api/v1/verdict?forecaster=0x...&amp;amp;category=NBA&lt;/code&gt; without payment headers, AlphaAgent returns an HTTP &lt;code&gt;402&lt;/code&gt; challenge containing a unique cryptographic &lt;code&gt;nonce&lt;/code&gt; (&lt;code&gt;inv_...&lt;/code&gt;), a 10-minute expiration window, and an invoice for &lt;strong&gt;&lt;code&gt;0.01 SUI&lt;/code&gt; (&lt;code&gt;10,000,000 MIST&lt;/code&gt;)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-Chain Settlement &amp;amp; Tatum Verification:&lt;/strong&gt; The buyer agent transfers &lt;code&gt;0.01 SUI&lt;/code&gt; on Sui Testnet and retries the request with &lt;code&gt;X-Payment-Digest&lt;/code&gt; and &lt;code&gt;X-Invoice-Nonce&lt;/code&gt; headers. &lt;code&gt;X402Service.verifyPayment&lt;/code&gt; inspects the transaction block via Tatum RPC (&lt;code&gt;effects.status.status === "success"&lt;/code&gt;) and enforces replay protection so a transaction digest can never be redeemed twice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cryptographically Attested Verdict Bundle:&lt;/strong&gt; Upon verification, AlphaAgent releases the full &lt;code&gt;PaidVerdictResponse&lt;/code&gt;—including the 6-gate &lt;code&gt;VerdictBundle&lt;/code&gt;, cited Walrus Memory blob IDs, Sui commit digests, and an &lt;code&gt;HMAC-SHA256&lt;/code&gt; cryptographic attestation seal signed by &lt;code&gt;AlphaAgent_DueDiligence_Authority_SuiTestnet&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The Technical Stack and Engineering Decisions
&lt;/h2&gt;

&lt;p&gt;AlphaAgent is built with a fast, zero-bloat TypeScript stack designed for deterministic verification and instant judge onboarding.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;th&gt;Responsibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Application &amp;amp; API Server&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Node.js, TypeScript (&lt;code&gt;tsx&lt;/code&gt;), Native HTTP (&lt;code&gt;src/server.ts&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Multi-route web UI (&lt;code&gt;/&lt;/code&gt;, &lt;code&gt;/tipsters&lt;/code&gt;, &lt;code&gt;/check&lt;/code&gt;, &lt;code&gt;/memory&lt;/code&gt;, &lt;code&gt;/luck-lab&lt;/code&gt;, &lt;code&gt;/pick&lt;/code&gt;, &lt;code&gt;/copy-bot&lt;/code&gt;, &lt;code&gt;/profile&lt;/code&gt;), REST API, and x402 gateway&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Blockchain &amp;amp; Clock&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sui Testnet via Tatum JSON-RPC (&lt;code&gt;@mysten/sui&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Token-bucket rate-paced (&lt;code&gt;350ms&lt;/code&gt;) RPC queries, &lt;code&gt;PickCommitted&lt;/code&gt; event indexing, balance checks, and tx verification&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Permanent Memory&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Walrus Memory SDK (&lt;code&gt;@mysten-incubation/memwal&lt;/code&gt;) &amp;amp; Walrus Publisher Nodes&lt;/td&gt;
&lt;td&gt;Paced (&lt;code&gt;2,000ms&lt;/code&gt;) blob writes, canonical &lt;code&gt;EPISODE&lt;/code&gt; / &lt;code&gt;STATUS&lt;/code&gt; / &lt;code&gt;LESSON&lt;/code&gt; / &lt;code&gt;VERDICT&lt;/code&gt; codecs, and semantic recall&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Live Sports &amp;amp; Odds&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ESPN Live Scoreboard API &amp;amp; &lt;code&gt;OddsEngine&lt;/code&gt; (&lt;code&gt;src/lib/oddsEngine.ts&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Real-time fixtures across 9 leagues (NBA, NFL, EPL, UCL, UEL, La Liga, Serie A, Bundesliga, NHL) and de-vigged market baselines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Statistical &amp;amp; Decision Core&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ScoringEngine&lt;/code&gt;, &lt;code&gt;DecisionEngine&lt;/code&gt;, &lt;code&gt;LessonEngine&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Shrunk Brier Skill Score ($k=10$), 2,000-iteration bootstrap CI, 6-gate verdict logic, and blindspot rule synthesis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Copy-Trading &amp;amp; Sizing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;CopyTradingBotService&lt;/code&gt; &amp;amp; &lt;code&gt;KellyCalculator&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Three-stage Safe-Shield enforcement and Fractional Kelly position sizing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1-Click Onboarding&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;JudgeModeService&lt;/code&gt; (&lt;code&gt;src/services/judgeModeService.ts&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Instant Ed25519 guest sandbox wallet provisioning on Sui Testnet with zero browser extension friction&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Verification and the 1-Command Proof Suite
&lt;/h3&gt;

&lt;p&gt;Every mathematical and infrastructure claim in the repository is backed by automated test suites (&lt;code&gt;tests/*.test.ts&lt;/code&gt;) and a single end-to-end verification command (&lt;code&gt;pnpm run prove&lt;/code&gt; in &lt;code&gt;scripts/prove.ts&lt;/code&gt;) that validates all 8 core stages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stage 1:&lt;/strong&gt; Tatum Sui RPC token-bucket rate limiter (&lt;code&gt;&amp;gt;= 350ms&lt;/code&gt; spacing verified).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 2:&lt;/strong&gt; Walrus &lt;code&gt;MemoryCodec&lt;/code&gt; lossless serialization and parsing roundtrips.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 3:&lt;/strong&gt; Brier Skill Score and Bayesian prior shrinkage ($\text{BSS}&lt;em&gt;{\text{shrunk}} = \text{BSS}&lt;/em&gt;{\text{raw}} \cdot \frac{n}{n+10}$) plus 2,000-iteration bootstrap bounds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 4:&lt;/strong&gt; &lt;strong&gt;The 5–0 Refusal&lt;/strong&gt;—proving that a &lt;code&gt;5-0&lt;/code&gt; record (&lt;code&gt;100%&lt;/code&gt; win rate) is assigned &lt;strong&gt;&lt;code&gt;WATCH&lt;/code&gt;&lt;/strong&gt; rather than &lt;strong&gt;&lt;code&gt;FOLLOW&lt;/code&gt;&lt;/strong&gt; with explicit missing-sample criteria.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 5:&lt;/strong&gt; &lt;strong&gt;30-Pick Master Qualification&lt;/strong&gt;—proving that a 30-pick forecaster with positive shrunk edge and 0 forfeits clears all 6 gates to earn &lt;strong&gt;&lt;code&gt;FOLLOW&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 6:&lt;/strong&gt; &lt;strong&gt;Dynamic Lesson Synthesis &amp;amp; Recall Override&lt;/strong&gt;—proving that a forecaster losing 4 of 5 confident (&lt;code&gt;&amp;gt;= 78%&lt;/code&gt;) NBA picks triggers a Walrus &lt;code&gt;LESSON&lt;/code&gt; blob (&lt;code&gt;SKIP confident NBA picks until n&amp;gt;=8 and BSS&amp;gt;0&lt;/code&gt;) that overrides their next confident NBA pick to &lt;strong&gt;&lt;code&gt;SKIP&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 7:&lt;/strong&gt; &lt;strong&gt;Completeness Audit Invariant&lt;/strong&gt;—reconciling 3 Sui commits against 2 resolved episodes and 1 forfeit status (&lt;code&gt;100%&lt;/code&gt; completeness, &lt;code&gt;33.3%&lt;/code&gt; forfeit rate).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 8:&lt;/strong&gt; &lt;strong&gt;x402 Machine-to-Machine Micropayment&lt;/strong&gt;—issuing an HTTP &lt;code&gt;402&lt;/code&gt; challenge for &lt;code&gt;0.01 SUI&lt;/code&gt;, verifying settlement on Sui Testnet, and releasing the signed verdict bundle.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Challenges and Lessons From Building AlphaAgent
&lt;/h2&gt;

&lt;p&gt;Building AlphaAgent highlighted several practical truths about designing memory-powered financial and prediction agents.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. A leaderboard without the denominator is an illusion
&lt;/h3&gt;

&lt;p&gt;In prediction markets and sports betting, raw win streaks are the easiest metric to game. Preserving &lt;em&gt;unrevealed commitments&lt;/em&gt; as explicit &lt;code&gt;FORFEITED&lt;/code&gt; status blobs in Walrus Memory turned out to be just as important as storing winning episodes. Once the denominator is immutable, selective memory stops working.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Memory should be able to veto a decision
&lt;/h3&gt;

&lt;p&gt;Storing historical episodes is table stakes; the real breakthrough came when &lt;code&gt;LessonEngine&lt;/code&gt; began synthesizing recurring failure patterns (&lt;code&gt;confident&lt;/code&gt; favorites or &lt;code&gt;underdog&lt;/code&gt; traps) into &lt;code&gt;LESSON&lt;/code&gt; records that actively veto future picks during semantic recall. Memory becomes far more valuable when it can override a naive aggregate score.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Bayesian shrinkage is essential for small-sample agent safety
&lt;/h3&gt;

&lt;p&gt;Without prior dampening ($k = 10$) and a minimum sample gate ($n \ge 15$), any autonomous copy-trading bot will inevitably over-allocate bankroll to lucky novices on 4–0 or 5–0 coin-flip runs. Encoding statistical skepticism directly into the decision engine protects capital before the Kelly sizer ever runs.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Real-world RPC and relayer budgets require disciplined pacing
&lt;/h3&gt;

&lt;p&gt;Operating against live Tatum Sui RPC endpoints and Walrus Memory relayers meant designing around rate limits from day one. Adding a &lt;code&gt;350ms&lt;/code&gt; token-bucket queue with indefinite tx-digest caching for Tatum and a &lt;code&gt;2,000ms&lt;/code&gt; write queue with multi-publisher fallback for Walrus made the application fast and resilient under load.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Zero-friction onboarding makes verification accessible
&lt;/h3&gt;

&lt;p&gt;Not every hackathon judge or visitor wants to install a wallet extension and hunt for testnet faucet tokens before testing an audit flow. Building &lt;strong&gt;1-Click Guest Mode&lt;/strong&gt;—which provisions an ephemeral Sui keypair and lets users lock picks on Sui, inspect Walrus blobs, and run the Copy Bot immediately—made the entire verification loop testable in seconds.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Comes Next for AlphaAgent?
&lt;/h2&gt;

&lt;p&gt;The current version of AlphaAgent proves a foundational thesis: &lt;strong&gt;prediction track records and copy-trading decisions should be governed by pre-kickoff cryptographic timestamps and permanent, reconstructible memory rather than self-reported streaks.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next, I plan to expand AlphaAgent across several dimensions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-oracle decentralized resolution:&lt;/strong&gt; Extending &lt;code&gt;ResolutionEngine&lt;/code&gt; beyond two-source sportsbook/ESPN consensus to support on-chain optimistic oracle feeds and automated smart-contract escrow settlement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encrypted pre-kickoff commitments with automated keeper reveals:&lt;/strong&gt; Allowing forecasters to store encrypted pick payloads that reveal automatically at kickoff so honest forecasters never accidentally forfeit if they are offline when a game starts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-protocol prediction market adapters:&lt;/strong&gt; Expanding beyond sportsbook moneyline markets to audit forecasters across on-chain prediction markets, price-target feeds, and governance outcomes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Portfolio-level Kelly covariance:&lt;/strong&gt; Upgrading &lt;code&gt;KellyCalculator&lt;/code&gt; to account for simultaneous correlated positions across games kicking off in the same time window.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Thoughts: Screenshots Show Streaks. Memory Preserves Evidence.
&lt;/h2&gt;

&lt;p&gt;For years, online tipsters and prediction gurus have relied on the same playbook: broadcast the winners, delete the losers, and let short coin-flip streaks masquerade as expertise.&lt;/p&gt;

&lt;p&gt;When you combine &lt;strong&gt;Tatum&lt;/strong&gt; and &lt;strong&gt;Sui&lt;/strong&gt; with &lt;strong&gt;Walrus Memory&lt;/strong&gt;, that playbook breaks down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;With &lt;strong&gt;Sui and Tatum&lt;/strong&gt;, every prediction is anchored to an official blockchain timestamp before kickoff, and every commit must be accounted for.&lt;/li&gt;
&lt;li&gt;With &lt;strong&gt;Walrus Memory&lt;/strong&gt;, every resolved episode, every unrevealed forfeit, and every learned behavioral blindspot is preserved permanently—surviving even a complete local database wipe.&lt;/li&gt;
&lt;li&gt;With &lt;strong&gt;Bayesian shrinkage and the 6-gate decision engine&lt;/strong&gt;, a 5–0 coin-flip streak is recognized as &lt;code&gt;WATCH&lt;/code&gt; rather than &lt;code&gt;FOLLOW&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;And with the &lt;strong&gt;Safe-Shield Fractional Kelly Copy Bot&lt;/strong&gt;, capital is allocated by verifiable mathematical edge rather than hype.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because seeing a 5–0 streak is easy. Remembering every pick that was locked, every loss that was hidden, and why the math says to wait is what actually protects your bankroll.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evidence over streaks.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Explore AlphaAgent
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live application:&lt;/strong&gt; &lt;a href="https://alpha-agent-backend.onrender.com" rel="noopener noreferrer"&gt;https://alpha-agent-backend.onrender.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tipster Directory &amp;amp; Live Audits:&lt;/strong&gt; &lt;a href="https://alpha-agent-backend.onrender.com/tipsters" rel="noopener noreferrer"&gt;https://alpha-agent-backend.onrender.com/tipsters&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cryptographic Due-Diligence Auditor:&lt;/strong&gt; &lt;a href="https://alpha-agent-backend.onrender.com/check" rel="noopener noreferrer"&gt;https://alpha-agent-backend.onrender.com/check&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Walrus Permanent Memory Inspector:&lt;/strong&gt; &lt;a href="https://alpha-agent-backend.onrender.com/memory" rel="noopener noreferrer"&gt;https://alpha-agent-backend.onrender.com/memory&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Luck Lab:&lt;/strong&gt; &lt;a href="https://alpha-agent-backend.onrender.com/luck-lab" rel="noopener noreferrer"&gt;https://alpha-agent-backend.onrender.com/luck-lab&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-Kickoff Pick Commitment (&lt;code&gt;/pick&lt;/code&gt;):&lt;/strong&gt; &lt;a href="https://alpha-agent-backend.onrender.com/pick" rel="noopener noreferrer"&gt;https://alpha-agent-backend.onrender.com/pick&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous Fractional Kelly Copy Bot:&lt;/strong&gt; &lt;a href="https://alpha-agent-backend.onrender.com/copy-bot" rel="noopener noreferrer"&gt;https://alpha-agent-backend.onrender.com/copy-bot&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hackathon:&lt;/strong&gt; Tatum × Walrus — Total Recall&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track:&lt;/strong&gt; Track 02: Smart Agents for Real Life&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built with:&lt;/strong&gt; Tatum, Walrus Memory (&lt;code&gt;@mysten-incubation/memwal&lt;/code&gt;), Sui Testnet (&lt;code&gt;@mysten/sui&lt;/code&gt;), ESPN Live Scoreboard API, Node.js, and TypeScript.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>showdev</category>
      <category>web3</category>
      <category>blockchain</category>
    </item>
  </channel>
</rss>
