ScoobyDAO

AI investigates rugs; stake on the verdict, keep the principal side, and trade the yield side as YT

ScoobyDAO

Created At

ETHGlobal Mumbai

Project Description

ScoobyDAO: sniff out the rug before it pulls, and get paid while the case runs.

Rug pulls cost crypto users billions every year: nearly $6B in 2025 by mid-April alone, according to DappRadar. Today’s warnings don’t help much. Scanners give you a risk score with no one accountable for it, anyone can call a token a scam on X, and audits are paid for by the project and stop after launch. Nobody does the digging, puts their name on the call and has money riding on being right. Inspired by Hindenburg Research, which published deep investigations and backed them with money, ScoobyDAO does that for tokens, in the open.

It starts with AI agents investigating suspicious tokens. Our detective, Sniff, leads the pack. The Scout watches new tokens and pools, runs quick checks and ranks the most suspicious ones. The Investigators then write a case file covering five areas: trading patterns, onchain history, fundamentals, statistical risk and contract code health. They record what they found, what is still unknown and what points the other way. Every report is fingerprinted with SHA-256, so any change creates a new version.

No AI can publish an accusation by itself. A real person reviews the report and confirms each step with World ID, and that approval is tied to that exact report version. If they deny it or let it expire, nothing happens. Once it’s approved, the report is published onchain and its market opens.

Then the market decides. Anyone can stake dUSD, our test stablecoin, on Yes (“this is a rug”) or No. After 30 days a result is proposed with evidence, anyone can challenge it during a challenge window, and then it’s finalized as Yes, No or Void. The winning side gets its stake back plus 80% of the losing pool. For example, with 80 dUSD on Yes and 20 on No, each Yes dUSD returns 1.20. If the result is Void, everyone gets their money back.

Here’s the twist that makes ScoobyDAO different: your stake keeps working. A case takes a month, so stakes would normally sit idle. ScoobyDAO splits every stake in two, like Pendle’s principal and yield tokens. The principal side is your Yes/No position: it pays out on the verdict and can’t be transferred. The yield side, called YT, is minted one-to-one when you stake. It earns the interest on the locked stake whatever the verdict, and it’s freely tradable.

YT trades on our custom Uniswap v4 hook, which prices it on an interest-rate curve that moves with demand and shrinks as maturity approaches. You can even stake and sell your YT in a single transaction. You keep your vote and get dUSD back right away, so less of your money is at risk. YT buyers get exposure to the yield, and liquidity providers earn the yield on YT held in the pool. Because the YT price reflects interest and not the verdict, the market for truth and the market for yield stay separate.

You can also stake from another chain. With Chainlink CCIP you can stake from Arbitrum Sepolia, and a vote counts only once it’s credited on Ethereum. Late messages become withdrawable receipts instead of votes, and malformed ones are held safely.

What’s live today: the report registry, stake vault, yield token and Uniswap v4 hook market on Ethereum Sepolia, plus a CCIP sender on Arbitrum Sepolia with a delivered cross-chain vote. There’s a Next.js app for cases, reports, staking, YT trading, cross-chain tracking and claims, and a FastAPI backend that runs the agents and human checkpoints. We’re upfront about the demo: dUSD is a test token, the yield is simulated, and the demo roles are held by the team wallet.

Built with World ID, Chainlink CCIP and Uniswap v4.

How it's Made

ScoobyDAO is built across four repositories that fit together. ScoobyDAO-web is the Next.js app. ScoobyDAO-backend is the Python service that runs the AI agents, the World ID human checkpoints and the publisher. SmartContracts is the Foundry suite deployed on Ethereum Sepolia and Arbitrum Sepolia. ScoobyDAO-seed is a private repository of hash-pinned evidence packages for our six historical reference cases. It holds captured third-party data, so it stays private for licensing reasons, but every package is pinned by SHA-256 and the backend checks those hashes before anything is shown. The core rule across all of them is that only a verified human can turn an AI’s investigation into an onchain market.

-> SmartContracts (Solidity, Foundry, Ethereum Sepolia + Arbitrum Sepolia)

ReportRegistry stores each published case: a report hash, a claim hash and its timings (cross-chain cutoff, lock time, result deadline, challenge period). It only accepts a publish call from the publisher, with a reviewer’s EIP-191 signature over the exact report, a single-use nonce and an expiry, so nothing can open a market without a fresh approval. RiskFiStakeVaultV2 is the market. A stake in dUSD records a non-transferable Yes/No position (the principal side) and mints the same amount of YT (the yield side) to the staker in the same transaction. It also handles settlement. After maturity the resolver proposes Yes, No or Void with an evidence hash. Anyone can challenge within the window, and an adjudicator decides. Anyone can finalize, and a case that passes its deadline becomes Void. Winners get their stake back plus 80% of the losing pool, with a 20% fee taken from the losing pool only. Claims stay open for 90 days. A StakeReceiptREP token lets users deposit dUSD 1:1 now and stake later, or withdraw any time. StakerYieldToken (YT) uses a global yield index with per-holder checkpoints on every mint and transfer, so a late buyer can never claim yield earned before they held the token. Yield is paid whatever the verdict. That is the PT/YT split, modelled on Pendle’s principal/yield tokenization but adapted so a losing voter still forfeits principal. YieldCurveHookV2 is a custom Uniswap v4 hook that owns its own YT/dUSD inventory and uses v4 custom accounting instead of normal concentrated liquidity. It prices YT on a bounded interest-rate curve: the implied rate is an anchor plus a slope times net YT bought, clamped between a minimum and a maximum. The YT price is that rate multiplied by the time remaining, so it decays toward maturity. Liquidity providers get RF-YLP shares and earn the yield on YT held by the pool through a yield-per-share index. YieldCurveFactoryV2 deploys the hook at a mined CREATE2 address with the required v4 permission bits. A custom YieldSwapRouter settles input inside the PoolManager unlock callback. StakeAndSellRouterV2 stakes, mints YT and sells it through the hook in one transaction, so a user keeps their vote and gets dUSD back immediately. Slippage protection reverts the whole action. CCIPStakeSenderV2 on Arbitrum Sepolia and CCIPStakeReceiverV2 on Ethereum Sepolia carry funded votes. dUSD is a Chainlink Cross-Chain Token with a BurnMintTokenPool, so the same token exists on both chains. The receiver checks the router, source chain, sender and token, and blocks replays by source nonce. A valid on-time message is credited as a vote. A late one becomes REP receipts for the payer instead of a vote. A malformed one is held and can be recovered. A delivered message is never counted as a vote until it is credited. Tests include eight-voter end-to-end workflows (local plus CCIP votes, yield, settlement and claims), Void and challenged verdicts, principal-loss scenarios, 256 fuzzed buy/sell round trips with quote/swap equality, and fork tests against the deployed state. All contracts are verified on Etherscan and Arbiscan.

-> ScoobyDAO-backend (Python 3.11, FastAPI, SQLite, Huey worker, Docker, Render) The Scout (discovery) module watches new tokens and pools, runs deterministic checks and ranks cases by how actionable they are. Cases that meet a strict policy (several independent verified concern groups) go straight to investigation; the rest wait for a human. The Investigation module researches five pillars: market microstructure, onchain mechanics, fundamentals and sentiment, statistical risk and technical health. It uses source adapters plus a bounded LLM reasoning step, and keeps evidence, unknowns and counterevidence. Output follows a frozen, versioned JSON schema (report v0.2). Every artifact is hashed with SHA-256 over the exact bytes, and a renderer produces HTML and PDF case files with a portable evidence index. A durable job queue runs investigations with lease-based workers.

-> ScoobyDAO-seed (private evidence packages) The six reference cases in the app replay real research from captured evidence: price histories, model outputs and source snapshots. That data comes from third parties we can’t redistribute, so it lives in a separate private repository. Each package is pinned by SHA-256 in a manifest. The backend imports it into its data volume and re-checks every hash before rendering, and the web app shows an integrity error instead of the data if anything doesn’t match. This keeps the public repos open source while the licensed evidence stays private, and anyone can still verify that what they see matches the pinned bytes.

-> World ID integration (the human checkpoints, in ScoobyDAO-backend) We integrated World ID through auth.world.org OpenID Connect. Our agents are headless, so we use the OAuth Device Authorization Grant: the backend starts a request, and the reviewer approves it in World App with a short code. The client authenticates with private_key_jwt (RS256), never a shared secret. Every ID token is validated against World’s JWKS for issuer, audience, expiry, authentication time and assurance level. Tokens that carry delegation claims are rejected, so an agent can never pass as the human. World App only shows the requesting app and the code, not what is being approved. So we bind each approval on our server to the exact case or report digest, decision, audience, nonce and expiry, and show that digest to the reviewer before the code. The result is checked again on confirmation and recorded as an append-only receipt; database triggers block edits. Permission is separate from identity: an enrolled-reviewer allowlist with scopes (case investigation, report review, publication) decides what a verified person may do. Session and device codes are stored only as hashes. There are three checkpoints: “go for investigation”, “report sign-off” and a separate “publish” sign-off. After approval, an attestor key signs the registry’s approval digest, and a fenced outbox publisher sends publish() exactly once, using the onchain nonce as a backstop against duplicates. Denied, expired or cancelled attempts start nothing and publish nothing. The whole flow is tested against a fake World issuer with its own keys (200+ backend tests).

-> ScoobyDAO-web (Next.js 16, TypeScript, Tailwind 4, wagmi 2 + viem, RainbowKit, TanStack Query, React Three Fiber, Vitest, Vercel) All chain access goes through one protocol adapter layer, so pages never touch raw ABIs. ABIs come straight from the SmartContracts deployment bundle and are checked against a SHA-256 manifest. On load, a deployment check confirms the vault, hook, routers, receiver and sender are wired to each other as expected, and disables writes if they aren’t. Every transaction is a planned set of steps (approve, then act) that is simulated and gas-estimated before sending. Reverts are replayed at the failing block to show the real reason. Market phases and countdowns come from the latest block timestamp, never the user’s clock. The browser recomputes the SHA-256 of the report bytes to check them against the published hashes. A CCIP tracker follows each cross-chain vote through sent, in transit, credited, deferred-as-REP or held. The landing page has a 3D scene with a 2D fallback, and respects reduced motion.

-> How the partner technologies helped World ID lets us prove that a live, unique human approved a specific accusation, not an agent holding someone’s password. That is the trust anchor for publishing claims about real tokens. Uniswap v4 hooks let us build a market for yield, not just a swap: custom accounting, our own pricing curve and atomic stake-and-sell. Chainlink CCIP let us accept funded votes from another chain with clear, recoverable outcomes, and its Cross-Chain Token standard gave us one dUSD across both chains.

-> Hacky and notable details Our first live CCIP delivery ran out of callback gas and had to be retried manually. We raised the receiver’s callback gas to 1.5M and rebuilt Chainlink’s packed GenericExtraArgsV3 encoding byte for byte in TypeScript. CCIP chain selectors are larger than JavaScript’s safe integer range, so they live as strings and BigInts. The hook-owned v4 market can’t be routed through Universal Router, Permit2 or V4Quoter, so we wrote our own router and read quotes straight from the hook. The real market has a 30-day maturity, so we deployed a second, flexible registry and vault with minute-long windows to show the full lifecycle (stake, propose, challenge window, finalize, claim) live on testnet. We split licensed evidence into a private hash-pinned repo so the rest of the project could be fully open source. We built a fixture chain that enforces the same rules as the contracts for offline demos, and aliased an optional wallet SDK dependency to a stub to get the Next.js build passing.

background image mobile

Join the mailing list

Get the latest news and updates