⚡ Flash prediction markets on Sui. Bet in seconds, win instantly.
Blink Market is a flash prediction market platform built on the Sui blockchain that enables users to place ultra-fast bets on real-time events across sports, esports, and crypto markets. The platform is designed around speed and accessibility, leveraging Sui's sub-second transaction finality to create a high-energy betting experience where markets open and close in approximately 10 seconds.
Core Concept Unlike traditional prediction markets that can stay open for days or weeks, Blink Market operates on "flash markets"—rapid-fire betting windows where users must make quick decisions. This creates an arcade-like gambling experience with instant gratification: pick your side, bet fast, and win (or lose) instantly.
Key Features ⚡ Flash Betting Mechanics
Markets last only ~10 seconds, creating urgency and excitement Binary outcomes (Option A vs Option B) for simple decision-making Real-time countdown timers with visual urgency indicators (green → yellow → red) Dynamic odds that shift based on betting pool distribution Instant payouts—winnings deposited directly to your wallet 🏀 Multi-Category Markets
Sports: NBA (Basketball), NFL (Football), Soccer Gaming: Esports Finance: Crypto price predictions Each category features visual avatars and themed styling 🔐 Dual Authentication System
Traditional Sui Wallets: Full dApp-kit integration for crypto-native users zkLogin (Google OAuth): One-click login using Web2 credentials—no wallet extension required, making it accessible to mainstream users 🌉 Cross-Chain Bridging
Integrated LI.FI widget for seamless asset bridging Users can fund their accounts from 30+ chains (Ethereum, Arbitrum, Base, Polygon, etc.) Bridge ETH, USDC, or any token directly to Sui in one transaction Reduces onboarding friction for users with assets on other networks 🎨 Premium UI/UX
Sleek dark theme with Sui-inspired blue color palette Glassmorphism effects, animated gradients, and micro-interactions Responsive design with mobile-first considerations Real-time stats bar showing active bets, total volume, and participants Recent results sidebar for tracking completed markets Technical Stack Frontend: React 18 + TypeScript + Vite Styling: Tailwind CSS v4 with custom design system Blockchain: Sui Network via @mysten/dapp-kit-react Bridging: LI.FI Widget for cross-chain liquidity Icons: Lucide React How It Works Pick Your Side — Choose your prediction for the live event moment Bet Fast — Select your SUI amount (10, 25, 50, or 100) and confirm before the ~10s window closes Win Instantly — Results are determined immediately; winnings auto-deposit to your wallet Blink Market transforms prediction markets into a fast-paced, arcade-style experience—combining the thrill of live sports betting with the transparency and speed of blockchain technology.
Blink Market is a modern React 19 application built with Vite for ultra-fast development and builds. We chose this cutting-edge stack to match the "instant" philosophy of flash betting—everything should feel snappy.
Core Technologies:
React 19 + TypeScript — Latest React features with type safety Vite 7 with SWC — Blazing-fast HMR and builds (sub-second hot reloads!) Tailwind CSS v4 — New CSS-first configuration, no PostCSS config needed @mysten/dapp-kit-react — Official Sui React integration for wallet connectivity @mysten/sui — Core Sui SDK for zkLogin cryptographic primitives @lifi/widget — Cross-chain bridging widget (Partner Technology) Partner Technology Integration 🌉 LI.FI Widget — Cross-Chain Bridging We integrated LI.FI's embeddable widget to solve a critical onboarding problem: users have assets on other chains (Ethereum, Arbitrum, Base, etc.) but need SUI to bet.
typescript // BridgeModal.tsx - LI.FI widget configured for Sui const widgetConfig: WidgetConfig = { variant: 'compact', appearance: 'dark', toChain: 101, // Sui chain ID in LI.FI toToken: '0x2::sui::SUI', // Native SUI token chains: { allow: [1, 42161, 10, 8453, 137, 56, 101], // ETH, Arb, OP, Base, Poly, BSC, Sui }, integrator: 'BlinkMarket', // ... custom Sui-themed styling }; Why LI.FI?
One integration, 30+ chains: Instead of integrating individual bridges, LI.FI aggregates 27+ bridges and finds optimal routes Native Sui support: Unlike many bridging solutions, LI.FI actually supports Sui as a destination Customizable UI: We themed the widget to match our dark Sui aesthetic perfectly Zero backend required: The widget handles everything client-side Hacky bit: We had to manually map Sui token addresses using LI.FI's Move token format (0x2::sui::SUI) since Sui uses a different address scheme than EVM chains.
Sui zkLogin — Web2 Onboarding for Web3 The most technically complex part of the project is our zkLogin integration, allowing users to sign in with Google and get a Sui address—no wallet extension required.
typescript // useZKLogin.ts - Full zkLogin flow implementation const loginWithGoogle = async () => { // 1. Generate ephemeral Ed25519 keypair (temporary signing key) const ephemeralKeyPair = new Ed25519Keypair();
// 2. Fetch current epoch from Sui network const currentEpoch = await getCurrentEpoch(); const maxEpoch = currentEpoch + 10; // ~24 hours validity
// 3. Generate cryptographic randomness and nonce const randomness = generateRandomness(); const nonce = generateNonce(ephemeralKeyPair.getPublicKey(), maxEpoch, randomness);
// 4. Redirect to Google OAuth with our nonce
const oauthUrl = https://accounts.google.com/o/oauth2/v2/auth?nonce=${nonce}&...;
window.location.href = oauthUrl;
};
// After callback with JWT...
const handleCallback = async (jwt: string) => {
// 5. Get deterministic salt from Mysten or generate locally
const salt = await getUserSalt(jwt);
// 6. Derive Sui address from JWT + salt const address = jwtToAddress(jwt, salt, false);
// 7. Generate ZK proof (async, 3-5 seconds) const zkProof = await generateZkProof({ jwt, ephemeralPublicKey, maxEpoch, randomness, salt }); }; The Hacky Part: If the Mysten Labs salt service is unavailable, we fall back to generating a deterministic salt locally using crypto.subtle.digest('SHA-256', ...) from the JWT's sub claim:
typescript // Fallback salt generation - hacky but functional! const sub = payload.sub as string; const data = encoder.encode(sub + 'blink_market_salt_v1'); const hashBuffer = await crypto.subtle.digest('SHA-256', data); return BigInt('0x' + hashArray.map(b => b.toString(16).padStart(2, '0')).join('')).toString(); This ensures users can still log in even if external services are down.
Real-Time Flash Betting System The betting engine uses no backend—everything runs client-side with simulated markets for the hackathon demo. Here's how it creates that addictive, fast-paced feel:
50ms Countdown Timer
typescript
// useCountdown.ts - Smooth countdown with urgency states
useEffect(() => {
const interval = setInterval(() => {
const newTimeLeft = calculateTimeLeft();
setTimeLeft(newTimeLeft);
if (newTimeLeft <= 0) clearInterval(interval);
}, 50); // Update every 50ms for buttery-smooth animation!
return () => clearInterval(interval);
}, [calculateTimeLeft]);
// Urgency states for visual feedback
return {
percentage, // For progress bar width
isUrgent: timeLeft <= 5000 && timeLeft > 2000, // Yellow zone
isCritical: timeLeft <= 2000 && timeLeft > 0, // Red zone (SHAKE!)
formattedTime: ${seconds}.${milliseconds}, // "8.42s" format
};
Self-Managing Bet Lifecycle
typescript
// useFlashBets.ts - Markets spawn before you blink
useEffect(() => {
const interval = setInterval(() => {
if (activeBets.length < 6) {
setActiveBets(prev => [...prev, generateBet()]);
}
}, 6000); // New market every 6 seconds
}, [activeBets.length]);
// Auto-resolve expired bets (runs every 100ms!)
useEffect(() => {
const interval = setInterval(() => {
const now = Date.now();
setActiveBets(prev => prev.filter(bet => {
if (bet.expiresAt <= now) {
// Move to "recent results" with random winner
setRecentBets(old => [{...bet, winner: Math.random() > 0.5 ? 'A' : 'B'}, ...old].slice(0, 10));
return false;
}
return true;
}));
}, 100);
}, []);
CSS Architecture — Sui-Inspired Design System
We built a comprehensive CSS-first design system using Tailwind v4's new @theme directive, with 790+ lines of custom CSS:
css @theme { /* Sui color palette extracted from sui.io / --color-primary: #4DA2FF; / Sui cyan-blue / --color-accent: #00D4FF; / Bright accent / --color-success: #00E5A0; / Option A / Win / --color-warning: #FFB84D; / Option B / Urgent / --color-danger: #FF4D6A; / Critical / Loss */
/* Custom keyframes for betting UX / --animate-countdown-tick: countdown-tick 1s ease-in-out infinite; --animate-shake: shake 0.4s ease-in-out; / When <2s remaining! */ } Notable CSS Hacks:
SVG Noise Overlay — Embedded as a data URI for subtle texture: css .noise-overlay { background-image: url("data:image/svg+xml,%3Csvg..."); opacity: 0.015; } Animated Border Gradient using @property (CSS Houdini): css @property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; } .animated-border { background: conic-gradient(from var(--angle), #4DA2FF, #00D4FF, #00E5A0, #4DA2FF) border-box; animation: rotate-border 4s linear infinite; } Floating Glow Orbs — Large blurred circles with blob animation: css .sui-bg-glow-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(77, 162, 255, 0.3), transparent 70%); filter: blur(80px); animation: blob 20s ease-in-out infinite; } Architecture Decisions Decision Why No backend for demo Focus hackathon time on UX; betting logic simulated client-side React 19 + Vite 7 Latest features, fastest possible DX Dual auth (Wallet + zkLogin) Serve both crypto-natives and mainstream users LI.FI for bridging Single integration vs. 10+ bridge integrations 50ms timer updates Creates visceral urgency that 1s updates can't match localStorage for zkLogin state Persist sessions without a backend auth server What We'd Do Differently in Production Move betting logic on-chain — Currently simulated, would use Sui Move smart contracts Real oracle integration — Price feeds and sports data for actual market resolution Backend salt service — Secure, persistent user salts instead of client-side fallback WebSocket for live updates — Real-time bet pool updates across all users

