
GHOSTPAPER
Technical Whitepaper
Comprehensive technical documentation for Ghostchain Network - a production-grade video streaming platform with native Cardano blockchain integration.
Platform Highlights
Version 1.5.0 March 2026
- Executive Summary
- Platform Overview
- Technology Architecture
- Authentication & Identity
- Streaming Infrastructure
- Content Delivery Network
- Monetization Systems
- Token Gating
- XP Reward System
- Advertisement System
- Community Features
- Security Architecture
- Widget Ecosystem
- Database Architecture
- Performance & Scalability
- Technical Specifications
- Glossary
1. Executive Summary
Ghostchain Network is a production-grade video streaming platform built on modern cloud-native infrastructure with native Cardano 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 Cardano 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:
- Cardano-first payment infrastructure
- Multi-token support (ADA, DJED, SNEK, HOSKY, USDCx, NIGHT)
- On-chain transaction verification
- Transparent, immutable payment records
Platform Highlights
| Aspect | Description |
|---|---|
| Platform Version | 1.5.0 (Production) |
| Infrastructure | Enterprise-grade, globally distributed |
| Security | Comprehensive multi-layer protection |
| Blockchain | Native Cardano 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 Cardano payments
- Creator tipping (multi-token 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
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Next.js 14+ | React framework with App Router |
| UI Components | Shadcn/ui + Radix UI | Accessible component library |
| Styling | Tailwind CSS | Utility-first CSS |
| Language | TypeScript | Type-safe development |
| Database | PostgreSQL | Primary data store |
| ORM | Prisma | Type-safe database access |
| Caching | Redis | Rate limiting, session cache |
| Streaming | Ant Media Server | RTMP ingest, HLS delivery |
| CDN | BunnyCDN | Global content delivery |
| Storage | S3-Compatible | Object storage |
| Blockchain | Cardano (Blockfrost API) | Payment verification |
| Billing | Stripe | Creator subscriptions |
| Deployment | Vercel | Serverless 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:
| Domain | Key Functions |
|---|---|
| Authentication | Wallet auth, NuFi SSO |
| User Management | Profiles, settings, follows |
| Video Management | CRUD, likes, comments |
| Live Streaming | Create, manage, status |
| Payments | PPV, tips, verification |
| Playback Gateway | Token auth, session management |
| Chat & Comments | Real-time messaging |
| Moderation | Content moderation |
| Advertisements | Ad serving and tracking |
| Ticketing | Event creation, ticket sales, redemption |
| Multi-Camera | Angle management, Director controls |
| Billing | Stripe subscriptions, usage |
4. Authentication & Identity
4.1 Wallet-First Architecture
Ghostchain Network implements a wallet-first authentication system where every user has a Cardano wallet. This approach provides:
- Simplicity: Single identity model - all users have wallets
- Web3-Native: True Cardano wallet ownership for all users
- Web2 UX: NuFi SSO provides familiar social login experience
- Security: Industry-standard cryptographic verification via wallet signatures
How Users Get Wallets
| Method | Wallet Source | Description |
|---|---|---|
| Browser Extension | CIP30_EXTERNAL | Direct connection to Eternl, Yoroi, or Lace |
| Social Login | NUFI_SSO | Google/Facebook/Discord via NuFi creates wallet automatically |
Both methods result in a fully functional Cardano wallet capable of:
- Sending and receiving ADA and native tokens
- Signing transactions for tips, PPV purchases, and token operations
- Holding tokens for gated content access
- Full CIP-30 API compatibility
4.2 NuFi SSO (Social Login)
NuFi SSO is a flagship feature that enables mainstream users to join Ghostchain without any blockchain knowledge. Users sign in with familiar social accounts and receive a fully functional, non-custodial Cardano wallet.
Key Benefits
For Users:
- Zero friction onboarding - no wallet extension installation required
- Sign in with existing Google, Facebook, or Discord account
- Full Cardano wallet created automatically
- Non-custodial - users retain complete control of their keys
- Built-in wallet widget for balance viewing, swaps, and fiat on-ramp
For the Platform:
- Dramatically lower barrier to entry for mainstream audiences
- Email captured from OAuth for Stripe billing compliance
- Full feature parity with browser extension wallet users
- Seamless upgrade path if users want to export keys later
Supported Providers
| Provider | Status | Description |
|---|---|---|
| Active | Sign in with Google account | |
| Active | Sign in with Facebook account | |
| Discord | Active | Sign in with Discord account |
Authentication Flow
User clicks "Sign in with Google/Facebook/Discord"
│
▼
┌─────────────────────────────────┐
│ NuFi SDK Opens OAuth Popup │
│ User authenticates with │
│ their social account │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ NuFi Creates/Retrieves │
│ Non-Custodial Cardano Wallet │
│ (keys managed by NuFi) │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ CIP-30 API Available │
│ window.cardano.nufiSSO │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ Platform Gets Wallet Address │
│ Creates Session with: │
│ - walletSource: NUFI_SSO │
│ - nufiProvider: google/etc │
│ - email from OAuth │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ NuFi Widget Appears │
│ (bottom-right corner) │
│ For transactions, balance, │
│ swaps, fiat on-ramp │
└─────────────────────────────────┘
NuFi Wallet Widget
After authentication, a floating wallet widget appears providing:
| Feature | Description |
|---|---|
| Balance Display | View ADA and token balances |
| Transaction Signing | Approve tips, PPV purchases, token operations |
| Token Swaps | Built-in DEX integration |
| Fiat On-Ramp | Purchase ADA with credit card |
| Account Settings | Manage wallet preferences |
The widget persists across sessions - when users return to the site, it automatically reappears.
Feature Parity
NuFi SSO users have complete feature parity with browser extension wallet users:
| Feature | CIP-30 Wallet | NuFi SSO |
|---|---|---|
| Watch Content | Yes | Yes |
| Earn XP | Yes | Yes |
| PPV Purchases | Yes | Yes |
| Send Tips | Yes | Yes |
| Token Gating | Yes | Yes |
| Token Balance Gate | Yes | Yes |
| Creator Subscriptions | Yes | Yes |
| Stripe Billing | Yes (with email) | Yes (email from OAuth) |
Email & Stripe Billing
NuFi SSO automatically captures the user's email address from their OAuth provider. This email is stored and used for:
- Stripe subscription billing (required for compliance)
- Usage alerts and notifications
- Account recovery communications
CIP-30 wallet users who want Stripe subscriptions can add an email address in Settings → Email Settings.
4.3 CIP-30 Wallet Authentication (Browser Extensions)
For users who prefer browser extension wallets, Ghostchain officially supports three CIP-30 compliant Cardano wallets.
Officially Supported Browser Wallets
| Wallet | Description |
|---|---|
| Eternl | Feature-rich wallet with advanced capabilities |
| Lace | Official IOG wallet with clean design |
| Yoroi | EMURGO's lightweight browser wallet |
CIP-30 Compatibility: Any CIP-30 compliant Cardano browser wallet may work with Ghostchain, but the three wallets above are officially tested and recommended.
Authentication Flow
User selects wallet from connection modal
│
▼
┌─────────────────────────────────┐
│ 1. Nonce Generation │
│ Server creates 32-byte │
│ cryptographically random │
│ nonce with 10-minute expiry │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ 2. Signature Request │
│ Wallet prompts user to sign │
│ message using CIP-30 │
│ signData() method │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ 3. Cryptographic Verification │
│ Server verifies Ed25519 │
│ signature with address │
│ binding check │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ 4. Session Creation │
│ 7-day session created │
│ HttpOnly cookie set │
└─────────────────────────────────┘
Security Features
| Feature | Description |
|---|---|
| Timing-Safe Comparison | Prevents timing attacks on nonce validation |
| Single-Use Nonces | Automatically deleted after verification |
| 10-Minute Expiration | Short window prevents replay attacks |
| Address Binding | Signature verification includes address validation |
| Session Fixation Protection | Old 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
| Role | Level | Capabilities |
|---|---|---|
| USER | 0 | Watch, like, comment, earn XP |
| CREATOR | 1 | Upload content, earn tips, receive payments |
| MODERATOR | 2 | Moderate chat, manage users, delete content |
| ADMIN | 3 | Full 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):
| Profile | Resolution | Bitrate |
|---|---|---|
| Source | 1080p | 4000 kbps |
| High | 720p | 2000 kbps |
| Medium | 480p | 1000 kbps |
| Low | 360p | 600 kbps |
HLS Specifications:
- Optimized segment duration
- MPEG-TS segment format
- Configurable live window
5.4 Stream Archiving
Automatic conversion of live streams to VOD:
| Status | Description |
|---|---|
none | Archive not enabled |
recording | Currently recording |
processing | MP4 being generated |
ready | Ready for publishing |
published | Video created |
Archive Retention by Tier
| Tier | Retention Policy |
|---|---|
| Free | 30 days (auto-delete unpublished) |
| Creator | Unlimited (counts against 100 GB storage) |
| Creator Pro | Unlimited (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
Ghostchain supports multi-camera live streams, allowing creators to broadcast multiple camera angles simultaneously with real-time switching.
| Aspect | Detail |
|---|---|
| Max Cameras | Device-dependent (typically 4-8) |
| Switching Latency | Sub-200ms (CSS visibility swap) |
| Sync Method | PDT (Program Date-Time) via HLS tags |
| Sync Accuracy | ±500ms across angles |
| Audio Mode | Follow active camera or primary-only |
| Billing | 1 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-TIMEHLS 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:
| Layer | Purpose | Description |
|---|---|---|
| Playback Token | Request authentication | Validates user authorization |
| Database Session | Business rules | Enforces concurrency limits |
| CDN Signed URL | Content delivery | Secures 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:
- Detect active sessions
- Terminate older sessions
- Allow newest to continue
- Notify terminated sessions gracefully
7. Monetization Systems
7.1 Cardano Payment Architecture
All payments use multi-output transactions with exactly two outputs:
| Output | Recipient | Purpose |
|---|---|---|
| Output 1 | Creator Wallet | Base price/tip amount |
| Output 2 | Platform Wallet | Platform fee |
Benefits:
- On-chain fee transparency
- Atomic transaction processing
- Immutable payment proof
- No off-chain processing required
7.2 Supported Tokens
| Token | Description | PPV | Tips |
|---|---|---|---|
| USDCx | USDC stablecoin (~$1 USD) | Yes (default) | Yes |
| DJED | Over-collateralized stablecoin (~$1 USD) | Yes | Yes |
| ADA | Native Cardano currency | Yes | Yes |
| SNEK | Community token | No | Yes |
| HOSKY | Community token | No | Yes |
| NIGHT | Midnight Network token | No | Yes |
PPV payments default to USDCx. Tips support all 6 tokens.
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 (5 ADA content):
Base price: 5 ADA → Creator
Platform fee: 0.5 ADA → Platform
Total paid: 5.5 ADA
Transaction Verification:
- Multiple block confirmations required
- On-chain verification via Blockfrost API
- Automatic entitlement creation on confirmation
7.4 Tipping System
Two-Step Flow:
- Payment info generation (no DB record until confirmed)
- Record creation after wallet submission
- On-chain verification and confirmation
Fee Structure:
- Base fee: 5% (added on top)
- Minimum fee: 1 ADA
- Creator receives: 100% of tip amount
Example (10 ADA tip):
Tip amount: 10 ADA → Creator
Platform fee: 1 ADA → Platform (minimum applied)
Total paid: 11 ADA
7.5 Creator Subscription Tiers
Creators can subscribe to paid tiers for increased resource limits and professional features.
Tier Comparison
| Tier | Monthly | Bandwidth | Storage | Live Hours |
|---|---|---|---|---|
| Free | $0 | 100 GB | 25 GB | 10 hrs |
| Creator | $39 | 500 GB | 100 GB | 30 hrs |
| Creator Pro | $99 | 3 TB | 500 GB | 120 hrs |
| Creator Pro+ | $299 | 12 TB | 2 TB | 400 hrs |
Overage Billing
Paid tier creators can opt-in to overage billing to exceed their limits:
| Resource | Overage 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.
| Aspect | Detail |
|---|---|
| Ticket Format | CIP-25 NFT on Cardano mainnet |
| Payment Token | ADA (on-chain) |
| Redemption | Automatic on stream access |
| Inventory | Per-tier with hard caps |
| Fee Model | Platform fee added on top |
Purchase Flow
Viewer browses event page
│
▼
┌─────────────────────────────────┐
│ Select ticket tier │
│ (e.g., General, VIP, Premium) │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ Cardano payment transaction │
│ Creator wallet + Platform fee │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ On-chain verification via │
│ Blockfrost (3 confirmations) │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ Ticket NFT minted with │
│ CIP-25 metadata │
│ (event name, tier, seat info) │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ Entitlement created │
│ Viewer can access stream │
└─────────────────────────────────┘
CIP-25 Ticket Metadata
Each ticket NFT includes standardized 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
| Type | Description | Duration |
|---|---|---|
| Token Gating (Policy) | Any token from specified policy ID(s) | 24-hour windows |
| Token Balance Gate | Minimum ADA or native token balance (not spent) | 24-hour windows |
| Ticket Gating | NFT ticket purchase for scheduled events | Permanent (per-event) |
Verification Flow
- User requests gated content
- System retrieves user's wallet address (stake address preferred)
- Policy gating: Token ownership verified on-chain via Blockfrost
- Balance gating: ADA or native token balance checked via Blockfrost
- Ticket gating: Ticket purchase record verified in database
- Entitlement created (24-hour expiry for policy/balance, permanent for tickets)
- Access granted or denied
8.2 Wallet Address Support
| Format | Priority | Use Case |
|---|---|---|
| Stake Address | Highest | Aggregates all payment addresses |
| Bech32 (Payment) | Medium | Single address |
| Hex (Legacy) | Lowest | Legacy format |
Stake addresses are preferred as they provide complete wallet coverage.
8.3 Token Metadata Standards
Full CIP-25 compliance:
- IPFS protocol URLs
- Data URIs (inline SVG, base64)
- CBOR-encoded metadata
- Array-based chunked images
- Fallback to
filesarray
8.4 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 $GHOST token distribution.
Base Rate: 1 XP per minute watched Daily Cap: 240 XP (4 hours of content)
Earning Sources
| Source | XP Rate | Cooldown |
|---|---|---|
| Watch Time | 1 XP/minute | 24h per content |
| Ad Completion | Variable | Per campaign |
| Bonus Events | Variable | None |
9.2 Diminishing Returns
To ensure fair distribution and prevent farming:
| Watch Count | Multiplier | Example (5-min video) |
|---|---|---|
| 1st (new) | 100% (1.0x) | 5.0 XP |
| 2nd (rewatch) | 50% (0.5x) | 2.5 XP |
| 3rd | 25% (0.25x) | 1.25 XP |
| 4th | 10% (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))
| Level | XP Required |
|---|---|
| 1 | 100 XP |
| 5 | 2,500 XP |
| 10 | 10,000 XP |
| 20 | 40,000 XP |
| 30 | 90,000 XP |
9.4 Multiplier Tiers
Viewer Multipliers:
| Level | Multiplier |
|---|---|
| 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
| Type | XP Reward | Completion Requirement |
|---|---|---|
| WATCH_TO_EARN | Variable | 80% watch time |
| DISPLAY | None | N/A (CPM model) |
| SURVEY | Variable | Response submitted |
| POLL | Variable | Option selected |
10.2 Placement Types
| Placement | Use Case | Description |
|---|---|---|
| PRE_ROLL | Before content | Full-screen video ad |
| MID_ROLL | During content | Triggered at content midpoint |
| POST_ROLL | After content | Full-screen video ad |
| REWARDS_WIDGET | User-initiated | Sidebar opt-in ads |
| PLAYER_OVERLAY | During playback | Non-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
| Type | Use Case | Creator |
|---|---|---|
| AD_CAMPAIGN | Brand-sponsored research | Advertisers |
| CREATOR_POLL | Audience engagement | Creators |
Question Types (8 Total)
| Type | Description |
|---|---|
| SINGLE_CHOICE | Radio button selection |
| MULTIPLE_CHOICE | Checkbox selection |
| RATING_SCALE | Numeric scale (configurable) |
| NPS | Net Promoter Score (0-10) |
| STAR_RATING | 1-5 star rating |
| TEXT_SHORT | Single line text |
| TEXT_LONG | Paragraph text |
| YES_NO | Boolean 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:
- Authentication check
- Rate limiting
- Chat settings validation
- Ban/timeout check
- Message creation
- 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
| Badge | Criteria |
|---|---|
| Creator | Content owner |
| Admin | Platform administrator |
| Moderator | Platform or content moderator |
| Founder | Beta 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
| Category | Status |
|---|---|
| Authentication | Production-ready |
| Authorization | Production-ready |
| Payment Security | Production-ready |
| Input Validation | Production-ready |
| Data Protection | Production-ready |
| Infrastructure | Production-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
| Role | Level | Capabilities |
|---|---|---|
| USER | 0 | Watch, like, comment |
| CREATOR | 1 | Upload, earn, receive tips |
| MODERATOR | 2 | Moderate chat, manage users |
| ADMIN | 3 | Full 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
| Widget | Purpose | Content Type |
|---|---|---|
| Bio | Creator profile & links | All |
| Tip | Cardano donations | All |
| Embed | Custom content (Twitter, YouTube) | All |
| Card | Promotional poster with CTA button | All |
| Chat | Real-time messaging | Streams |
| Comments | Discussions | VOD |
| Rewards | Watch-to-earn ads | All |
| Interact | Polls & surveys | All |
| Director | Multi-camera switching controls | Multi-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
| Group | Purpose |
|---|---|
| Authentication | User accounts, sessions, settings |
| Content | Videos, streams, metadata |
| Social | Follows, likes, comments, watchlist |
| Payments | Transactions, entitlements, tips, payouts |
| Chat | Messages, settings, moderation |
| Ads | Campaigns, placements, tracking |
| XP | Configuration, balances, transactions |
| Multi-Camera | Multi-cam configs, angle streams |
| Ticketing | Events, tiers, purchases, redemptions |
| Billing | Usage tracking, tier management |
14.2 Key Models
User Model:
- Authentication data (wallet address, wallet source, NuFi provider)
- 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 Type | Purpose |
|---|---|
| Session Cache | Reduce authentication queries |
| Concurrent Checks | Optimize limit enforcement |
| User Profiles | Cache infrequently changing data |
| Stream Metadata | Fast access to live data |
| XP Tracking | Accurate 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
| Type | Maximum Size |
|---|---|
| Video Files | 2 GB |
| Thumbnails | 10 MB |
| Ad Creatives (Video) | 100 MB |
| Ad Creatives (Image) | 5 MB |
16.2 Supported Video Formats
| Extension | MIME Type |
|---|---|
| .mp4 | video/mp4 (recommended) |
| .mov | video/quicktime |
| .webm | video/webm |
| .avi | video/x-msvideo |
| .mkv | video/x-matroska |
16.3 Cooldown Systems
| System | Duration | Scope |
|---|---|---|
| Content XP (VOD) | 24h | Per video/user |
| Content XP (LIVE) | None | While broadcasting |
| View Tracking | 24h | Per video/user |
| Ad Rewards | 24h | Per campaign/user |
17. Glossary
| Term | Definition |
|---|---|
| ADA | Native cryptocurrency of the Cardano blockchain |
| Angle Stream | Individual camera feed within a multi-camera broadcast |
| Blockfrost | API service for Cardano blockchain queries |
| CIP-25 | Cardano Improvement Proposal for NFT metadata standard |
| CIP-30 | Cardano wallet connector standard |
| CDN | Content Delivery Network for global content distribution |
| Director | Real-time camera switching interface for multi-cam broadcasts |
| Entitlement | Access grant for gated content |
| HLS | HTTP Live Streaming protocol |
| Heartbeat | Periodic client-server ping for session maintenance |
| Lovelace | Smallest unit of ADA (1 ADA = 1,000,000 lovelace) |
| Multi-Cam | Multi-camera broadcast configuration with synchronized angle streams |
| Token Gating | Access control via token ownership or balance verification |
| NuFi SSO | Social login (Google/Facebook/Discord) with auto-created Cardano wallet |
| PDT Sync | Program Date-Time synchronization for aligning multi-camera HLS streams |
| Policy ID | Unique identifier for a Cardano NFT collection |
| NIGHT | Midnight Network utility and governance token |
| PPV | Pay-Per-View, one-time purchase model |
| RTMP | Real-Time Messaging Protocol for streaming |
| Stake Address | Cardano address aggregating all payment addresses |
| Ticket Event | Scheduled event with purchasable ticket tiers and on-chain NFT minting |
| USDCx | USDC stablecoin bridged to Cardano via Circle xReserve |
| VOD | Video-on-Demand, pre-recorded content |
| XP | Experience Points, platform reward currency |
Document Information
Whitepaper Version: 1.5.0 Platform Version: Ghostchain Network v1.5.0 Release Date: March 2026 Status: Production
Ghostchain Network - Where Creators Thrive
Ghostchain Network - Where Creators Thrive
Version 1.5.0 | March 2026