Pretrend Protocol

Continuous Trend Resolution for Prediction Markets

Version 2.0 | January 2026

1. Executive Summary

Pretrend is a trend-based oracle protocol that enables prediction markets to resolve based on directional movement rather than binary yes/no outcomes. The protocol consists of two components: an Oracle that lives on the Vitruveo blockchain and leverages native precompiled contracts for on-chain trend computation, and a Marketplace system that operates on external chains such as BSC.

Unlike traditional prediction markets where users bet on whether a specific event will occur, Pretrend markets allow users to predict the magnitude and direction of change in any time-series data. Users purchase units in one of five outcome buckets representing different trend intensities, from significant decline to significant growth.

The protocol uses an independent bonding curve pricing model where earlier buyers receive more units per dollar, guaranteeing better returns for early participants when they pick the winning bucket. A notary service fetches external data and writes verified trend calculations on-chain.

2. Problem Statement

2.1 Limitations of 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.

This binary constraint creates several problems. First, markets cannot capture the magnitude of movement, only whether a threshold was crossed. Second, setting thresholds is arbitrary and can make markets unbalanced from inception. Third, near-miss outcomes feel punitive to participants who correctly predicted direction but not magnitude.

2.2 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 resolves this by computing 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.

3. System Architecture

The protocol consists of three primary components: the Vitruveo Oracle, the Notary Service, and the Marketplace Layer. Each component has distinct responsibilities and interfaces.

3.1 Component Overview

Component Location Responsibility
Oracle Contract Vitruveo L1 Stores market state, bucket thresholds, trend results, and fee accounting
Trend Precompile Vitruveo L1 (native) Computes OLS regression, R-squared, volatility, and bucket quintiles
Notary Service Off-chain (Pretrend operated) Fetches external data, signs results, submits to Oracle
Marketplace Contract BSC (or other EVM chains) Handles unit purchases, pot tracking, winner payouts
HOST Bridge Vitruveo to external chains Pushes resolution data cross-chain via HTTP Outbound Service Trigger

3.2 Data Flow

When a market is created, the Notary fetches historical data for the specified data source and calls the trend precompile to compute bucket thresholds based on historical volatility quintiles. These thresholds are written to the Oracle contract along with the baseline trend value.

During the active market period, the Notary fetches data at the resolution interval defined by the data source, computes the current trend via the precompile, and updates the Oracle contract. Multiple markets sharing the same data source receive the same update in a single fetch operation.

When the market duration expires, the final trend value determines the winning bucket. The Oracle uses the HOST protocol to push the resolution to marketplace contracts on external chains, triggering the payout process.

4. Oracle Specification

4.1 Trend Precompile

The Vitruveo blockchain includes a native precompiled contract for trend computation. This precompile accepts time-series data as input and returns statistical measures without requiring expensive on-chain computation via the EVM.

Mode 1: Full Analysis — Given a series of timestamp-value pairs, the precompile computes three values: the slope percentage representing the fitted trend change from start to end of the series, the R-squared value indicating confidence in the linear fit, and the volatility measure computed as sample standard deviation.

Mode 2: Volatility Buckets — Given historical data and a window size, the precompile computes quintile thresholds for bucket boundaries. It calculates the absolute percentage change for every rolling window in the data, sorts these deltas, and returns the 20th, 40th, 60th, and 80th percentile values.

4.2 Data Source Registry

Field Type Description
sourceId bytes32 Unique identifier for this data source
provider string Identifier of the code module that fetches this data
resolutionInterval uint32 Update frequency in seconds (minimum 900, must be multiple of 900)
historicalWindow uint32 Lookback period for bucket calculation in seconds (0 = use fixed thresholds)
innerThreshold uint16 Default inner threshold in basis points (default 500 = 5%)
outerThreshold uint16 Default outer threshold in basis points (default 2500 = 25%)
active bool Whether this source is available for new markets

5. Pricing Model

Pretrend uses an independent bonding curve pricing model. Each bucket has its own price curve that increases as more units are purchased in that bucket. This guarantees that earlier buyers receive better returns when they pick the winning bucket.

5.1 Core Formula

The price per unit in a bucket is determined by the following formula:

price = basePrice × (1 + bucketUnits / k)

Where basePrice is $0.20 (the starting price for all buckets), bucketUnits is the total units already purchased in this bucket, and k is the curve steepness parameter (default 500).

When a user spends D dollars on a bucket, they receive D / price units. After the purchase, the bucket's unit count increases, which raises the price for the next buyer.

5.2 Price Curve Behavior

With k=500, the price doubles after 500 units are purchased in a bucket:

Cumulative $ Price Paid Units Received Total Units New Price
$100 $0.20 500.0 500 $0.40
$200 $0.40 250.0 750 $0.50
$300 $0.50 200.0 950 $0.58
$400 $0.58 172.4 1122 $0.65
$500 $0.65 154.1 1277 $0.71
$1000 $0.91 109.4 1894 $0.96
$2000 $1.28 77.9 2788 $1.32

5.3 Cross-Bucket Independence

Each bucket's price is determined solely by the units purchased in that bucket. Activity in other buckets does not affect a bucket's price. If 1000 users buy Moon, the price of Bull remains unchanged until someone buys Bull.

5.4 Early Bird Advantage

The bonding curve guarantees that earlier buyers in a bucket receive more units per dollar than later buyers. When the market resolves, winners split the pot proportionally by units held.

Buyer Sequence Price Units Share Payout Return
Alice 1st $0.20 500 52.6% $158 1.58x
Bob 2nd $0.40 250 26.3% $79 0.79x
Carol 3rd $0.50 200 21.1% $63 0.63x

5.5 Implied Probability Display

Although bucket prices do not sum to $1, implied probability can be displayed to users as:

impliedProbability = bucketPot / totalPot

5.6 The k Parameter

k Value Price After $500 Effect
100 $1.77 Aggressive — price rises quickly, strong early bird advantage
250 $1.02 Moderate-aggressive
500 $0.71 Default — balanced curve
1000 $0.51 Gentle — accommodates higher volume
2000 $0.38 Very gentle — for high-volume markets

6. Marketplace Specification

6.1 Unit Purchases

Users purchase units by specifying the market, bucket (0-4), and dollar amount. The contract calculates the current price for that bucket, determines units received, updates the bucket's unit count and pot, and records the user's holdings.

6.2 Peer-to-Peer Transfers

Users may transfer units to other users at the current market price. When Alice sells 100 Bull units to Leo, Leo pays Alice at the current Bull price. The market state remains unchanged: same total units, same pot, same prices. Only ownership moves.

6.3 Outcome Buckets

Bucket Index Meaning Threshold Range
Crash 0 Significant decline Below 20th percentile
Bear 1 Moderate decline 20th to 40th percentile
Flat 2 Minimal change 40th to 60th percentile
Bull 3 Moderate growth 60th to 80th percentile
Moon 4 Significant growth Above 80th percentile

6.4 Market Lifecycle

Status Description Allowed Actions
Pending Market created, awaiting start time None (waiting)
Active Market live, accepting purchases Buy units, transfer units
Resolved Duration complete, winner determined Claim payouts
Voided Insufficient data or system failure Claim refunds

6.5 Resolution and Payout

When a market resolves, the winning bucket is determined by comparing the final trend value to the bucket thresholds. Fees are deducted from the pot, then the remaining pot is distributed proportionally:

payout = (userUnits / totalWinningUnits) × distributablePot

7. Fee Structure

Fee Amount Paid By Paid To When
Market Creation $5 flat Market Creator Marketplace At market creation
Transaction Fee 0.5% of purchase User Marketplace On each unit purchase
Creator Fee 2% of pot Pot Market Creator At resolution
Oracle Update $0.25 flat Pot Oracle Each scheduled update
Oracle Resolution 0.1% of pot Pot Oracle At resolution

Fee Distribution: For the primary Pretrend marketplace, 100% of the 0.5% transaction fee goes to Pretrend. For white-label marketplaces, the fee splits 50% to Pretrend and 50% to the white-label operator.

8. Cross-Chain Resolution

The Oracle lives on Vitruveo while marketplaces operate on external chains. Resolution data flows via the HOST (HTTP Outbound Service Trigger) protocol.

When a market resolves, the Oracle contract triggers a HOST call that pushes the resolution data to marketplace contracts on supported chains. The HOST payload includes market ID, final trend value, winning bucket index, and a cryptographic signature. The receiving marketplace contract verifies the signature before processing payouts.

At launch, BSC is the primary marketplace chain. Additional EVM-compatible chains can be added by deploying marketplace contracts and registering them with the Oracle.

9. Data Sources

9.1 Provider Architecture

A provider is a self-contained code module responsible for fetching data from an external source and returning normalized time-series data. Each provider exposes a standard interface: given a time range, return an array of timestamp-value pairs.

9.2 Source Categories

Category Examples Resolution Historical Window
Cryptocurrency BTC price, ETH price, trading volume, TVL 15 minutes 30 days
Equities Stock prices, indices, forex rates 15-60 minutes 90 days
Social Metrics Follower counts, view counts, engagement 1-4 hours 30 days
Entertainment Box office, streaming charts, album sales 24 hours None (fixed)
Sports Player statistics, team rankings, betting odds 1-24 hours Season or 90 days
Economic Inflation, unemployment, interest rates 24h to weekly 1 year
Elections Polling aggregates, approval ratings 24 hours 90 days

10. Marketplace Variants

10.1 Primary Marketplace

Pretrend operates the primary marketplace offering access to all registered data sources, a general-purpose interface for retail users, full transaction fee retention (100% of 0.5%), and direct support from the Pretrend team.

10.2 White-Label Marketplace

Third parties can deploy branded marketplaces with custom branding and domain, optional source filtering (crypto-only, sports-only, etc.), a 50/50 split of transaction fees with Pretrend, and access to the same Oracle and resolution infrastructure. No upfront licensing fee required.

10.3 Open-Source Starter Kit

Developers can access an open-source component library including React components for market display, contract ABIs and integration examples, documentation for Oracle queries, and example implementations for common UI patterns.

11. Security Considerations

Oracle Trust Model: The Notary is operated by Pretrend. Trust is mitigated by deterministic precompile computation (anyone can verify), signed on-chain submissions creating auditable history, and public APIs that can be independently queried.

Data Source Manipulation: OLS regression dampens outlier effects. Resolution intervals prevent flash manipulation. Multiple data points over market duration provide redundancy.

Smart Contract Risks: Mitigated via comprehensive testing, third-party audits, upgradeable proxy contracts, and timelocks on administrative functions.

Cross-Chain Risks: HOST failures are handled via retry with exponential backoff and fallback manual submission with signature verification.

12. Void Conditions

Automatic Void Triggers: Market receives fewer than 80% of expected updates, data source becomes unavailable during market period, or Notary fails to submit resolution within 24 hours of market end.

Manual Void: Evidence of data source manipulation, critical bug affecting fairness, or force majeure events.

Refund Process: Infrastructure costs already incurred are deducted first. Remaining pot distributed proportionally based on total unit purchases across all buckets. Market creation and transaction fees are not refunded.

13. Implementation Roadmap

Phase 1: Core Infrastructure — Deploy Oracle on Vitruveo testnet. Implement Notary service. Integrate initial data sources. Deploy Marketplace on BSC testnet. Implement HOST bridge. Internal testing.

Phase 2: Primary Marketplace — Mainnet deployment. Launch marketplace web application. Expand data sources. Monitoring infrastructure. Security audit.

Phase 3: Ecosystem Expansion — White-label framework. Open-source starter kit. Additional chain support. Data source catalog expansion.

Phase 4: Decentralization — Decentralized notary network. Staking and slashing. Fraud proofs. Governance for data source approval.

14. Glossary

Term Definition
Bonding Curve Pricing function where price increases as more units are purchased
Bucket One of five outcome categories representing a range of trend movement
HOST HTTP Outbound Service Trigger — Vitruveo protocol for cross-chain messaging
k Parameter Controls steepness of bonding curve; higher k = gentler price increase
Notary Off-chain service that fetches data and submits results to Oracle
OLS Ordinary Least Squares — regression method for computing trend slope
Oracle On-chain contract storing market configuration and resolution data
Precompile Native blockchain function callable as a contract with optimized execution
Provider Code module responsible for fetching data from a specific external source
Quintile One of five equal divisions of a sorted dataset
Resolution Interval Frequency at which the Notary fetches data and updates trend
Trend Percentage change computed via linear regression over a time series
Unit Share in an outcome bucket; price determined by bonding curve
Void Market state where normal resolution is impossible and refunds are issued

15. AI Notary Service

The Notary service is powered by AI, providing intelligent assistance throughout the market lifecycle.

15.1 Market Insights

During active markets, the AI generates natural language summaries of trend movements, helping participants understand what's happening without interpreting raw numbers. As money flows into different buckets, it explains probability shifts and what they signal about crowd sentiment. After resolution, it provides analysis of what drove the outcome, connecting trend movements to real-world events.

15.2 Market Creation Assistant

When creating a market, the AI recommends optimal duration based on the data source's characteristics and historical volatility patterns. It suggests appropriate k parameter values based on expected trading volume. It warns creators about potential issues such as low-liquidity data sources or unusual volatility periods. Before a market goes live, creators can preview the computed bucket thresholds and adjust parameters if needed.

Appendix A: Example Market Walkthrough

A 24-hour BTC price trend market illustrates the complete lifecycle.

A.1 Market Creation

Creator specifies BTC-USD data source, start time at midnight UTC, duration of 86,400 seconds. Creator pays $5 fee. Notary fetches 30 days historical data, computes bucket thresholds via Mode 2: -8.2% (Crash/Bear), -2.1% (Bear/Flat), +2.3% (Flat/Bull), +9.1% (Bull/Moon). Baseline trend: +0.4%.

A.2 Active Period

Seq User Bucket Amount Price Units
1 Alice Bull $100 $0.20 500.0
2 Bob Bear $100 $0.20 500.0
3 Carol Bull $100 $0.40 250.0
4 Dan Flat $200 $0.20 1000.0
5 Eve Moon $100 $0.20 500.0
6 Frank Bull $100 $0.50 200.0
7 Grace Bear $150 $0.40 375.0
8 Henry Bull $75 $0.58 129.3

A.3 Resolution

Final trend: +5.8% (Bull bucket wins). Pot: $925. After fees (updates $24, resolution $0.90, creator $18): Distributable $882.10.

User Units Share Payout Paid Return
Alice 500.0 46.3% $408.62 $100 4.09x
Carol 250.0 23.2% $204.31 $100 2.04x
Frank 200.0 18.5% $163.45 $100 1.63x
Henry 129.3 12.0% $105.72 $75 1.41x

Alice's early conviction is rewarded with 4.09x return. Bob, Dan, Eve, and Grace (losers) receive nothing—their $550 contributed to the winners' pot.