Skip to content

Measurement System Overview

O edited this page Oct 11, 2025 · 4 revisions

How Measurement Validation Works in O Blockchain

πŸ” Complete Validation Workflow

The O Blockchain uses a multi-layered validation system to ensure data accuracy and prevent fraud. Here's the complete process from invitation to reward.


πŸ“¬ Step 1: Invitation

Invite Creation:

System β†’ Selects qualified user β†’ Creates invite
Invite contains:
  - invite_id (unique, cryptographically secure)
  - invited_user (CPubKey of specific user)
  - type (WATER_PRICE or EXCHANGE_RATE)
  - currency_code (e.g., "USD", "EUR")
  - expiration (14 days from creation)

User Receives:

"You've been invited to measure WATER_PRICE for USD"

You can choose:
  Option 1: Online measurement (10.00 O reward)
  Option 2: Offline measurement (100.00 O reward)

User Decision: At this point, the user decides whether to submit online or offline measurement.


πŸ“Š Step 2: Measurement Submission

Option A: ONLINE Measurement

User submits:
  - measurement_id (unique)
  - submitter (their public key)
  - currency_code ("USD")
  - price (100 cents)
  - volume (33.8)
  - volume_unit ("fl oz")
  - source_url ("walmart.com/water-bottles")
  - source: USER_ONLINE
  - invite_id (from invitation)

Option B: OFFLINE Measurement

User submits:
  - measurement_id (unique)
  - submitter (their public key)
  - currency_code ("USD")
  - price (100 cents)
  - volume (33.8)
  - volume_unit ("fl oz")
  - location ("40.7128Β°N, 74.0060Β°W")
  - proof_image_hash ("QmXxxx...") // IPFS hash
  - source: USER_OFFLINE
  - invite_id (from invitation)

βœ… Step 3: Automated Validation (Immediate)

When a measurement is submitted, the system automatically validates it:

3.1 Security Checks:

1. Invite ID exists? βœ…
2. Invite not expired? βœ…
3. Invite not already used? βœ…
4. Submitter matches invited user? βœ… (CRITICAL SECURITY CHECK)

3.2 Volume Validation:

5. Volume unit valid? (e.g., "L", "fl oz") βœ…
6. Volume in acceptable range?
   - Metric: 0.9L - 1.1L βœ…
   - Imperial: 30 fl oz - 37 fl oz βœ…
7. Price positive? βœ…
8. Calculate price per liter (pro-rated) βœ…
9. Price per liter reasonable? (1 cent - 10M cents) βœ…

3.3 Source-Specific Validation:

For ONLINE (USER_ONLINE or BOT_ONLINE):

10. URL provided? βœ…
11. URL format valid? βœ…
12. URL accessible? βœ…

For OFFLINE (USER_OFFLINE or BOT_OFFLINE):

10. Photo hash provided? βœ…
11. Location provided? βœ…
12. Location format valid? (GPS coordinates) βœ…
13. Timestamp within 60 minutes? βœ… (photo must be recent)

3.4 Gaussian Range Validation:

14. Get recent measurements for same currency
15. Calculate mean and standard deviation
16. Check if new value is within acceptable range (Β±3Οƒ)
17. Record deviation for confidence scoring

Result:

If ALL checks pass β†’ Measurement accepted for human validation
If ANY check fails β†’ Measurement REJECTED immediately

πŸ‘₯ Step 4: Human Validation (Peer Review)

After automated validation, the measurement needs human validators to confirm accuracy.

4.1 Validation Invitation:

System β†’ Selects random validators β†’ Sends validation invites
Invite contains:
  - measurement_id (to validate)
  - type (ONLINE_VALIDATION or OFFLINE_VALIDATION)
  - reward amount (10.00 O or 80.00 O)

4.2 Online Validation (10.00 O Reward):

Validator's Task:

1. Visit the URL provided
2. Verify water price on website
3. Verify volume/container size
4. Verify unit matches
5. Confirm price matches
6. Submit validation: APPROVED or REJECTED

What Validator Checks:

βœ… URL actually shows water for sale
βœ… Price matches what submitter claimed
βœ… Volume matches (e.g., 1.0L, 33.8 fl oz)
βœ… Unit is correct
βœ… Currency is correct

4.3 Offline Validation (80.00 O Reward):

Validator's Task:

1. Review photo provided (IPFS hash)
2. Physically travel to location (if possible)
3. Verify photo is real and recent
4. Confirm price tag visible in photo
5. Confirm volume label visible
6. Confirm unit visible
7. Submit validation: APPROVED or REJECTED

What Validator Checks:

βœ… Photo is authentic (not stock image or photoshopped)
βœ… Price tag clearly visible
βœ… Volume clearly visible on label (e.g., "33.8 FL OZ")
βœ… Unit clearly visible
βœ… Photo appears recent (not old/faded)
βœ… Location plausible (optional: physically verify)

4.4 Validation Threshold:

Minimum validators required: 3 (Config::MIN_VALIDATORS_REQUIRED)

Example progression:
  0 validators: Not validated (0% confidence)
  1 validator:  Not validated (10% confidence)
  2 validators: Not validated (20% confidence)
  3 validators: VALIDATED βœ… (30% confidence)
  5 validators: VALIDATED βœ… (50% confidence)
  10+ validators: VALIDATED βœ… (100% confidence)

4.5 Consensus:

if (validators.size() >= MIN_VALIDATORS_REQUIRED) {
    measurement.is_validated = true;
    measurement.confidence_score = min(1.0, validators.size() / 10.0);
}

πŸ’° Step 5: Reward Distribution

Once a measurement is validated, rewards are created during block mining.

Measurement Submitter Reward:

Online measurement: 10.00 O (quick, convenient)
Offline measurement: 100.00 O (requires travel, more effort)

Validator Rewards:

Online validation: 10.00 O per validator (remote check)
Offline validation: 80.00 O per validator (requires verification effort)

Total Rewards Example:

Scenario: Offline water price measurement with 3 validators

Submitter (offline): 100.00 O
Validator 1 (offline): 80.00 O
Validator 2 (offline): 80.00 O
Validator 3 (offline): 80.00 O
─────────────────────────────
Total: 340.00 O created

All coins created during block mining (no pre-existing funds)

πŸ”„ Complete Flow Diagram

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ STEP 1: INVITATION                                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ System β†’ Selects User β†’ Sends Invite                       β”‚
β”‚ Invite: "Measure WATER_PRICE for USD"                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ STEP 2: USER CHOOSES METHOD                                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Option 1: Online (10.00 O)  β”‚  Option 2: Offline (100.00 O)β”‚
β”‚ - Find URL                   β”‚  - Go to store              β”‚
β”‚ - Note price + volume        β”‚  - Take photo               β”‚
β”‚ - Submit URL                 β”‚  - Get GPS location         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ STEP 3: AUTOMATED VALIDATION (Immediate)                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ βœ… Security: Submitter matches invite?                      β”‚
β”‚ βœ… Volume: In range (0.9-1.1L or 30-37 fl oz)?             β”‚
β”‚ βœ… Unit: Valid ("L", "fl oz", etc.)?                        β”‚
β”‚ βœ… Price: Positive and reasonable?                          β”‚
β”‚ βœ… Gaussian: Within statistical range?                      β”‚
β”‚ βœ… Source: URL accessible OR photo + location valid?        β”‚
β”‚ βœ… Timestamp: Within 60 min (offline only)?                 β”‚
β”‚                                                             β”‚
β”‚ Result: PASS β†’ Continue | FAIL β†’ Reject Immediately        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ STEP 4: HUMAN VALIDATION (Peer Review)                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ System β†’ Selects 3+ Validators β†’ Sends Validation Invites  β”‚
β”‚                                                             β”‚
β”‚ ONLINE Validator (10.00 O):        OFFLINE Validator (80.00 O):β”‚
β”‚ - Visits URL                       - Reviews photo          β”‚
β”‚ - Confirms price                   - Confirms authenticity  β”‚
β”‚ - Confirms volume/unit             - Confirms price visible β”‚
β”‚ - Submits: APPROVED βœ…             - Confirms volume visibleβ”‚
β”‚                                    - (Optional: visits location)β”‚
β”‚                                    - Submits: APPROVED βœ…   β”‚
β”‚                                                             β”‚
β”‚ Threshold: 3 validators required β†’ Measurement VALIDATED    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ STEP 5: REWARD DISTRIBUTION (Block Mining)                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Block is mined β†’ Coinbase transaction created:             β”‚
β”‚                                                             β”‚
β”‚ [Mining Reward: 700.00 O]                                  β”‚
β”‚ [Measurement Reward: 100.00 O β†’ Submitter]                 β”‚
β”‚ [Validation Reward 1: 80.00 O β†’ Validator 1]               β”‚
β”‚ [Validation Reward 2: 80.00 O β†’ Validator 2]               β”‚
β”‚ [Validation Reward 3: 80.00 O β†’ Validator 3]               β”‚
β”‚ [Stabilization Coins: Variable β†’ Stable currency users]    β”‚
β”‚                                                             β”‚
β”‚ Total new coins: 390.00 O + mining + stabilization         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ STEP 6: DATA USAGE                                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Validated measurement β†’ Added to daily average calculation  β”‚
β”‚ Daily average β†’ Used for stability monitoring               β”‚
β”‚ Stability status β†’ Triggers stabilization mining if needed  β”‚
β”‚ Exchange rates β†’ Used for currency exchange transactions    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ›‘οΈ Multi-Layer Security

Layer 1: Cryptographic Security

  • βœ… Invite ID tied to specific user (CPubKey)
  • βœ… Submitter must match invited user
  • βœ… Cannot steal or trade invites

Layer 2: Automated Validation

  • βœ… Volume range validation
  • βœ… Gaussian range validation (statistical outlier detection)
  • βœ… Timestamp validation (offline: must be within 60 min)
  • βœ… URL accessibility validation (online)
  • βœ… Location format validation (offline)

Layer 3: Human Validation

  • βœ… Peer review by 3+ independent validators
  • βœ… Validators check actual source (URL or photo)
  • βœ… Confirms volume, unit, price accuracy
  • βœ… Prevents fraud and errors

Layer 4: Reputation System

  • βœ… Validators with higher reputation count more
  • βœ… Bad validators lose reputation
  • βœ… Consistently accurate validators gain reputation

πŸ“Š Validation Requirements by Type

ONLINE Measurements:

Submitter Provides:

βœ… URL (e.g., "walmart.com/water-bottles")
βœ… Price (e.g., 100 cents)
βœ… Volume (e.g., 33.8)
βœ… Unit (e.g., "fl oz")
βœ… Currency code (e.g., "USD")

Validators Check:

1. Visit URL
2. Confirm water product exists
3. Confirm price matches
4. Confirm volume/unit matches
5. Vote: APPROVED or REJECTED

Automated Checks:

βœ… URL accessible?
βœ… URL format valid?
βœ… Price in Gaussian range?
βœ… Volume in acceptable range (0.9L-1.1L)?

OFFLINE Measurements:

Submitter Provides:

βœ… Photo (IPFS hash, e.g., "QmXxxx...")
βœ… GPS Location (e.g., "40.7128Β°N, 74.0060Β°W")
βœ… Price (e.g., 100 cents)
βœ… Volume (e.g., 33.8)
βœ… Unit (e.g., "fl oz")
βœ… Currency code (e.g., "USD")

Validators Check:

1. Review photo
2. Confirm photo shows water bottle
3. Confirm price tag visible
4. Confirm volume label visible (e.g., "33.8 FL OZ")
5. Confirm unit visible
6. Confirm photo appears recent/authentic
7. (Optional) Physically visit location to verify
8. Vote: APPROVED or REJECTED

Automated Checks:

βœ… Photo hash provided?
βœ… Location format valid?
βœ… Timestamp within 60 minutes?
βœ… Price in Gaussian range?
βœ… Volume in acceptable range (0.9L-1.1L)?

🎯 Validation States

Measurement Lifecycle:

1. SUBMITTED β†’ measurement received, automated validation pending
2. AUTO_VALIDATED β†’ passed automated checks, needs human validators
3. PENDING_VALIDATION β†’ waiting for 3 validators
4. PARTIALLY_VALIDATED β†’ has 1-2 validators (not enough)
5. VALIDATED β†’ has 3+ validators, accepted into system βœ…
6. REJECTED β†’ failed validation (automated or human)

Confidence Scoring:

confidence_score = min(1.0, validators.size() / 10.0)

Examples:
  3 validators  = 30% confidence (minimum to be validated)
  5 validators  = 50% confidence
  7 validators  = 70% confidence
  10 validators = 100% confidence (maximum)

πŸ’° Reward Schedule

For Submitters:

Measurement Type Reward Effort Level
Water Price (Online) 10.00 O Low - just find URL
Water Price (Offline) 100.00 O High - store visit + photo
Exchange Rate (Online) 10.00 O Low - find URL
Exchange Rate (Offline) 100.00 O High - store visit + photo
URL Submission 20.00 O Medium - find reliable source

For Validators:

Validation Type Reward Effort Level
Online Validation 10.00 O Low - check website
Offline Validation 80.00 O High - review photo/visit location

Why Different Rewards?

  • Offline requires physical travel (time, gas, effort)
  • Offline provides higher quality data (harder to fake)
  • Online is convenient but easier to manipulate
  • Validators doing offline checks earn more (verification effort)

πŸ”’ Fraud Prevention

Attack: Fake URL Submission

Attacker: Submits fake walmart.com URL with wrong price
Automated: URL accessible βœ… (real site)
Validators: Visit URL β†’ Price doesn't match β†’ REJECT ❌
Result: Measurement rejected, attacker gets nothing

Attack: Photoshopped Image

Attacker: Submits edited photo with fake price
Automated: Photo hash valid βœ…, location valid βœ…
Validators: Review photo β†’ Detect editing artifacts β†’ REJECT ❌
Result: Measurement rejected, attacker reputation drops

Attack: Old Photo Reuse

Attacker: Submits 2-week old photo
Automated: Timestamp check β†’ More than 60 min old β†’ REJECT ❌
Result: Measurement rejected immediately

Attack: Invite ID Theft

Attacker: Steals someone's invite ID
Automated: Submitter != Invited User β†’ REJECT ❌
Result: Security violation logged, measurement rejected

Attack: Extreme Outlier

Attacker: Submits $100/L for water (normal is $1/L)
Automated: Gaussian check β†’ 50Οƒ deviation β†’ REJECT ❌
Result: Measurement rejected as statistical outlier

πŸ“ˆ Data Quality Assurance

Statistical Validation:

Every measurement is checked against:
  - Mean of recent measurements
  - Standard deviation
  - Acceptable range (Β±3Οƒ typically)
  - Historical patterns

Cross-Validation:

Multiple validators must agree:
  - Prevents single validator fraud
  - Requires consensus
  - Higher confidence with more validators

Source Diversity:

Data comes from:
  - User online measurements
  - User offline measurements
  - Automated bot scraping
  - Validated URL library
  
Multiple sources β†’ Higher reliability

🎯 Summary

Validation is Multi-Layered:

  1. βœ… Cryptographic - Invite tied to user
  2. βœ… Automated - Volume, range, timestamp, URL/location checks
  3. βœ… Human - 3+ peer validators confirm accuracy
  4. βœ… Statistical - Gaussian range prevents outliers
  5. βœ… Consensus - Multiple validators must agree

Measurements are Invite-Only:

  • Blockchain randomly selects users - Users cannot submit measurements without invitation
  • One invite per user - Blockchain randomly picks specific user for specific measurement
  • User chooses method - Once invited, user decides online or offline submission
  • Reward adjusts - Based on method chosen (online: 10 O, offline: 100 O)
  • No open submission - Cannot measure water prices without being randomly invited by the system

Security is Robust:

  • Cannot steal invites (cryptographic binding)
  • Cannot submit fake data (validators check)
  • Cannot reuse old photos (timestamp check)
  • Cannot submit outliers (Gaussian check)

Rewards are Fair:

  • Higher effort = Higher reward
  • Validators compensated appropriately
  • All rewards created during mining
  • Transparent and predictable

🌍 Global Measurement Policy

Philosophy: Monitor Water Prices EVERYWHERE

The O Blockchain stablecoin system requires global water price data to function correctly, even in regions where cryptocurrency is banned or restricted. This section outlines our comprehensive strategy for collecting measurement data worldwide while respecting local laws and protecting users.

Core Principles:

  1. Universal Data Collection: Water price measurements must be collected from ALL regions, regardless of legal status
  2. User Safety First: Never expose local users to legal risk in banned regions
  3. Legal Compliance: Respect local laws while maintaining system integrity
  4. External Measurement: Use "outside-region" users to safely measure data in restricted areas
  5. Reward Fairness: Compensate measurers appropriately while respecting transaction restrictions

πŸ—ΊοΈ Region Classifications

1. ALLOWED Regions (Full Access)

  • Countries: Switzerland, Singapore, UAE, Portugal, Germany, Australia, Canada
  • Strategy: LOCAL_ONLY measurement (locals preferred)
  • Rewards: FULL_REWARDS (transaction-based payments)
  • Legal Status: Crypto-friendly, no restrictions

Policy:

  • βœ… Local users can submit measurements
  • βœ… External users can also submit (but locals preferred)
  • βœ… Automated bots can collect data
  • βœ… Full transaction rewards to all participants
  • βœ… Invitations sent to local users
  • βœ… No legal risk

2. MONITORED Regions (Compliance Required)

  • Countries: USA, UK
  • Strategy: MIXED measurement (local + external)
  • Rewards: FULL_REWARDS with KYC compliance
  • Legal Status: Regulated but allowed with compliance

Policy:

  • βœ… Local users can participate (with KYC)
  • βœ… External users welcome
  • βœ… Automated bots can collect data
  • βœ… Full transaction rewards (with compliance)
  • βœ… Invitations sent to locals and external users
  • ⚠️ KYC required for local users
  • βœ… Low legal risk with compliance

3. BLOCKED Regions (Crypto Banned)

  • Countries: China, India, Bangladesh, Nepal, Bolivia, Ecuador
  • Strategy: EXTERNAL_ONLY measurement
  • Rewards: EXTERNAL_ONLY (no transactions to blocked regions)
  • Legal Status: Cryptocurrency banned or severely restricted

Policy:

  • ❌ Local users CANNOT participate (legal protection)
  • βœ… External users CAN submit measurements
  • βœ… Automated bots can collect data
  • ❌ NO transaction rewards to local users
  • βœ… Full rewards to external measurers
  • βœ… Track unpaid rewards for future claiming
  • ❌ NO invitations to local users
  • βœ… Invitations sent to external users
  • 🚨 High legal risk for locals, low risk for external users

πŸ›‘οΈ How External Measurement Works

What is an "External" User?

An external user is someone whose home country is different from the target measurement region.

Example:

  • User from Switzerland measuring water prices in China = External User βœ…
  • User from China measuring water prices in China = Local User ❌ (blocked)

Why External Users?

  1. Legal Safety: External users (tourists, travelers, researchers) face minimal legal risk
  2. Data Integrity: Still get accurate, on-the-ground measurements
  3. User Protection: Locals in banned regions are protected from legal consequences
  4. System Completeness: Ensures global coverage of water price data

Who Can Be External Measurers?

  • 🌍 Travelers visiting blocked regions
  • πŸ“Š Researchers studying water markets
  • 🏒 Business people with international operations
  • πŸ‘₯ Users from nearby allowed regions
  • πŸ€– Automated bots scraping public data

πŸ’° Reward Distribution by Region

FULL_REWARDS (Allowed & Monitored Regions)

Measurement Submitted β†’ Validated β†’ Transaction Created β†’ Coins Sent
  • Rewards paid immediately as blockchain transactions
  • Full amount as specified in reward schedule
  • No restrictions or delays

EXTERNAL_ONLY (Blocked Regions)

Local User: Measurement β†’ Validated β†’ Reward Tracked (NO transaction) β†’ Future Claim
External User: Measurement β†’ Validated β†’ Transaction Created β†’ Coins Sent βœ…
  • Local Users: Rewards are earned and tracked but NOT paid as transactions
  • External Users: Receive full transaction rewards immediately
  • Future Claims: If region becomes allowed, tracked rewards can be claimed

Unpaid Reward Tracking

struct UnpaidReward {
    CPubKey user;           // User who earned reward
    string country_code;    // Blocked region where earned
    int64_t amount;         // Amount owed
    string reason;          // "BLOCKED_REGION_TRANSACTION"
    int64_t timestamp;      // When earned
}

Why Track Unpaid Rewards?

  1. Fairness: Users still "earned" the reward through valid work
  2. Future Claims: If legal status changes, rewards can be paid
  3. Reputation: Can count toward user reputation/standing
  4. Transparency: Clear accounting of all measurement contributions

πŸ“‹ Invitation Strategy by Region

Allowed Regions:

Target: 100 measurements
Strategy: Send invites to LOCAL users (prefer natives)
Backup: If not enough locals, add external users

Monitored Regions:

Target: 100 measurements
Strategy: Send invites to BOTH local (with KYC) and external users
Mix: 70% local, 30% external for diversity

Blocked Regions:

Target: 100 measurements
Strategy: Send invites ONLY to EXTERNAL users
Selection: Prioritize nearby regions and users with travel history
NO local invites: Protect locals from legal risk

πŸ”’ Security & Compliance

Legal Risk Mitigation:

  1. No Local Participation in Blocked Regions: Locals are automatically excluded from invitations
  2. Clear Warning Messages: External users are informed they're measuring a restricted region
  3. Optional Participation: External users can decline invitations to blocked regions
  4. Automated Bot Priority: Use bots for public data in high-risk regions

Transaction Restrictions:

  1. No Blockchain Transactions to Blocked Regions: Prevents legal issues
  2. Off-Chain Tracking: Rewards tracked in separate database
  3. Reputation Credits: Local users in blocked regions earn reputation (non-monetary)
  4. Future Claiming: Mechanism for claiming if legal status changes

Data Validation:

  1. External measurements undergo additional validation
  2. Cross-reference with bot data
  3. Require photo proof for offline measurements
  4. Higher validator count for blocked-region data

🎯 Benefits of Global Policy

For the O Blockchain:

  • βœ… Complete global water price coverage
  • βœ… Stabilization mechanism works in all regions
  • βœ… Accurate exchange rate calculations worldwide
  • βœ… Robust data even in restricted markets

For Users:

  • βœ… Locals in blocked regions protected from legal risk
  • βœ… External users earn rewards for helping
  • βœ… Fair tracking of all contributions
  • βœ… Future claim possibility if laws change

For Legal Compliance:

  • βœ… No blockchain transactions to banned regions
  • βœ… Respects local cryptocurrency laws
  • βœ… Uses legal data collection methods (public info, travelers)
  • βœ… Clear audit trail and policy documentation

For Data Quality:

  • βœ… Multiple data sources (locals tracked, externals measured, bots scraped)
  • βœ… Cross-validation from different perspectives
  • βœ… Continuous monitoring even in restricted regions
  • βœ… No data gaps in the system

πŸ“ Technical Reference

  • Policy Manager: src/measurement/measurement_policy.h
  • Implementation: src/measurement/measurement_policy.cpp
  • Integration: Measurement invite system automatically applies policies
  • RPC Commands: Policy information available via measurement RPC

For developers: The policy is automatically enforced during invite creation and reward distribution. No manual intervention required.


The O Blockchain measurement system ensures accurate, fraud-resistant, globally comprehensive water price data for the stablecoin mechanism! πŸ’§βœ…πŸŒ

Clone this wiki locally