-
Notifications
You must be signed in to change notification settings - Fork 0
Measurement System Overview
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.
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)
"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.
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)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)When a measurement is submitted, the system automatically validates it:
1. Invite ID exists? β
2. Invite not expired? β
3. Invite not already used? β
4. Submitter matches invited user? β
(CRITICAL SECURITY CHECK)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) β
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)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 scoringIf ALL checks pass β Measurement accepted for human validation
If ANY check fails β Measurement REJECTED immediately
After automated validation, the measurement needs human validators to confirm accuracy.
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)
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
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)
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)if (validators.size() >= MIN_VALIDATORS_REQUIRED) {
measurement.is_validated = true;
measurement.confidence_score = min(1.0, validators.size() / 10.0);
}Once a measurement is validated, rewards are created during block mining.
Online measurement: 10.00 O (quick, convenient)
Offline measurement: 100.00 O (requires travel, more effort)
Online validation: 10.00 O per validator (remote check)
Offline validation: 80.00 O per validator (requires verification effort)
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)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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: 50.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 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- β Invite ID tied to specific user (CPubKey)
- β Submitter must match invited user
- β Cannot steal or trade invites
- β 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)
- β Peer review by 3+ independent validators
- β Validators check actual source (URL or photo)
- β Confirms volume, unit, price accuracy
- β Prevents fraud and errors
- β Validators with higher reputation count more
- β Bad validators lose reputation
- β Consistently accurate validators gain reputation
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)?
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)?
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_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)| 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 |
| 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)
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
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
Attacker: Submits 2-week old photo
Automated: Timestamp check β More than 60 min old β REJECT β
Result: Measurement rejected immediately
Attacker: Steals someone's invite ID
Automated: Submitter != Invited User β REJECT β
Result: Security violation logged, measurement rejected
Attacker: Submits $100/L for water (normal is $1/L)
Automated: Gaussian check β 50Ο deviation β REJECT β
Result: Measurement rejected as statistical outlier
Every measurement is checked against:
- Mean of recent measurements
- Standard deviation
- Acceptable range (Β±3Ο typically)
- Historical patterns
Multiple validators must agree:
- Prevents single validator fraud
- Requires consensus
- Higher confidence with more validators
Data comes from:
- User online measurements
- User offline measurements
- Automated bot scraping
- Validated URL library
Multiple sources β Higher reliability
- β Cryptographic - Invite tied to user
- β Automated - Volume, range, timestamp, URL/location checks
- β Human - 3+ peer validators confirm accuracy
- β Statistical - Gaussian range prevents outliers
- β Consensus - Multiple validators must agree
- Blockchain selects users - Users cannot submit measurements without invitation
- One invite per user - Blockchain 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 invited by the system
- Cannot steal invites (cryptographic binding)
- Cannot submit fake data (validators check)
- Cannot reuse old photos (timestamp check)
- Cannot submit outliers (Gaussian check)
- Higher effort = Higher reward
- Validators compensated appropriately
- All rewards created during mining
- Transparent and predictable
The O Blockchain validation system ensures accurate, fraud-resistant water price data for the stablecoin mechanism! π§β
Β© O International
A Nonprofit Association Focused on the Creation of a Water Price-Based Stable Coin
Association de Loi 1901 β France NumΓ©ro de Siret (French SIREN): 924 014 467 00014