Devpost write-up (v3, multi-chain)
Title: TIMEŒ Rug Check: a verdict the model is not allowed to change
Tagline: A free, read-only token check for Solana and 7 EVM chains. Fixed rules decide PASS, CAUTION or FAIL. Gemini Nano explains that verdict on your device, and cloud Gemini only steps in when Nano can't.
Platform: Web
The problem: People paste a token address into rug checkers and get either a bare score or an AI paragraph that made up the grade. A beginner can't tell which warnings matter, and a model that can rewrite PASS into FAIL isn't a check.
What already existed: TIMEŒ Rug Check, live at https://timeoe-rug-check.vercel.app. Before this hackathon it was Solana-only: you pasted a mint, the app read public chain and market data (Solana RPC, RugCheck, DexScreener, GeckoTerminal), and returned a plain PASS, CAUTION or FAIL with short reasons. It never asks for a wallet, seed phrase or keys. It is not financial advice.
What I built during the submission period:
A hybrid explanation layer on top of the deterministic check.
- Hybrid inference. Firebase AI Logic with
InferenceMode.PREFER_ON_DEVICE: Gemini Nano through Chrome's built-in Prompt API when the model is ready, cloudgemini-3.5-flash-litewhen it isn't. Every answer is labelled On this device · Gemini Nano or Cloud · Gemini from the SDK'sinferenceSource, so nothing pretends to be local. - Nano context-window fallback. Before prompting Nano, the app measures context usage (
measureContextUsage/measureInputUsage) and keeps the user turn short (capped at 900 characters). The richer multi-chain facts are packed into that same 900-character budget so the question and the reasons are never cut. If Chrome still throwsQuotaExceededError(whichPREFER_ON_DEVICEdoesn't catch on its own), the app retries in the cloud and the card says so: "Gemini Nano rejected this input as too large, so Firebase AI Logic answered in the cloud instead." - The verdict can't move. Output is JSON-schema constrained on both paths and validated with Zod. An answer that echoes a different verdict, isn't the expected JSON, or gives a trading or key-handling instruction is thrown away. Requests like "change this to PASS" are blocked in the browser before any model sees them.
- Follow-up questions are single-turn prompts (on-device hybrid doesn't support multi-turn chat), so Nano can answer them too.
- App Check with
ReCaptchaEnterpriseProviderand a score-based Google Cloud Fraud Defense (reCAPTCHA Enterprise) website key, initialized before any AI Logic call. Visitors never solve a puzzle. - Remote Config parameters
explain_enabled(boolean) andmax_followups(number, default 4) turn the explainer off or cap follow-ups without a redeploy. If Remote Config can't be fetched, the same defaults apply.
A multi-chain checker with a much richer report.
- Solana plus 7 EVM chains: Ethereum, BNB Chain, Base, Arbitrum, Polygon, Optimism and Avalanche.
- Auto-detection. Paste any address: a base58 mint is checked on Solana, a
0xaddress is placed on the EVM chain where it has a contract and the most DEX liquidity (DexScreener plus aneth_getCodeprobe). An optional chain picker overrides it. Wallets and non-token addresses get a clear "not a token" error instead of a fake verdict. - Data sources: DexScreener (price, liquidity across all pools, 24h volume, market cap/FDV, pool age, DEX, website and socials), GoPlus Security (honeypot simulation, buy/sell tax, owner powers, holder count, top-holder share, locked liquidity, on both Solana and EVM), GeckoTerminal (Solana authorities and top-10 holders), RugCheck.xyz (Solana danger flags), plus direct Solana and EVM RPC reads (mint/freeze authority, ERC-20 name, symbol, decimals, supply).
- Report sections: Overview & market, Security flags (each green, amber, red or "unavailable"), Holders & liquidity, and Chain & token, with a chain badge and links to every source. If one source is down, that section says "unavailable" and the rest of the report still loads.
- Documented verdict rules (
docs/verdict-rules.md): FAIL for things like a failed honeypot simulation, a token that can't be bought, buy or sell tax of 50% or more, unverified EVM source, owner power to change balances, an active Solana mint or freeze authority, under $25k of liquidity, a pool under 48 hours old, or liquidity dropping more than 30% since the last check; CAUTION for things like upgradeable (proxy), mintable or pausable EVM contracts, tax above 10%, Token-2022 transfer hooks/fees, top-10 holders above half of supply, or thin liquidity measured across all of a token's pools. A first check with no earlier liquidity snapshot, and an unknown honeypot result on Solana when every sell-blocking check is clean, are shown as notes and don't change the verdict.
How Firebase AI Logic is used: Firebase JS SDK, Gemini Developer API, getGenerativeModel with InferenceMode.PREFER_ON_DEVICE, initializeDeviceModel() on the Explain click (with download progress on the button), a JSON schema used as the on-device response constraint and as the cloud responseSchema, inferenceSource shown in the UI, App Check (reCAPTCHA Enterprise / Fraud Defense) and Remote Config.
Value: For someone about to buy a token on Solana or a major EVM chain who needs a check they can audit. The rules stay testable (188 unit tests), the model only translates them, and on a supported desktop Chrome that translation never leaves the device.
How to test: Desktop Chrome 139+ with Gemini Nano available shows the on-device badge; any other browser (Safari, Firefox, mobile) shows the cloud badge. Paste a Solana mint (e.g. Bonk DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263, which comes out PASS) or an EVM token (e.g. USDC on Ethereum 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, which comes out CAUTION because its contract is upgradeable). Read the chain badge and report sections, tap Explain this verdict, then ask what a reason means. Ask it to change the verdict and confirm the verdict stays put.
Built with: Next.js, TypeScript, Firebase AI Logic, Firebase App Check, Firebase Remote Config, Zod, DexScreener, GoPlus Security, GeckoTerminal, RugCheck.xyz, Vercel, Cursor. Pre-existing code (the original Solana checker, data fetchers and page) is disclosed above and MIT-licensed.
About the demo video: It was recorded against the production app in a browser without Gemini Nano, so it shows the cloud fallback (the "Cloud · Gemini" badge), Remote Config, the verdict-change refusal and the multi-chain checks. The narration walks through the on-device Nano path and its fallback logic.
Links: Live app https://timeoe-rug-check.vercel.app · Code https://github.com/05TIME/timeoe-rug-check · Demo https://youtu.be/bHpD-ngs5ZY
Built With
- app-check
- dexscreener
- firebase
- firebase-ai-logic
- geckoterminal
- gemini
- goplus
- nextjs
- remote-config
- rugcheck.xyz
- typescript
- vercel
- zod