Overview

sleep.fun is a DataDAO built on the Vana protocol, designed to create a decentralized marketplace for sleep data. The system enables users to maintain sovereignty over their sleep data while monetizing it through Vana's Data Liquidity Pools (DLPs). By leveraging Vana's programmable data ownership framework, users can contribute their sleep metrics to collective pools while maintaining cryptographic control over their data.

The platform uses Vana's secure enclaves and tokenized data rights to facilitate transparent, fair data exchange between contributors and researchers. As a DataDAO, all major decisions regarding data usage, validation criteria, and reward distribution are governed by the community of data contributors.

The collected data serves two primary purposes:

System Architecture

  1. Data Infrastructure:
  2. User Interface:

Data Collection

The platform accepts sleep data through Terra's API integration, ensuring consistent data quality and standardization. Our infrastructure automatically processes and validates data from various sources while maintaining user privacy.

Data Schema

sleep.fun collects sleep data according to the following schema:

table SleepData {
  // Sleep Duration Metrics
  sleep_efficiency: float;
  duration_asleep_seconds: float;
  duration_light_sleep_seconds: float;
  duration_deep_sleep_seconds: float;
  duration_rem_sleep_seconds: float;
  
  // Sleep Quality Metrics
  num_wakeup_events: int;
  sleep_latency_seconds: float;
  wake_up_latency_seconds: float;
  
  // Heart Rate Data
  avg_hr_bpm: float;
  max_hr_bpm: float;
  min_hr_bpm: float;
  resting_hr_bpm: float;
  
  // Breathing Data
  avg_breaths_per_min: float;
  snoring_duration_seconds: float;
  
  // Session Metadata
  start_time: timestamp;
  end_time: timestamp;
  is_nap: boolean;
  provider: string;
  user_id: string;
  
  // Oxygen Data
  avg_saturation_percentage: float;
}

Validation

Our validation function can be viewed here https://github.com/sleepdotfun/validator

Proof of Contribution

Authenticity

Data authenticity is verified through Terra's API integration system. When users connect their devices, Terra assigns a unique user identifier that validates the connection to their physical devices and health applications. This ensures all data comes from legitimate, actively connected devices and that users can only contribute data from devices they personally own and have authorized.