# On-chain costs Prediction Markets

### On-Chain Cost Prediction Markets

Every blockchain operates on a simple economic truth: **blockspace is scarce**. Each block can only contain a finite number of transactions, forcing users to **bid for inclusion** through gas prices. This bidding system turns every block into a **micro-auction for computationm** a constant balancing act between supply and demand.

Despite being the heartbeat of blockchain activity, this market for blockspace has never had its own **financial layer**. While tokens, yields, and liquidity have all been financialized, the **cost of using the network itself** has remained unhedged, unpredictable, and opaque. Hedgehog changes that by introducing the world’s first **prediction markets for on-chain costs**.

#### A Market Built on Usage, Not Tokens

Hedgehog isolates the variable that defines the blockchain economy, **the cost of transacting and interacting with financial instruments,** and transforms it into a **tradable market primitive**.\
\
Instead of delivering or renting real blockspace, Hedgehog mirrors it synthetically, tracking only the **price behavior of network activity**: gas fees, priority fees, funding rates, and incentives.

These data points become **predictive markets**, where participants can trade expectations about future costs, whether gas will rise or fall, how MEV pressure will evolve, or when congestion will peak. Each position reflects a live view of blockchain demand and the macro conditions driving it.\
\
How It Works

<figure><img src="/files/AwNpk9pRpoGXQvr8gvVk" alt=""><figcaption></figcaption></figure>

Hedgehog’s on-chain cost markets are **cash-settled prediction markets** designed around live blockchain data.\
Each market tracks a **specific cost variable** — for example, *average Ethereum gas price* over the next 15 minutes, and lets participants trade on whether it will move up or down within that window.

**1. Market Creation**

* Smart contracts generate markets tied to time-based cost intervals: hourly, daily, or per-block windows.
* Data oracles continuously feed **real-time gas prices and block metrics** into these contracts.

**2. Position Taking**

* Traders can **go long or short** on a given outcome, for example, “gas will exceed 80 gwei in the next 10 blocks.”
* Paymasters or rollups can use these same markets to **hedge exposure**, buying positions that profit when gas rises (offsetting their real-world expenses).

**3. Continuous Pricing**

* As new blocks are produced, the market dynamically adjusts prices to reflect the latest gas trends and pending transaction volume.

**4. Resolution & Settlement**

* When the time window closes, the market references on-chain cost data to determine the actual outcome.
* **Winning positions are paid out automatically**, while a **small trading fee** applies only to profitable positions, ensuring fairness and liquidity sustainability.

Through this mechanism, Hedgehog transforms raw blockchain data into a **financial heartbeat,** every block generates a measurable, tradable signal about the network’s current and expected activity.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hedgehog-protocol.gitbook.io/main/how-it-works/on-chain-costs-prediction-markets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
