Linea Hub

Linea Hub

-

Project Context

Linea needed a platform to showcase its growing ecosystem. Beyond a simple directory, the goal was to create an engagement hub capable of attracting and retaining users through gamification mechanics.

Linea Hub addresses this need by combining application discovery, market data aggregation, and a daily rewards system.

Key Features

App Directory

A comprehensive catalog of applications in the Linea ecosystem:

  • Category Navigation: DeFi, NFT, Gaming, Infrastructure, etc.

  • Detailed Listings: description, links, contracts, statistics

  • Analytics Integration: usage data via Dune Analytics

  • Leaderboard: apps ranked by popularity

Token Hub

Token data aggregation on Linea:

  • Simplified Swap: integration with LI.FI

  • Market Data: market cap, volume, 24h change

  • History: price charts across different periods

Daily Spin Game

The heart of user engagement: a daily game with real crypto rewards.

Principle

Every day, users can spin a wheel to win crypto rewards (ETH, USDC, partner tokens).

Technical Architecture

The system uses an innovative architecture guaranteeing fairness:

  • SpinGame Smart Contract: Manages rewards and draws

  • VRF: Verifiable onchain random number generation

  • GenerateRandom Contract: Contract responsible for generating random numbers

  • Alchemy Webhooks: Real-time transaction monitoring

Game Flow

  1. User clicks "Spin" and submits their transaction

  2. SpinGame contract registers the request

  3. Randomness Generator service listens to events and initiates a transaction to the GenerateRandom contract

  4. GenerateRandom contract generates a random number and calls SpinGame contract via a callback

  5. SpinGame contract callback determines the prize

  6. User claims their potential reward via a transaction

Security Guarantees

  • Provable Fairness: VRF guarantees randomness

  • Transparency: all draws verifiable onchain

  • Daily Limit: one free spin per wallet per day

  • Ability to Earn More Spins: certain actions (e.g., providing liquidity on Aave) allow earning additional spins

Technical Architecture

Backend

  • NestJS for API and orchestration

  • PostgreSQL for user data persistence

  • Alchemy Webhooks for onchain monitoring

Frontend

  • Next.js with hybrid rendering

  • React for UI

  • wagmi/viem for blockchain interactions

  • TanStack Query for cache management

External Integrations

  • Dune Analytics: Aggregated onchain data

  • LI.FI: Token swaps

  • Contentful: Editorial content management

  • Linea Token API: Token data