CircuitCircuit
Circuit
v2.0.0

BLUEPRINT

Technical Blueprint

Comprehensive technical documentation for Circuit - a production-grade video streaming platform with native blockchain integration.

March 2026
17 Sections
Download PDF

Platform Highlights

Version2.0.0 Production
BlockchainBase (L2)
SecurityProduction Ready

Version 2.0.0 March 2026


  1. Executive Summary
  2. Platform Overview
  3. Technology Architecture
  4. Authentication & Identity
  5. Streaming Infrastructure
  6. Content Delivery Network
  7. Monetization Systems
  8. Token Gating
  9. XP Reward System
  10. Advertisement System
  11. Community Features
  12. Security Architecture
  13. Widget Ecosystem
  14. Database Architecture
  15. Performance & Scalability
  16. Technical Specifications
  17. Glossary

1. Executive Summary

Circuit is a production-grade video streaming platform built on modern cloud-native infrastructure with native Base (Coinbase L2) blockchain integration. Released in early 2026, the platform combines live streaming, Video-on-Demand (VOD) delivery, and creator monetization with blockchain-native payment rails and token-gated content access.

Core Value Propositions

For Viewers:

  • Watch-to-Earn rewards through the XP system
  • Token-gated exclusive content access
  • Native wallet authentication (browser wallets or social login)
  • Real-time interactive features

For Creators:

  • Multiple revenue streams (tips, PPV, advertising, ticket sales)
  • 100% of base tip amounts (platform fee added on top)
  • Token-gated content for premium experiences
  • Comprehensive analytics dashboard
  • Automatic stream archiving to VOD
  • Subscription tiers with usage-based billing

For the Ecosystem:

  • Base-first payment infrastructure
  • Multi-token support (USDC, ETH)
  • On-chain transaction verification
  • Transparent, immutable payment records

Platform Highlights

AspectDescription
Platform Version2.0.0 (Production)
InfrastructureEnterprise-grade, globally distributed
SecurityComprehensive multi-layer protection
BlockchainNative Base (L2) integration

2. Platform Overview

2.1 Feature Summary

Live Streaming

  • Professional RTMP ingest infrastructure
  • HLS delivery via global CDN
  • Secure publish token authentication
  • Multi-camera broadcasting with Director controls
  • Automatic stream archiving
  • Roadmap: Adaptive bitrate transcoding and WebRTC ultra-low latency

Video on Demand

  • Direct-to-cloud upload (up to 2GB)
  • Global CDN delivery
  • Signed URL protection
  • Automatic thumbnail generation
  • View tracking with analytics

Monetization

  • Pay-Per-View (PPV) with Base USDC payments
  • Creator tipping (USDC and ETH support)
  • Watch-to-Earn advertising
  • Token-gated premium content
  • Event ticketing with on-chain NFT minting
  • Creator subscription tiers with Stripe billing
  • Creator payout system

Social Features

  • Real-time live chat
  • Threaded comments on VOD
  • Follow system
  • Content moderation tools
  • Creator-assigned moderators

3. Technology Architecture

3.1 Core Technology Stack

LayerTechnologyPurpose
FrontendNext.js 14+React framework with App Router
UI ComponentsShadcn/ui + Radix UIAccessible component library
StylingTailwind CSSUtility-first CSS
LanguageTypeScriptType-safe development
DatabasePostgreSQLPrimary data store
ORMPrismaType-safe database access
CachingRedisRate limiting, session cache
StreamingAnt Media ServerRTMP ingest, HLS delivery
CDNBunnyCDNGlobal content delivery
StorageS3-CompatibleObject storage
BlockchainBase L2 (Ethereum)Payment verification
BillingStripeCreator subscriptions
DeploymentVercelServerless hosting

3.2 Application Structure

The platform follows a modular architecture with clear separation of concerns:

  • App Router - Next.js pages and API routes
  • Components - 174+ reusable React components
  • Libraries - Core utilities and integrations
  • Hooks - Custom React hooks for state management
  • Contexts - React Context providers
  • Widget App - Separate embedded widget application

3.3 API Architecture

The platform exposes a comprehensive REST API organized into functional domains:

DomainKey Functions
AuthenticationWallet auth, social login
User ManagementProfiles, settings, follows
Video ManagementCRUD, likes, comments
Live StreamingCreate, manage, status
PaymentsPPV, tips, verification
Playback GatewayToken auth, session management
Chat & CommentsReal-time messaging
ModerationContent moderation
AdvertisementsAd serving and tracking
TicketingEvent creation, ticket sales, redemption
Multi-CameraAngle management, Director controls
BillingStripe subscriptions, usage

4. Authentication & Identity

4.1 Wallet-First Architecture

Circuit implements a wallet-first authentication system where every user has an EVM wallet. This approach provides:

  • Simplicity: Single identity model - all users have wallets
  • Web3-Native: True wallet ownership for all users on Base
  • Web2 UX: Social login provides familiar onboarding experience
  • Security: Industry-standard cryptographic verification via SIWE (Sign-In with Ethereum)

How Users Connect

MethodDescription
Browser ExtensionDirect connection via MetaMask, Coinbase Wallet, or WalletConnect
Coinbase Smart WalletPasskey-based wallet with gasless onboarding

All wallets are fully functional EVM wallets capable of:

  • Sending and receiving ETH and ERC-20 tokens (USDC)
  • Signing transactions for tips, PPV purchases, and token operations
  • Holding tokens for gated content access
  • Full EIP-1193 compatibility

4.2 Coinbase Onramp & Smart Wallet

Coinbase Smart Wallet enables mainstream users to join Circuit without any blockchain knowledge. Users create a passkey-based wallet instantly with no browser extension required.

Key Benefits

For Users:

  • Zero friction onboarding - no wallet extension installation required
  • Passkey-based wallet creation (biometric or device PIN)
  • Gasless transactions via paymaster sponsorship
  • Built-in fiat on-ramp for purchasing USDC directly

For the Platform:

  • Dramatically lower barrier to entry for mainstream audiences
  • Email captured during onboarding for Stripe billing compliance
  • Full feature parity with browser extension wallet users

Authentication Flow

User clicks "Connect Wallet"
        │
        ▼
┌─────────────────────────────────┐
│   Wallet modal opens            │
│   (MetaMask, Coinbase, etc.)    │
└─────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────┐
│   User connects EVM wallet      │
│   or creates Coinbase Smart     │
│   Wallet via passkey            │
└─────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────┐
│   SIWE (Sign-In with Ethereum)  │
│   User signs authentication     │
│   message                       │
└─────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────┐
│   Platform verifies signature   │
│   Creates session with:         │
│   - evmAddress                  │
│   - session cookie              │
└─────────────────────────────────┘

Feature Parity

All wallet types have complete feature parity:

FeatureMetaMask / WalletConnectCoinbase Smart Wallet
Watch ContentYesYes
Earn XPYesYes
PPV PurchasesYesYes
Send TipsYesYes
Token GatingYesYes
Token Balance GateYesYes
Creator SubscriptionsYesYes
Stripe BillingYes (with email)Yes (with email)

Email & Stripe Billing

Users who want Stripe subscriptions can add an email address in Settings. This email is stored and used for:

  • Stripe subscription billing (required for compliance)
  • Usage alerts and notifications
  • Account recovery communications

4.3 EVM Wallet Authentication (SIWE)

For users who prefer browser extension wallets, Circuit supports any EIP-1193 compliant EVM wallet.

Officially Supported Wallets

WalletDescription
MetaMaskMost popular EVM browser extension wallet
Coinbase WalletCoinbase's self-custody wallet with smart wallet support
WalletConnectProtocol supporting 300+ mobile and desktop wallets

Authentication Flow (SIWE)

User selects wallet from connection modal
        │
        ▼
┌─────────────────────────────────┐
│   1. SIWE Message Generation    │
│   Server creates nonce and      │
│   SIWE-formatted message with   │
│   domain, URI, and chain ID     │
└─────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────┐
│   2. Signature Request          │
│   Wallet prompts user to sign   │
│   SIWE message via              │
│   personal_sign                 │
└─────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────┐
│   3. Signature Verification     │
│   Server verifies ECDSA         │
│   signature and recovers        │
│   signer address                │
└─────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────┐
│   4. Session Creation           │
│   7-day session created         │
│   HttpOnly cookie set           │
└─────────────────────────────────┘

Security Features

FeatureDescription
SIWE StandardEIP-4361 compliant authentication messages
Single-Use NoncesAutomatically deleted after verification
10-Minute ExpirationShort window prevents replay attacks
Address RecoverySignature verification recovers signer address
Session Fixation ProtectionOld sessions deleted on re-authentication

4.4 Session Management

Session Characteristics:

  • Duration: 7 days
  • Storage: Database-backed
  • Cookie Type: HttpOnly, Secure, SameSite=Lax
  • Identifier: UUID session ID

4.5 User Roles & Permissions

Role Hierarchy

RoleLevelCapabilities
USER0Watch, like, comment, earn XP
CREATOR1Upload content, earn tips, receive payments
MODERATOR2Moderate chat, manage users, delete content
ADMIN3Full platform access, user management

5. Streaming Infrastructure

5.1 Live Streaming Architecture

Broadcaster (OBS/vMix)
        │
        ▼ RTMP
┌───────────────────────┐
│   Streaming Server    │
│   ├─ HLS Packaging    │
│   └─ Token Validation │
└───────────────────────┘
        │
        ▼ HLS
┌───────────────────────┐
│      Global CDN       │
│   Edge Distribution   │
└───────────────────────┘
        │
        ▼ Signed URLs
┌───────────────────────┐
│       Viewers         │
└───────────────────────┘

Current Delivery: Single-bitrate HLS at the broadcaster's output quality. Viewers receive the same quality stream that the creator sends from their broadcasting software (e.g., OBS).

Roadmap: Adaptive bitrate transcoding (1080p, 720p, 480p, 360p) and WebRTC ultra-low latency delivery are planned for a future infrastructure upgrade.

5.2 Stream Security

Security Model:

  • Cryptographically random publish tokens
  • Secure hashed storage (irreversible)
  • Webhook validation before broadcast
  • One-time token display with regeneration support

5.3 Streaming Specifications

Current Delivery:

  • Single-bitrate HLS at broadcaster output quality
  • Recommended broadcast settings: 1080p at 4000-6000 kbps
  • MPEG-TS segment format via HLS

Planned ABR Profiles (Roadmap):

ProfileResolutionBitrate
Source1080p4000 kbps
High720p2000 kbps
Medium480p1000 kbps
Low360p600 kbps

HLS Specifications:

  • Optimized segment duration
  • MPEG-TS segment format
  • Configurable live window

5.4 Stream Archiving

Automatic conversion of live streams to VOD:

StatusDescription
noneArchive not enabled
recordingCurrently recording
processingMP4 being generated
readyReady for publishing
publishedVideo created

Archive Retention by Tier

TierRetention Policy
Free30 days (auto-delete unpublished)
CreatorUnlimited (counts against 100 GB storage)
Creator ProUnlimited (counts against 500 GB storage)
Creator Pro+Unlimited (counts against 2 TB storage)

Note: Published archives are never auto-deleted regardless of tier.

Entitlement Migration: Users with live stream access automatically receive archive access.

5.5 Multi-Camera Broadcasting

Circuit supports multi-camera live streams, allowing creators to broadcast multiple camera angles simultaneously with real-time switching.

AspectDetail
Max CamerasDevice-dependent (typically 4-8)
Switching LatencySub-200ms (CSS visibility swap)
Sync MethodPDT (Program Date-Time) via HLS tags
Sync Accuracy±500ms across angles
Audio ModeFollow active camera or primary-only
Billing1 stream = 1 live hour (angles deduplicated)

How It Works

Creator configures cameras in Creator Studio
        │
        ▼
┌─────────────────────────────────┐
│  Each angle → separate RTMP     │
│  stream to Ant Media Server     │
└─────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────┐
│  HLS packaging per angle        │
│  CDN delivery via BunnyCDN      │
└─────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────┐
│  Viewer player preloads all     │
│  angles as hidden <video>       │
│  elements with HLS.js           │
└─────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────┐
│  Camera switch = CSS visibility │
│  swap (no rebuffering)          │
└─────────────────────────────────┘

Viewer Experience

  • Single Camera Mode: Watch one angle at a time with numbered camera buttons
  • Grid Mode: View all cameras simultaneously in a mosaic layout
  • Camera Switching: Click any camera button to switch instantly
  • Grid Exit: Clicking a camera in grid mode switches to single view

Director Widget

Creators and assigned directors can control the broadcast in real-time via the Director widget:

  • ATEM-style camera switching interface
  • Grid/mosaic toggle for multi-view monitoring
  • Camera status indicators (broadcasting, pending, offline)
  • Secure postMessage bridge between widget iframe and player

Technical Details

  • Buffer Management: Active camera gets full buffer, preloaded cameras get minimal buffer, stopped cameras load nothing
  • PDT Synchronization: Uses #EXT-X-PROGRAM-DATE-TIME HLS tags to sync angles. Nudges playback rate ±3% for small drift (200ms-2s), hard seeks for larger drift (>2s)
  • Device Adaptation: No artificial limits on modern devices. Only restricts on genuinely slow connections (2G/slow-2G via Network Information API)
  • Billing Deduplication: Angle streams share the parent stream's billing period. A 2-hour broadcast with 4 cameras = 2 live hours, not 8

6. Content Delivery Network

6.1 CDN Integration

Architecture:

  • Pull zone configuration from object storage
  • Global edge distribution via BunnyCDN's worldwide network
  • Token authentication for protected content
  • Separate zones for VOD and live streaming

Security:

  • Cryptographically signed URLs
  • Time-limited access tokens
  • Anti-hotlinking protection

6.2 Playback Gateway

Three-layer security for content access:

LayerPurposeDescription
Playback TokenRequest authenticationValidates user authorization
Database SessionBusiness rulesEnforces concurrency limits
CDN Signed URLContent deliverySecures actual media files

Heartbeat System:

  • Regular client-server communication
  • Session extension on activity
  • Watch time tracking for analytics

6.3 Concurrent Stream Limiting

Strategy: Newest Device Wins

When a user watches on multiple devices:

  1. Detect active sessions
  2. Terminate older sessions
  3. Allow newest to continue
  4. Notify terminated sessions gracefully

7. Monetization Systems

7.1 Base Payment Architecture

All payments are processed on Base (Coinbase L2) using USDC or ETH:

ComponentDescription
Payment TokenUSDC (default) or ETH
NetworkBase (Ethereum L2)
VerificationOn-chain transaction confirmation
Fee CollectionSeparate platform fee transfer

Benefits:

  • Low gas fees via L2 scaling
  • Near-instant transaction finality
  • On-chain fee transparency
  • Immutable payment proof

7.2 Supported Tokens

TokenDescriptionPPVTipsTickets
USDCCircle stablecoin on Base (~$1 USD)Yes (default)Yes (via TipSplitter)Yes
ETHNative Base chain currencyNoYes (via relay)No

PPV and ticket payments use USDC exclusively. Tips support both USDC and ETH.

7.3 Pay-Per-View (PPV)

Fee Structure:

  • Platform fee: 10% (added on top)
  • Creator receives: 100% of base price
  • User pays: base price + 10%

Example ($10 USDC content):

Base price:    $10 USDC → Creator (via CircuitPaymentSplitter)
Platform fee:   $1 USDC → Platform (min $1, enforced on-chain)
Total paid:    $11 USDC

Transaction Verification:

  • 1-confirmation finality on Base (no reorgs)
  • On-chain verification via viem (decodes PaymentSplit event)
  • Automatic entitlement creation on confirmation

7.4 Tipping System

Two-Step Flow:

  1. Payment info generation (no DB record until confirmed)
  2. Record creation after wallet submission
  3. On-chain verification and confirmation

Fee Structure:

  • Base fee: 5% (added on top)
  • Minimum fee: $1 USDC / 0.0005 ETH
  • Creator receives: 100% of tip amount

Example ($20 USDC tip):

Tip amount:    $20 USDC → Creator (via CircuitTipSplitter)
Platform fee:   $1 USDC → Platform (5% = $1, matches minimum)
Total paid:    $21 USDC

7.5 Creator Subscription Tiers

Creators can subscribe to paid tiers for increased resource limits and professional features.

Tier Comparison

TierMonthlyBandwidthStorageLive Hours
Free$0100 GB25 GB10 hrs
Creator$39500 GB100 GB30 hrs
Creator Pro$993 TB500 GB120 hrs
Creator Pro+$29912 TB2 TB400 hrs

Overage Billing

Paid tier creators can opt-in to overage billing to exceed their limits:

ResourceOverage Rate
Bandwidth$0.02/GB
Storage$0.04/GB-month
Live Hours$1.00/hour

Spend Cap: Creators can set a maximum monthly overage spend to prevent unexpected charges.

Usage Tracking

  • Real-time usage dashboard
  • Alerts at 50%, 80%, and 100% thresholds
  • Daily usage aggregation from CDN logs
  • Prorated billing for mid-cycle tier changes

7.6 Event Ticketing

Creators can sell tickets to scheduled events (concerts, premieres, watch parties) with on-chain NFT minting for ticket proof-of-purchase.

AspectDetail
Ticket FormatERC-721 NFT on Base (CircuitTicket contract)
Payment TokenUSDC (on-chain via CircuitTicketSale)
Purchase ModelAtomic — USDC payment + NFT mint in one transaction
InventoryPer-tier with on-chain supply caps
Fee Model10% platform fee enforced on-chain

Purchase Flow

Viewer browses event page
        │
        ▼
┌─────────────────────────────────┐
│  Select ticket tier             │
│  (e.g., General, VIP, Premium) │
└─────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────┐
│  Approve USDC to                │
│  CircuitTicketSale contract     │
└─────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────┐
│  Call purchase(eventId, tierId) │
│  Atomic: USDC split + NFT mint │
│  If anything fails, tx reverts  │
└─────────────────────────────────┘
        │
        ▼
┌─────────────────────────────────┐
│  Entitlement created            │
│  Viewer can access stream       │
└─────────────────────────────────┘

ERC-721 Ticket Metadata

Each ticket NFT includes OpenSea-compatible metadata:

  • Event name and description
  • Tier name and tier-specific imagery
  • Event date and time
  • Unique ticket number
  • Creator information

Fee Structure

  • Platform fee: 10% (added on top of ticket price)
  • Creator receives: 100% of ticket price
  • Buyer pays: ticket price + 10%

Inventory Management

  • Creators set per-tier supply caps
  • Real-time inventory tracking
  • Automatic sold-out detection
  • Draft → Active → Ended event lifecycle

8. Token Gating

8.1 Token-Gated Content

Creators can restrict content access using token ownership or balance requirements:

Gating Types

TypeDescriptionDuration
Token Gating (NFT)Any ERC-721 token from specified contract address24-hour windows
Token Balance GateMinimum ERC-20 or ETH balance (not spent)24-hour windows
Ticket GatingAtomic USDC + ERC-721 purchase via CircuitTicketSalePermanent (per-event)

Verification Flow

  1. User requests gated content
  2. System retrieves user's EVM address
  3. NFT gating: ERC-721 balanceOf() checked on-chain via viem
  4. Balance gating: ERC-20 balanceOf() or ETH balance checked via viem
  5. Ticket gating: CircuitTicketSale purchase verified on-chain
  6. Entitlement created (24-hour expiry for NFT/balance, permanent for tickets)
  7. Access granted or denied

8.2 EVM Address Support

All users have a single EVM address (0x...) on Base chain. This address is used for:

  • Authentication (SIWE signature)
  • Token ownership verification
  • Payment transactions
  • NFT profile picture verification

8.3 NFT Profile Pictures

Users can set owned NFTs as profile avatars:

  • Real-time ownership verification
  • Automatic cache invalidation
  • Fallback to default avatar

9. XP Reward System

9.1 Watch-to-Earn Mechanics

The XP system rewards users for watching content, preparing for future native token distribution.

Base Rate: 1 XP per minute watched Daily Cap: 240 XP (4 hours of content)

Earning Sources

SourceXP RateCooldown
Watch Time1 XP/minute24h per content
Ad CompletionVariablePer campaign
Bonus EventsVariableNone

9.2 Diminishing Returns

To ensure fair distribution and prevent farming:

Watch CountMultiplierExample (5-min video)
1st (new)100% (1.0x)5.0 XP
2nd (rewatch)50% (0.5x)2.5 XP
3rd25% (0.25x)1.25 XP
4th10% (0.1x)0.5 XP
5th+1% (0.01x)0.05 XP

Key Feature: Users can rewatch indefinitely at 1% XP - never reaches zero.

9.3 Level Progression

Default Formula (Square Root):

Level = floor(sqrt(totalXP / 100))
LevelXP Required
1100 XP
52,500 XP
1010,000 XP
2040,000 XP
3090,000 XP

9.4 Multiplier Tiers

Viewer Multipliers:

LevelMultiplier
0+1.00x
5+1.05x
10+1.10x
20+1.15x
30+1.20x

9.5 Anti-Abuse Protections

The platform implements layered anti-abuse measures:

  • Velocity Monitoring - Flags abnormal earning patterns for review
  • Session Integrity - Validates continuous viewing
  • Rate Limiting - Prevents automated abuse
  • Server-Authoritative Calculations - All XP computed server-side
  • Daily Cap Enforcement - Hard limits on daily earnings

9.6 Bootstrap Mode

Temporary phase for fair initial growth:

  • All multipliers normalized to 1.00x
  • Exit criteria: Sustained user engagement thresholds
  • Prevents early adopter advantage

10. Advertisement System

10.1 Ad Types

TypeXP RewardCompletion Requirement
WATCH_TO_EARNVariable80% watch time
DISPLAYNoneN/A (CPM model)
SURVEYVariableResponse submitted
POLLVariableOption selected

10.2 Placement Types

PlacementUse CaseDescription
PRE_ROLLBefore contentFull-screen video ad
MID_ROLLDuring contentTriggered at content midpoint
POST_ROLLAfter contentFull-screen video ad
REWARDS_WIDGETUser-initiatedSidebar opt-in ads
PLAYER_OVERLAYDuring playbackNon-intrusive banner

10.3 Creator Revenue Share

  • Creators earn a percentage of XP from ads viewed on their content
  • Transparent tracking and attribution
  • Stored separately for analytics

10.4 Daily Limits

  • Maximum daily XP from ads enforced
  • Resets at midnight
  • Server-side validation

10.5 Fraud Prevention

The platform implements multi-layer fraud detection:

  • Behavioral Analysis - Detects abnormal interaction patterns (rapid actions, click frequency)
  • Timing Validation - Identifies impossible user actions (clicks before impressions)
  • Session Verification - Ensures valid playback context
  • Device Fingerprinting - Flags multiple accounts on the same device
  • IP Reputation - Detects IP addresses shared by unusually many accounts

All suspicious activity is flagged and reviewed, with confidence-based scoring to minimize false positives.

10.6 Poll & Survey System

The platform supports comprehensive polling and survey functionality for audience engagement and market research.

Survey Types

TypeUse CaseCreator
AD_CAMPAIGNBrand-sponsored researchAdvertisers
CREATOR_POLLAudience engagementCreators

Question Types (8 Total)

TypeDescription
SINGLE_CHOICERadio button selection
MULTIPLE_CHOICECheckbox selection
RATING_SCALENumeric scale (configurable)
NPSNet Promoter Score (0-10)
STAR_RATING1-5 star rating
TEXT_SHORTSingle line text
TEXT_LONGParagraph text
YES_NOBoolean selection

Features

  • XP rewards for survey completion
  • Duplicate response prevention
  • Live results with real-time polling
  • Question randomization option
  • Fraud detection (fast response + pattern checks)

11. Community Features

11.1 Real-Time Chat

Features:

  • Character limits for manageable messages
  • Rate limiting to prevent spam
  • Slow mode (configurable interval)
  • Followers-only mode
  • Subscribers-only mode
  • Profanity filter
  • Custom banned words

Message Flow:

  1. Authentication check
  2. Rate limiting
  3. Chat settings validation
  4. Ban/timeout check
  5. Message creation
  6. Automatic broadcast to subscribers

11.2 Comments System

Features:

  • Threaded discussions
  • Generous character limits
  • Rate limiting
  • Soft delete with audit trail

11.3 User Badges

BadgeCriteria
CreatorContent owner
AdminPlatform administrator
ModeratorPlatform or content moderator
FounderBeta supporter (future)

11.4 Moderation Tools

Actions:

  • Message/comment deletion
  • User timeout (temporary)
  • User ban (permanent)
  • All actions logged for accountability

Protections:

  • Cannot ban platform admins
  • Cannot ban content creators on their own content
  • Audit trail for all moderation actions

12. Security Architecture

12.1 Security Overview

CategoryStatus
AuthenticationProduction-ready
AuthorizationProduction-ready
Payment SecurityProduction-ready
Input ValidationProduction-ready
Data ProtectionProduction-ready
InfrastructureProduction-ready

12.2 Rate Limiting

Comprehensive rate limiting protects all API endpoints:

  • Authentication endpoints - Strict limits to prevent brute force
  • Sensitive operations - Additional restrictions for high-risk actions
  • Payment endpoints - Balanced limits for legitimate transactions
  • Public endpoints - Higher limits for general access
  • Admin endpoints - Appropriate limits for administrative functions

All rate limits use sliding window algorithms for fair enforcement.

12.3 Input Validation

  • Schema validation - Type-safe runtime validation on all inputs
  • ORM parameterization - Automatic SQL injection prevention
  • Whitelist validation - Strict validation for enums and options
  • XSS prevention - Automatic output escaping

12.4 Role-Based Access Control

RoleLevelCapabilities
USER0Watch, like, comment
CREATOR1Upload, earn, receive tips
MODERATOR2Moderate chat, manage users
ADMIN3Full platform access

12.5 Data Protection

Encryption at Rest:

  • AES-256-GCM for sensitive data
  • Industry-standard password hashing

GDPR Compliance:

  • Right to Access: Account settings
  • Right to Rectification: Profile updates
  • Right to Erasure: Grace period deletion
  • Data Anonymization: Complete PII removal

12.6 Security Headers

The platform implements comprehensive security headers:

  • Strict Transport Security (HSTS)
  • Frame protection
  • Content type enforcement
  • XSS protection
  • Content Security Policy
  • Referrer control

13. Widget Ecosystem

13.1 Architecture

Widgets operate as a separate application embedded via sandboxed iframes:

┌─────────────────────────────────┐
│     Main Application           │
│  ┌───────────────────────────┐ │
│  │   Widget Sidebar          │ │
│  │  ┌─────────────────────┐  │ │
│  │  │  Sandboxed Widget   │  │ │
│  │  └─────────────────────┘  │ │
│  └───────────────────────────┘ │
└─────────────────────────────────┘
         ▲             │
         │  Secure     │
         │  Messaging  │
         └─────────────┘

13.2 Widget Types

WidgetPurposeContent Type
BioCreator profile & linksAll
TipUSDC/ETH tips on BaseAll
EmbedCustom content (Twitter, YouTube)All
CardPromotional poster with CTA buttonAll
ChatReal-time messagingStreams
CommentsDiscussionsVOD
RewardsWatch-to-earn adsAll
InteractPolls & surveysAll
DirectorMulti-camera switching controlsMulti-cam Streams

13.3 Security Measures

  • CORS validation with origin whitelisting
  • Short-lived authentication tokens
  • Iframe sandboxing
  • Message type validation
  • Secure cross-origin communication

13.4 SDK Capabilities

The Widget SDK provides:

  • Ready state signaling
  • Event communication
  • Message listening
  • Authentication token management
  • Authenticated API requests

14. Database Architecture

14.1 Schema Overview

The platform uses a comprehensive relational database schema:

Core Model Groups

GroupPurpose
AuthenticationUser accounts, sessions, settings
ContentVideos, streams, metadata
SocialFollows, likes, comments, watchlist
PaymentsTransactions, entitlements, tips, payouts
ChatMessages, settings, moderation
AdsCampaigns, placements, tracking
XPConfiguration, balances, transactions
Multi-CameraMulti-cam configs, angle streams
TicketingEvents, tiers, purchases, redemptions
BillingUsage tracking, tier management

14.2 Key Models

User Model:

  • Authentication data (EVM address, wallet source)
  • Profile information
  • Statistics and metrics
  • Billing fields (Stripe, subscription tier)
  • Preferences and settings

Video Model:

  • Content metadata
  • Delivery configuration
  • Gating settings
  • Analytics data

Stream Model:

  • Stream configuration
  • Status tracking
  • Security settings
  • Widget configuration

MultiCam Model:

  • Parent stream reference
  • Camera angle configuration
  • Layout and switching preferences

TicketEvent Model:

  • Event metadata and scheduling
  • Linked stream reference
  • Ticket tiers with pricing and inventory
  • Purchase tracking and NFT minting status

14.3 Performance Optimization

  • Strategic indexing on frequently queried fields
  • Composite indexes for complex queries
  • Query optimization for common access patterns

15. Performance & Scalability

15.1 Caching Strategy

Multi-Layer Caching:

Cache TypePurpose
Session CacheReduce authentication queries
Concurrent ChecksOptimize limit enforcement
User ProfilesCache infrequently changing data
Stream MetadataFast access to live data
XP TrackingAccurate reward calculations

Performance Impact:

  • Significant reduction in database queries
  • Sub-10ms response times for cached data
  • Graceful degradation when cache unavailable

15.2 Database Optimizations

  • Connection pooling for efficient resource use
  • Singleton client patterns
  • Strategic indexing
  • Query optimization

15.3 Client Optimizations

  • Server-side rendering where beneficial
  • Dynamic imports for code splitting
  • Image optimization (WebP format)
  • Infinite scroll with intersection observer

16. Technical Specifications

16.1 File Upload Limits

TypeMaximum Size
Video Files2 GB
Thumbnails10 MB
Ad Creatives (Video)100 MB
Ad Creatives (Image)5 MB

16.2 Supported Video Formats

ExtensionMIME Type
.mp4video/mp4 (recommended)
.movvideo/quicktime
.webmvideo/webm
.avivideo/x-msvideo
.mkvvideo/x-matroska

16.3 Cooldown Systems

SystemDurationScope
Content XP (VOD)24hPer video/user
Content XP (LIVE)NoneWhile broadcasting
View Tracking24hPer video/user
Ad Rewards24hPer campaign/user

17. Glossary

TermDefinition
Angle StreamIndividual camera feed within a multi-camera broadcast
BaseCoinbase's Ethereum Layer 2 rollup — Circuit's primary blockchain
CDNContent Delivery Network for global content distribution
CDPCoinbase Developer Platform — social login with embedded EVM wallets
CircuitPaymentSplitterSmart contract for atomic USDC PPV payment splitting
CircuitTipSplitterSmart contract for atomic USDC tip splitting
CircuitTicketSaleSmart contract for atomic USDC payment + ERC-721 ticket mint
DirectorReal-time camera switching interface for multi-cam broadcasts
EntitlementAccess grant for gated content
ERC-721Non-fungible token standard used for ticket NFTs
ETHNative Base chain currency, used for gas and tips
HLSHTTP Live Streaming protocol
HeartbeatPeriodic client-server ping for session maintenance
Multi-CamMulti-camera broadcast configuration with synchronized angle streams
PDT SyncProgram Date-Time synchronization for aligning multi-camera HLS streams
PPVPay-Per-View, one-time purchase model
RTMPReal-Time Messaging Protocol for streaming
SIWESign-In with Ethereum (EIP-4361) authentication standard
Smart WalletCoinbase Smart Wallet for gasless onboarding
Ticket EventScheduled event with purchasable ticket tiers and atomic on-chain NFT minting
Token GatingAccess control via ERC-721 ownership or ERC-20/ETH balance verification
USDCCircle-issued USD stablecoin on Base (6 decimals)
VODVideo-on-Demand, pre-recorded content
XPExperience Points, platform reward currency

Document Information

Blueprint Version: 2.0.0 Platform Version: Circuit v2.0.0 Release Date: March 2026 Status: Production


Circuit - Where Creators Thrive

Circuit - Where Creators Thrive

Version 2.0.0 | March 2026

    Blueprint — Technical Blueprint | Circuit