-
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 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.
- Universal Data Collection: Water price measurements must be collected from ALL regions, regardless of legal status
- User Safety First: Never expose local users to legal risk in banned regions
- Legal Compliance: Respect local laws while maintaining system integrity
- External Measurement: Use "outside-region" users to safely measure data in restricted areas
- Reward Fairness: Compensate measurers appropriately while respecting transaction restrictions
- 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
- 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
- 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
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)
- Legal Safety: External users (tourists, travelers, researchers) face minimal legal risk
- Data Integrity: Still get accurate, on-the-ground measurements
- User Protection: Locals in banned regions are protected from legal consequences
- System Completeness: Ensures global coverage of water price data
- π Travelers visiting blocked regions
- π Researchers studying water markets
- π’ Business people with international operations
- π₯ Users from nearby allowed regions
- π€ Automated bots scraping public data
Measurement Submitted β Validated β Transaction Created β Coins Sent
- Rewards paid immediately as blockchain transactions
- Full amount as specified in reward schedule
- No restrictions or delays
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
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?
- Fairness: Users still "earned" the reward through valid work
- Future Claims: If legal status changes, rewards can be paid
- Reputation: Can count toward user reputation/standing
- Transparency: Clear accounting of all measurement contributions
Target: 100 measurements
Strategy: Send invites to LOCAL users (prefer natives)
Backup: If not enough locals, add external users
Target: 100 measurements
Strategy: Send invites to BOTH local (with KYC) and external users
Mix: 70% local, 30% external for diversity
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
- No Local Participation in Blocked Regions: Locals are automatically excluded from invitations
- Clear Warning Messages: External users are informed they're measuring a restricted region
- Optional Participation: External users can decline invitations to blocked regions
- Automated Bot Priority: Use bots for public data in high-risk regions
- No Blockchain Transactions to Blocked Regions: Prevents legal issues
- Off-Chain Tracking: Rewards tracked in separate database
- Reputation Credits: Local users in blocked regions earn reputation (non-monetary)
- Future Claiming: Mechanism for claiming if legal status changes
- External measurements undergo additional validation
- Cross-reference with bot data
- Require photo proof for offline measurements
- Higher validator count for blocked-region data
- β Complete global water price coverage
- β Stabilization mechanism works in all regions
- β Accurate exchange rate calculations worldwide
- β Robust data even in restricted markets
- β 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
- β No blockchain transactions to banned regions
- β Respects local cryptocurrency laws
- β Uses legal data collection methods (public info, travelers)
- β Clear audit trail and policy documentation
- β 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
-
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! π§β π
Β© 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