Pretrend Protocol
Continuous trend resolution for prediction markets. Users predict the magnitude and direction of change — not just whether an event occurs.
Version 2.0
The Problem with Binary Markets
Current prediction markets force complex, continuous phenomena into binary outcomes. A market asking whether Bitcoin will reach $100,000 by a certain date loses all nuance about price movement.
If Bitcoin rises from $60,000 to $99,000, participants who bet on growth receive nothing — despite being directionally correct. Markets can't capture the magnitude of movement, only whether a threshold was crossed.
Setting thresholds is arbitrary and can make markets unbalanced from inception. Near-miss outcomes feel punitive to participants who correctly predicted direction but not exact magnitude.
The Trend Alternative
Real-world data moves continuously. Prices drift, metrics fluctuate, engagement rises and falls. A prediction system that captures directional movement and magnitude provides richer market dynamics and fairer outcomes.
Pretrend computes the trend slope over a defined time period using linear regression. The result is a percentage change that maps to one of five outcome buckets, each representing a range of possible movements calibrated to the specific data source.
Users purchase units in one of five buckets — from significant decline to significant growth. Earlier buyers receive more units per dollar through a bonding curve, guaranteeing better returns for early conviction.
Five Outcome Buckets
Every market has exactly five buckets representing ranges of trend movement, calibrated to each data source's historical volatility.
System Architecture
Three primary components working together: the VTRU Oracle, the Notary Service, and the Marketplace Layer.
Oracle Contract
VTRU Blockchain
Stores market state, bucket thresholds, trend results, and fee accounting. Does not compute trends directly — stores results submitted by the authorized Notary.
Trend Precompile
VTRU Blockchain (native)
Computes OLS regression, R-squared, volatility, and bucket quintiles at compiled machine-code speed. What would be impossible in Solidity executes in microseconds.
Notary Service
Off-chain
Fetches external data, signs results, submits to Oracle. Batches updates for markets sharing the same data source. Sole authorized writer to the Oracle contract.
Marketplace Contract
BSC (or other EVM chains)
Handles unit purchases, pot tracking, and winner payouts. Deployed on external chains for accessibility and liquidity.
HOST Bridge
VTRU to external chains
Pushes resolution data cross-chain via HTTP Outbound Service Trigger. Validator-signed payloads ensure cryptographic proof of resolution.
Trend Precompile
A native precompiled contract on the VTRU blockchain that performs statistical computation at the Geth client layer — compiled Go code, not interpreted EVM bytecode.
Mode 1: Full Analysis
Given a series of timestamp-value pairs, the precompile computes three values:
- Slope percentage — the fitted trend change from start to end of the series
- R-squared — confidence in the linear fit
- Volatility — sample standard deviation
Output: 96 bytes (3 × 32-byte signed integers, scaled by 1018)
Mode 2: Volatility Buckets
Given historical data and a window size, the precompile computes quintile thresholds for bucket boundaries:
- Calculates absolute percentage change for every rolling window
- Sorts deltas and returns 20th, 40th, 60th, and 80th percentile values
- These four thresholds define the five outcome buckets
Output: 128 bytes (4 × 32-byte unsigned integers representing quintile thresholds)
Bonding Curve Pricing
Each bucket has its own independent price curve. Earlier buyers receive more units per dollar — rewarding early conviction with better returns.
The Formula
basePrice: $0.20 · k: 500 (price doubles after k units)
Early Bird Advantage
| Buyer | Price | Units | Share | Return |
|---|---|---|---|---|
| Alice (1st) | $0.20 | 500 | 52.6% | 1.58x |
| Bob (2nd) | $0.40 | 250 | 26.3% | 0.79x |
| Carol (3rd) | $0.50 | 200 | 21.1% | 0.63x |
Each bucket's price is independent — activity in one bucket doesn't affect prices in another.
Market Lifecycle
From creation to resolution — a complete flow across chains.
Create
Creator specifies data source, start time, and duration. Notary fetches historical data, computes bucket thresholds via the precompile, and initializes the market.
Trade
Users purchase units in their chosen bucket on BSC. Bonding curve prices each purchase. The Notary updates the trend at every resolution interval (minimum 15 min).
Resolve
When duration expires, the final trend determines the winning bucket. The Oracle pushes resolution via HOST to marketplace contracts, triggering payouts.
Data Sources
Pretrend supports any time-series data. Each source has a provider module that handles fetching, authentication, and normalization.
Cryptocurrency
BTC price, ETH price, trading volume, TVL
Equities
Stock prices, indices, forex rates
Social Metrics
Follower counts, view counts, engagement rates
Economic
Inflation, unemployment, interest rates
Elections
Polling aggregates, approval ratings
Marketplace Models
Multiple deployment models for different use cases.
Primary Marketplace
Operated by Pretrend with access to all data sources. Full transaction fee retention. General-purpose interface for retail users.
White-Label
Third parties deploy branded marketplaces with custom domains and optional source filtering. 50/50 fee split with Pretrend. No upfront licensing fee.
Open-Source Starter Kit
React component library, contract ABIs, integration examples, and documentation for building custom marketplace experiences.
Security
Oracle Trust Model: The Notary is a trusted component. All submissions are signed and on-chain, creating an auditable history. The trend precompile is deterministic — anyone can verify results independently.
Data Integrity: OLS regression dampens outlier effects. Resolution intervals prevent flash manipulation. Multiple data points over market duration provide redundancy.
Void Protection: Markets are automatically voided if they receive fewer than 80% of expected updates. Participants receive refunds minus infrastructure costs already incurred.
Cross-Chain Fallback: If HOST delivery fails, marketplace contracts support manual resolution submission with Oracle signature verification.
Roadmap
Oracle + Notary on VTRU testnet, Marketplace on BSC testnet, HOST bridge, initial data sources (BTC, ETH)
Mainnet deployment, marketplace web app, expanded data sources, security audit
White-label framework, open-source starter kit, additional chains, broader data catalog
Decentralized notary network, staking and slashing, fraud proofs, community governance