Skip to main content

ContentView System

Overview

ContentView is an integrated view tracking system for all content types, enabling users to access content without gas fees through Sponsored Transactions.

Key Features

1. Zero Gas Fee

  • Platform pays gas fees on behalf of users
  • Users access content completely free
  • Removes entry barriers for mass adoption

2. Integrated Tracking System

  • Unified management for all content types (articles, projects, quizzes)
  • Consistent reward system
  • Efficient data aggregation

System Architecture

ContentView Structure

struct ContentView has key, store {
id: UID,
content_id: ID,
content_type: u8, // 1: Article, 2: Project, 3: Quiz
viewer: address,
epoch: u64,
timestamp: u64,
collection_context: Option<ID>
}

struct ContentViewSponsor has key {
id: UID,
gas_pool: Balance<SUI>,
sponsored_views_count: u64,
min_gas_threshold: u64
}

Epoch-based Aggregation

Automatic Aggregation Process

  1. Real-time Recording: Each view is recorded as a ContentView object
  2. Epoch End: Aggregation after a set period (e.g., 24 hours)
  3. Reward Calculation: Creator rewards calculated based on view count
  4. Storage Recovery: Gas recovery through ContentView object deletion

Aggregation Function

public fun aggregate_epoch_views(
epoch: u64,
content_views: vector<ContentView>,
reward_config: &ViewRewardConfig
) {
// 1. Aggregate views per content
// 2. Calculate rewards
// 3. Distribute to creators
// 4. Delete ContentView objects (storage recovery)
}

Economic Impact

Unit Economics

ItemCost (gas units)
ContentView Creation1,000
Storage Recovery-800
Net Operating Cost200
Creator Reward300-500
Platform Margin100-300

Sustainability

  • Automatic Scaling: Auto-expansion with usage growth
  • Cost Optimization: Gas cost reduction through batch processing
  • Revenue Sharing: Transparent creator reward system

Collection Context

Viewing Through Collections

Additional context recording when viewing content within a Collection:

// View content within Collection
public fun view_content_in_collection(
content_id: ID,
collection_id: ID,
viewer: address
) {
let view = ContentView {
content_id,
collection_context: option::some(collection_id),
// ...
};
}

Privacy Protection

Anonymity Guarantee

  • View records deleted after Epoch
  • Only aggregated statistics permanently stored
  • Personal identification information minimized

Data Security

  • On-chain encryption
  • Access control management
  • Audit log maintenance

Performance Optimization

Batch Processing

  • Process multiple views at once
  • Minimize gas costs
  • Improve processing speed

Caching Strategy

  • Popular content caching
  • Prevent duplicate views
  • Reduce network load

Statistics and Analytics

Real-time Dashboard

  • View count trends
  • Popular content rankings
  • User behavior patterns

Creator Analytics

  • Performance by content
  • Revenue tracking
  • Engagement metrics

Future Improvements

  1. AI-based Recommendations: Personalization through view pattern analysis
  2. Cross-chain Support: Integration with other blockchains
  3. Real-time Streaming: Live content support
  4. Advanced Analytics: Machine learning-based insights