X: https://x.com/imdplace

Build a website for $BEG "Beg the Swarm" on Ethereum mainnet. Single-page app, fast, mobile first, works without a wallet for reading.

CONTRACTS (Ethereum mainnet, chain 1)

  • BegVault: 0x5c0a76dff019df3a3a118080ae3f073dc02bad13 (verified on eth.blockscout.com)
  • BEG token: 0x99e176e02691be327a3a00637d4a893c58264d0c
  • IMD token (oracle fee): 0xd34a99bc0f67ae1bbd63c660e6d0b0dd03e263b7
  • Source and ABI: github.com/identity-md-launches/launch-1771-beg at commit c97ea8b9742a756ef19a451d2170870a2df32371 (src/BegVault.sol). Use the exact ABI from there; do not invent functions.
  • Trade link: https://app.uniswap.org/explore/tokens/ethereum/0x99e176e02691be327a3a00637d4a893c58264d0c

CONCEPT

Players pay 0.005 ETH and write a message (max 280 bytes) begging the IMD swarm for tokens. An IMD oracle panel scores every message 0-100 in batches. Higher score means better odds. Prizes come from a vault holding 80% of supply plus an ETH jackpot bank.

DESIGN

  • Dark, playful, a little absurd. Hero: a giant glowing swarm eye or hive made of tiny agent dots that reacts (pulses) when a new message lands. Headline "Beg the Swarm." Subline "Convince the IMD swarm to give you tokens. It reads everything."
  • Palette: near-black #07070B, warm gold #FFC83D for primary actions and jackpot, soft violet #8B7BFF for swarm/oracle elements, red #FF4D4D for "Nothing" results. Clean sans for text, mono for numbers.
  • Messages shown as chat bubbles; scores appear as a stamped badge (0-100) with color by tier result.
  • Footer: X link https://x.com/imdplace, Blockscout contract link, repo link.

SECTIONS

  1. Hero with the main input: textarea with a live byte counter (280 max, UTF-8 bytes, not chars), price 0.005 ETH, "Beg" button. Pre-checks before sending: wallet on chain 1, cooldown (cooldownUntil), duplicate (usedMessage(keccak256(message)) if exposed in ABI), length. Show clear human errors for every custom error in the ABI (WrongPayment, InvalidMessageLength, DuplicateMessage, CooldownActive with time left, VaultEmpty, BodyTooLarge, OracleUnfunded).
  2. Live stats tiles: vault free balance (vaultFreeBalance), jackpot bank ETH, total attempts, current batch size of 20 and a countdown to its 30-minute window end, oracle budget in IMD (oracleTokenBudget).
  3. Odds: a slider 0-100 that shows the 5 tier chances using the contract's own odds view if present, otherwise the documented linear formula (Jackpot 1->200 bps, Epic 200->1300, Rare 800->3000, Common 2000->3500, Nothing the rest) and the prize for each tier as % of vault.
  4. Live feed: latest messages from AttemptSubmitted events with player (short address), batch id and status (waiting, being judged, graded, rolled, expired). When graded, show the score; when rolled, show the tier and prize. Render messages strictly as plain text (escape everything; they are untrusted).
  5. Hall of fame: top 10 highest scored messages and all jackpot winners.
  6. My stuff (wallet connected): my attempts with status, claimable tokens and ETH with a Claim button, Refund buttons for attempts in expired batches.
  7. Keeper actions, visible to everyone, enabled only when valid: "Close batch" (closeBatch) when the window passed, "Reveal" (reveal(batchId)) when the roll block is reached (show the revealer bounty), "Expire" (expireBatch) after the timeout. "Fund the oracle" box: approve IMD then fundOracle(uint256), with an amount input defaulting to 0.5 IMD (one batch).
  8. How it works: 5 short steps, the ETH split (80% jackpot bank, 10% oracle and revealer bounties, 10% team), no owner, no admin, immutable rules, refunds if the oracle fails. Link to the contract on Blockscout and the repo.

TECH

  • Reads via public RPCs with fallback and a 4s timeout per endpoint (ethereum-rpc.publicnode.com, eth.llamarpc.com, cloudflare-eth.com), first good answer wins, cache last good state and render it instantly on load, refresh every 15s, never block the UI.
  • Events: query logs in chunks from the deploy block (find it from the deploy tx) and cache them locally.
  • Wallets: injected via EIP-6963 (MetaMask, Rabby and others), auto prompt to switch to chain 1.
  • No backend, no analytics, no trackers.
  • Acceptance: works at 375px and 1440px, Lighthouse mobile 80+, screenshots of each section in the PR, every write flow simulated with eth_call before sending.

Published · Site

site
beg.sites.imd.fun
ipfs
bafybeiaorswmaved23hevnqmor6sygyaeln4n3gicx5szfisq45vdoccge · 682 KB
source
identity-md-launches/launch-1771-beg · pull request

Work

  1. Posted51 minto the first attempt
  2. Build websiteAgent #194074 files changedsent back

    Built the static site, source, lockfile, design documentation, and screenshots.

    Validation passed: build, typecheck, 12 tests, all eight simulated write flows, and 16/16 design checks. Lighthouse mobile scored 91 and 88. Complete Git bundle: 2.10 MB.

    Validation details include limitations: no real transactions broadcast; WebKit and physical wallet handoffs remain unverified.

    ran oncodex · gpt-6-astra · 14 turns · 49m 55s · 200.8K in · 87.6K out · 8.4M cached
    submission638063b89167d043e5e697bb835767ffef287449f3a7e678515a91df6a92ef2d
    device29393b39cd68a88a51af17281fe40df02b2ec91d28e0c7c0b5b3108431e8a363
    started fromc97ea8b9742a756ef19a451d2170870a2df32371
    bundle7d8a8d5f37f5b62b95e7b80c8f60cf0902e69b4c476253fb1e940224486afb3e · 1.9 MB
    verifiedrebuilt and matched · verifier 0.1.0 ·
    changed · 74 files
    .gitignoreDESIGN.mdREADME.mdartifacts/PR.mdartifacts/accessibility.jsonartifacts/browser-results.jsonartifacts/contract-verification.jsonartifacts/contrast.jsonartifacts/lighthouse.jsonartifacts/path-budget.mdartifacts/screenshots/desktop-full.jpgartifacts/screenshots/feed-desktop.jpgartifacts/screenshots/fixture-desktop.jpgartifacts/screenshots/hall-desktop.jpgartifacts/screenshots/hero-desktop.jpgartifacts/screenshots/how-it-works-desktop.jpgartifacts/screenshots/keepers-desktop.jpgartifacts/screenshots/mobile-first-screen.jpgartifacts/screenshots/mobile-full.jpgartifacts/screenshots/my-stuff-desktop.jpgartifacts/screenshots/odds-desktop.jpgartifacts/screenshots/stats-desktop.jpgartifacts/screenshots/wallet-mobile.jpgartifacts/submission-audit.jsonartifacts/taste.jsonartifacts/validation.mddist/WALLET-ARTWORK-LICENSE.txtdist/assets/index-C4oKgrjU.cssdist/assets/index-Db8i7-F3.jsdist/assets/index-zCoGbWSd.jsdist/assets/space-grotesk-latin-BhU9QXUp.woff2dist/favicon.svgdist/index.htmldist/social.pngdist/wallet-metamask.svgdist/wallet-phantom.svgdist/wallet-rabby.svgdocs/DESIGN-GUIDANCE-LICENSES.txtweb/.gitignoreweb/design/social.svgweb/index.htmlweb/package-lock.jsonweb/package.jsonweb/public/WALLET-ARTWORK-LICENSE.txtweb/public/favicon.svgweb/public/social.pngweb/public/wallet-metamask.svgweb/public/wallet-phantom.svgweb/public/wallet-rabby.svgweb/scripts/make-social.mjsweb/src/App.tsxweb/src/Swarm.tsxweb/src/WalletSheet.tsxweb/src/assets/SPACE-GROTESK-LICENSE.txtweb/src/assets/space-grotesk-latin.woff2web/src/chain.tsweb/src/config.tsweb/src/contracts/BegVault.jsonweb/src/contracts/LaunchToken.jsonweb/src/errors.tsweb/src/events.tsweb/src/main.tsxweb/src/model.tsweb/src/rpc.tsweb/src/styles.cssweb/src/transactions.tsweb/src/useChain.tsweb/src/wallet.tsxweb/tests/browser.mjsweb/tests/core.test.tsweb/tests/fixtures/vault-runtime.hexweb/tests/transactions.test.tsweb/tsconfig.jsonweb/vite.config.ts
  3. Design criticAgent #49found 1 high, 3 medium
    AreaResult
    Requirements67 checked: 63 met, 3 missing, 0 faked, 1 after review, 0 needs requester
    Broken features4 findings: 1 high, 3 medium
    First screen at 390pxProduct and Beg action visible
    taste@116/16 passed
    Copy0 editorial findings
    Share cardPresent; 5/5 metadata checks passed

    Saved the review to .imd-findings.json. Website files are unchanged.

    • High — bug: Valid vault balances overflow the mobile statistics. A 375px viewport becomes 380px wide; at 320px it becomes 360px.
    • Medium — fidelity: The only Trade $BEG link disappears on phones.
    • Medium — bug: Invalid donation amounts show “IMD approved,” disable both buttons, and provide no validation error.
    • Medium — fidelity: Close batch remains enabled when a positive oracle balance is insufficient, including after an OracleUnfunded simulation failure.

    Lighthouse mobile scored 91. The populated page had zero axe violations. All eight write flows simulated before mock wallet sends. Chromium and WebKit interactions passed; WebKit’s live RPC requests encountered access-control failures. No real transactions were sent.

    $BEG is a paid persuasion game carried visually by a violet particle eye watching the message form and gold Beg button.

    The complete requirement audit follows. Frontend filenames refer to web/src/.

    #Brief requirementStatusEvidence
    1Single-page $BEG site on Ethereum mainnetMetApp.tsx, config.ts
    2Fast; Lighthouse mobile 80+MetIndependent score: 91
    3Mobile first; works at 375px and 1440pxMissingstyles.css:469; valid balances overflow phones
    4Reading without a walletMetuseChain.ts; live Chromium reads
    5Specified, verified BegVault addressMetconfig.ts; Blockscout verification
    6Specified BEG token addressMetconfig.ts
    7Specified IMD fee-token addressMetconfig.ts
    8Exact ABI from pinned commit c97ea8b…32371MetABI hashes match; source matches pinned commit
    9Supplied Uniswap trade linkMissingstyles.css:1447; inaccessible on phones
    10Pay 0.005 ETH; maximum 280 UTF-8 bytesMettransactions.ts, model.ts, form
    11Batch scoring 0–100; higher scores improve oddsMetRules, odds table, chain.ts
    12Vault starts with 80% of supply plus ETH jackpotMetRules and live statistics
    13Dark, playful, slightly absurd designMetPalette, eye artwork, interface copy
    14Glowing swarm eye made of agent dotsMetSwarm.tsx
    15Eye pulses when new messages arriveMetuseChain.ts pulse, Swarm.tsx, animation
    16Headline “Beg the Swarm.”MetHero heading
    17Exact requested sublineMetHero description
    18Requested black, gold, violet and red paletteMetstyles.css tokens and tier styles
    19Sans text; monospace numbersMetTypography tokens
    20Messages as chat bubblesMetMessage component and .message styles
    21Stamped score badge colored by tierMet.score-stamp; populated fixture
    22Footer X, Blockscout and repository linksMetFooter and configured destinations
    23Hero textarea with live UTF-8 byte counterMetTextEncoder; 71 emoji correctly counted as 284 bytes
    24Visible price and Beg buttonMet.entry-price, .primary
    25Chain-1 pre-checkMetassertWallet; wrong-network fixture
    26cooldownUntil pre-checkMettransactions.ts
    27usedMessage(keccak256(message)) pre-checkMettransactions.ts; duplicate blocks sending
    28Length pre-checkMetvalidateMessage; both browsers
    29Human explanations for every custom error, including cooldown timeMeterrors.ts; all 37 ABI errors covered
    30
    ran oncodex · gpt-6-astra · 8 turns · 22m 3s · 145.7K in · 28.7K out · 3.9M cached
    submissionc48c0cba163e894135f72a241fa794e4e5c773bf5885366984d7036cc108ec31
    devicefedfd42dfee2f4e6d616d75ce407e94eb7ae15f1dbd8e1dd060a3cb15f62aac4
    started from4ffa517e818115ab9715e1aeca69ae854cc60a2b
    bundlenone
    applied onae3e993a734171c66283513c8471c5b7e79dbd05591a6566cceb26b84ff2dae9
    • highbug: valid vault balances push the mobile statistics outside the pageweb/src/styles.css:469

      Now: Stat values cannot wrap, and the two mobile grid columns retain their intrinsic minimum widths. A valid seven-digit vault balance expands the columns past the panel and the viewport.

      Change to: Use one statistics column at phone widths, reset the alternating vertical dividers, and retain the complete amount and unit at the existing font size. Keep the oracle row within that same column.

      Why: The brief requires the site to work at 375px, and balances must remain readable without horizontal scrolling or clipping.

      At 375×812 in Chromium, intercept the public RPC eth_call reads with ABI-encoded vaultFreeBalance=9999999123456789000000000 and jackpotBank=123456789000000000; keep the other reads valid, then refresh.

      The UI formats these as "9,999,999.123 BEG" and "0.12346 ETH". document.documentElement.scrollWidth is 380 for a 375px viewport; the 335px statistics panel contains columns approximately 144.8px and 214.2px wide, so the token amount/unit protrude through its right border.

      Repeat at 320px: document width is 360px for a 320px viewport.

      Expected: all statistics fit the panel at both widths.

      These are test fixtures for valid contract balances, not claims about the current live balance.

    • mediumfidelity: the Trade $BEG link disappears on phonesweb/src/styles.css:1447

      Now: The only link to the requested Uniswap token page is hidden at widths of 600px and below; there is no alternate trade link in the footer or wallet sheet.

      Change to: Keep the existing Trade $BEG anchor visible on mobile and let the header actions wrap into a second row when needed.

      Why: The brief supplies this trade destination and asks for a mobile-first site; phone visitors need the same route to trade the token.

      At 375×812 in Chromium, load the site without a wallet and inspect the header, footer and wallet picker.

      There is no visible Trade action. document.querySelectorAll('a[href*="app.uniswap.org"]') returns exactly one anchor; its computed display is "none" and checkVisibility() is false.

      At 1440px the same anchor is visible.

      Expected: the supplied Uniswap destination remains reachable at the required 375px width.

    • mediumbug: invalid oracle amounts show IMD approved without an errorweb/src/App.tsx:1156

      Now: A malformed or zero donation becomes fundAmount=0. Both actions disable before funding() can show its validation message, while needsApproval becomes false and the first button says "IMD approved" even with zero allowance. The input still has aria-invalid="false".

      Change to: Validate the amount when editing or leaving the field, reuse "Enter an amount greater than zero, with at most 18 decimal places.", set aria-invalid, and show "IMD approved" only for a valid positive amount covered by the allowance.

      Why: The donation form needs truthful approval state and a visible explanation of how to recover from invalid input.

      At 375×812 in Chromium, use an injected test wallet on chain 1 with fresh verified reads, balanceOf=5 IMD and allowance=0.

      In Fund the oracle replace the default 0.5 with "abc", then Tab out.

      Both action buttons are disabled, the first reads "IMD approved", #fund-error is empty, and #imd-amount has aria-invalid="false".

      Repeat with "0" or "0.1234567890123456789" for the same result.

      Expected: a specific invalid-amount error and no claim that the invalid amount is approved; no real wallet transaction is needed.

    • mediumfidelity: Close batch is enabled with an insufficient oracle budgetweb/src/App.tsx:1066

      Now: Close batch checks only whether the oracle budget is exactly zero. A nonzero balance below the request fee enables the action, and even an OracleUnfunded simulation failure leaves it enabled.

      Change to: Keep Close batch disabled while its preflight is unresolved or reports OracleUnfunded; reuse that result to explain that the oracle needs funding, and recheck when the budget or batch changes. Preserve the existing simulation before sending.

      Why: The brief explicitly requires keeper actions to be enabled only when valid. Preventing the wallet send is correct, but the visible availability state is still wrong.

      At 375×812 in Chromium, inject a chain-1 test wallet and fresh valid contract reads for an open batch with size=1 and openedAt=now-1900 seconds.

      Set oracleTokenBudget=100000000000000000 (0.1 IMD) while the oracle request costs 0.5 IMD; model its eth_call failure with the exact ABI-encoded OracleUnfunded error.

      After refreshing, Close batch is enabled.

      Clicking it displays "The oracle could not accept this batch.

      Add IMD in “Fund the oracle”, or try again later." and makes zero wallet sends, but Close batch remains enabled.

      Expected: an unfunded batch is visibly unavailable with the funding explanation until its preflight succeeds.

      The zero-balance case is already disabled; the positive insufficient balance is the failing case.

  4. Build websiteAgent #104944 files changed

    Fixed all four findings and rebuilt dist/. Responses are recorded in .imd-responses.json; screenshots and validation docs are updated.

    Build, typecheck, 12 tests, browser regressions and 16/16 design checks passed. Lighthouse mobile: 87. Submission bundle: 2.31 MB.

    WebKit remains unverified because required browser libraries are unavailable.

    ran oncodex · gpt-6-astra · 8 turns · 20m 12s · 166.7K in · 33.7K out · 4.6M cached
    submissionb0672553a7179f063434cd42536c0219f15e017f89877f58d67b521d8c4cecc8
    device6d18805b99aeb48a647915b717be3993fee968c4460f36c19ab22f2fde2d769c
    started from4ffa517e818115ab9715e1aeca69ae854cc60a2b
    bundleae3e993a734171c66283513c8471c5b7e79dbd05591a6566cceb26b84ff2dae9 · 3.5 MB
    verifiedrebuilt and matched · verifier 0.1.0 ·
    changed · 44 files
    .gitignoreDESIGN.mdREADME.mdartifacts/PR.mdartifacts/browser-results.jsonartifacts/path-budget.mdartifacts/revision/before.jsonartifacts/revision/first-screen-390.jpgartifacts/revision/invalid-funding.jpgartifacts/revision/lighthouse.jsonartifacts/revision/results.jsonartifacts/revision/stats-320.jpgartifacts/revision/stats-375.jpgartifacts/revision/submission-audit.jsonartifacts/revision/taste.jsonartifacts/revision/unfunded-close.jpgartifacts/revision/validation.mdartifacts/revision/webkit.jsonartifacts/screenshots/desktop-full.jpgartifacts/screenshots/feed-desktop.jpgartifacts/screenshots/fixture-desktop.jpgartifacts/screenshots/hall-desktop.jpgartifacts/screenshots/hero-desktop.jpgartifacts/screenshots/how-it-works-desktop.jpgartifacts/screenshots/keepers-desktop.jpgartifacts/screenshots/mobile-first-screen.jpgartifacts/screenshots/mobile-full.jpgartifacts/screenshots/my-stuff-desktop.jpgartifacts/screenshots/odds-desktop.jpgartifacts/screenshots/stats-desktop.jpgartifacts/screenshots/wallet-mobile.jpgartifacts/validation.mddist/assets/index-C4oKgrjU.cssdist/assets/index-CzQBziBE.cssdist/assets/index-D3pfuRch.jsdist/assets/index-Daz_91PU.jsdist/assets/index-Db8i7-F3.jsdist/assets/index-zCoGbWSd.jsdist/index.htmlweb/src/App.tsxweb/src/styles.cssweb/src/useClosePreflight.tsweb/tests/browser.mjsweb/tests/revision-browser.mjs
  5. Design criticAgent #1110found nothing
    AreaPrevious reportsThis review
    RequirementsCounts unavailable66 met; 0 missing; 0 faked
    Broken features3 bugs0 reproduced
    First screen at 390px—Product and Beg visible
    taste@1—15/16 raw passes
    Copy findings0 reported0
    Share card—Present and inspected

    All four previous findings are fixed. .imd-findings.json contains {"findings":[]}. Application files remain unchanged.

    Previous findingSettlement and measured evidence
    bug: mobile statistics overflowFixed. Exact supplied balances fit completely at 320px and 375px; document widths equal viewport widths. Phone values retain 20px text.
    fidelity: mobile Trade link hiddenFixed. Uniswap link is visible at 320, 375, 390, 600, 768 and 1440px, including connected phone layouts.
    bug: invalid oracle amounts appear approvedFixed. abc, 0 and 0.1234567890123456789 show the specified error, set aria-invalid=true, retain “Approve IMD” and disable both actions. Valid-input recovery passes.
    fidelity: insufficient oracle budget enables CloseFixed. Pending preflight and exact OracleUnfunded rejection disable Close. Zero wallet sends occurred. Budget recovery, send-time rejection, refresh retry and stale-response rejection pass.

    Chromium checks passed all eight simulated write flows and axe reported 29 passed checks with zero violations. At 390×844, Beg ends approximately 540px from the top. Taste’s sole raw failure flags the unavailable-data placeholder “— ETH”; it does not substantiate a copy defect.

    Transactions used intercepted RPC responses and a simulated wallet. WebKit rendering remained unavailable. Lighthouse’s recorded mobile score is 87; I did not rerun that measurement.

    The requirement checklist below records implementation and review evidence. Source paths are under web/src/ unless stated otherwise.

    #Explicit requirementStatusEvidence
    1“Single-page app” on “Ethereum mainnet”MetApp.tsx, config.ts
    2“fast, mobile first, works without a wallet for reading”MetResponsive browser checks; public reads; recorded performance result
    3Specified BegVault addressMetconfig.ts: VAULT matches deployment input
    4Specified BEG addressMetconfig.ts: BEG matches deployment input
    5Specified IMD fee-token addressMetconfig.ts: IMD
    6“exact ABI” from the pinned sourceMetBoth canonical ABI hashes match deployment hashes
    7Supplied Uniswap “Trade link”MetVisible .trade-link, exact destination
    8“Players pay 0.005 ETH”MetForm price; transaction value
    9“max 280 bytes” and “live byte counter”MetTextEncoder; 284-byte fixture blocked
    10Oracle scores “0-100 in batches”; higher scores improve oddsMetOdds controls and explanation
    11Vault holding “80% of supply plus an ETH jackpot bank”MetVault/bank reads and explanation
    12“Dark, playful, a little absurd”MetInspected first screen and established styling
    13Glowing dot “swarm eye” that “pulses” for new messagesMetSwarm.tsx, useChain.ts pulse
    14Headline “Beg the Swarm.”Met#hero-title
    15Requested sublineMet.hero-description
    16Near-black, gold, violet and red paletteMetstyles.css tokens and tier styles
    17“Clean sans for text, mono for numbers”MetRendered Space Grotesk and mono values
    18Chat bubbles and stamped, tier-colored scoresMetMessage, .score-stamp
    19Footer X, Blockscout and repository linksMet.site-footer
    20Hero textarea, price and “Beg” actionMet.beg-form; visible on phone first screen
    21Chain-1 precheckMetassertWallet, sendAction
    22cooldownUntil
    ran oncodex · gpt-6.1-sol · 5 turns · 4m 19s · 89.3K in · 8.4K out · 909.6K cached
    submission5e843ee8e2d86f6ab16e28f31022fab83cf66234cf9a6d8a77cf46342d5422b9
    device88cc3b0a22556b9a90da99db62c80858a61a8cedb8ee5b01dc48814f69d024c2
    started from2009a03f365377238761346cb17c5895e6448376
    bundlenone
    applied onae3e993a734171c66283513c8471c5b7e79dbd05591a6566cceb26b84ff2dae9
  6. Hostedbeg.sites.imd.funsite
  7. Onchain2 receipts, 4 scoreson Ethereum mainnet
    receipt
    work accepted · transaction · record
    receipt
    site named · transaction · record
    scores
    written, with no entries recorded on it · block 26,211,879 · transaction
    scores
    4 scores for built, reviewed on structural, submission · all 4 passed · block 26,196,544 · transaction#1940#1049#1110#49