Skip to main content

VibeKiosk Contract

The VibeKiosk contract is a standalone ERC-721 NFT contract that manages ticket sales for all vibestreams. It provides a centralized ticketing system with automatic revenue distribution.

Contract Overview

Address: 0x5ac3193b6DD7B520D63EbE65b59f97a2dF4ee686
Standard: ERC-721 (NFT)
Token Symbol: VIBE-TIX
Features: Centralized ticketing, revenue distribution, ticket validation

Core Data Structures

Ticket Configuration

Each vibestream registered with VibeKiosk has an associated configuration:

Ticket Data

Each minted ticket contains detailed information:

Core Functions

Vibestream Registration

Only VibeFactory can register vibestreams for ticket sales:
Parameters:
  • vibeId: Unique vibestream identifier from VibeFactory
  • creator: Address that will receive ticket sale revenue
  • ticketsAmount: Total number of tickets available (must be > 0)
  • ticketPrice: Price per ticket in wei
  • distance: Geographic constraint in meters
Process:
  1. Validates input parameters
  2. Ensures vibestream is not already registered
  3. Creates ticket configuration
  4. Emits VibestreamRegistered event

Ticket Purchase

Users can purchase tickets for registered vibestreams:
Requirements:
  • Vibestream must be registered and active
  • Must send sufficient tMETIS (≥ ticket price)
  • Tickets must still be available
Process:
  1. Validates vibestream and payment
  2. Mints ERC-721 ticket NFT
  3. Records ticket data and ownership
  4. Updates user and vibestream mappings
  5. Distributes revenue (80% creator, 20% treasury)
  6. Refunds excess payment
  7. Returns unique ticket ID

Revenue Distribution

Automatic 80/20 split on all ticket sales:

Ticket Management

Ticket Information Retrieval

Returns comprehensive ticket information including ownership history and vibestream details.

User Ticket Queries

Vibestream Queries

Ticket Validation

Availability Check

Checks if tickets are still available for purchase.

Ownership Validation

Standard ERC-721 functions for ownership verification:

Events

Registration Event

Purchase Event

Security Features

Reentrancy Protection

All payable functions use OpenZeppelin’s nonReentrant modifier:

Access Control

  • Only VibeFactory can register vibestreams
  • Only contract owner can update configuration
  • Standard ERC-721 transfer controls apply to tickets

Input Validation

Comprehensive validation on all operations:

Administrative Functions

Configuration Updates

Emergency Functions

Allows owner to withdraw contract balance in emergency situations.

Token URI Generation

Tickets have automatically generated token URIs:

Usage Examples

Purchasing a Ticket

Checking Ticket Ownership

Getting Sales Information

Integration with VibeFactory

VibeKiosk integrates with VibeFactory through automatic registration:

Dual Monetization

Vibestreams can simultaneously support both ticket sales and real-time streaming:
  1. Ticket Sales: One-time purchase for access/perks
  2. PPM Streaming: Ongoing payments for active participation
This allows creators to monetize both access and engagement separately.

Next Steps

Subscriptions Contract

Learn about Vibe Market subscriptions

Contract Flows

See integration patterns