Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Header Bid

A header bid is a commitment from a block builder containing a proposed block header and a payment to the validator, submitted to a relay during the Proposer-Builder Separation (PBS) auction process.
Chainscore © 2026
definition
AD TECH

What is a Header Bid?

A header bidding is an advanced programmatic advertising technique that allows publishers to offer their ad inventory to multiple demand sources simultaneously before making calls to their primary ad server.

A header bid, also known as pre-bidding or advance bidding, is a server-side or client-side auction mechanism that runs in parallel before the traditional ad server call. Instead of a sequential, "waterfall" process where ad networks are queried one after another, header bidding enables all participating demand-side platforms (DSPs) and supply-side platforms (SSPs) to bid on an impression at the same time. This parallel auction increases competition, which typically results in higher fill rates and improved revenue per mille (RPM) for the publisher by ensuring the highest bid wins the impression.

The technical implementation traditionally involves placing a JavaScript code snippet—the header bidding wrapper—in the <head> section of a webpage. This wrapper contacts a header bidding partner or a prebid server, which then conducts the auction among its connected buyers. The winning bid price and creative are passed to the primary ad server (like Google Ad Manager) through key-value pairs, often using the Google Publisher Tag (GPT). The ad server then compares this header bid against its own direct-sold and network line items in a final, unified auction to determine the overall champion.

A key evolution is the shift from client-side header bidding to server-side header bidding. Client-side execution occurs in the user's browser, which can increase page latency. Server-side header bidding moves the auction logic to a cloud-based server, reducing page load impact and improving scalability. Solutions like Prebid Server facilitate this by allowing publishers to manage server-to-server integrations with dozens of demand partners through a single connection, streamlining operations.

For publishers, the primary benefits are increased competition and transparency. By creating a unified, fair auction, header bidding mitigates the disadvantages of the traditional waterfall, where higher-value demand could be overlooked. It allows smaller ad exchanges to compete equally with walled gardens. For advertisers, it provides broader, more efficient access to premium inventory. However, challenges include managing technical complexity, potential latency if not optimized, and the need to carefully manage the number of demand partners to avoid bid duplication and auction fatigue.

In practice, header bidding is configured through a demand stack—a curated list of SSPs and exchanges. Publishers use wrapper solutions like Prebid.js, Amazon Transparent Ad Marketplace (TAM), or Index Exchange's Header Bid Expert to manage these integrations. The competing bids are evaluated not just on price but also on factors like ad quality and viewability. The entire process, from the initial wrapper call to the ad render, must typically complete within a strict timeout (e.g., 1-3 seconds) to maintain user experience and adhere to Core Web Vitals metrics.

how-it-works
MECHANISM

How a Header Bid Works in PBS

An explanation of the competitive auction mechanism that determines which block builder's payload is selected for a new Ethereum block.

A header bid is the core competitive mechanism in Proposer-Builder Separation (PBS), where specialized block builders submit cryptographically committed proposals (headers) containing a block's summary and a bid to the block proposer (validator). The proposer selects the header with the highest bid, typically paid in the native network token (e.g., ETH), and signs it to create a signed block header. This process, often facilitated by a relay, allows proposers to outsource complex block construction while capturing Maximal Extractable Value (MEV) revenue without executing the full block themselves.

The technical flow begins when builders assemble a full block, computing its hash (the block hash) and a commitment to its transactions (the transactions root). They send this data, along with their monetary bid and a signature, to the proposer via a relay. The proposer evaluates all received header bids, choosing the most profitable one. By signing the chosen header, the proposer commits to publishing the corresponding full block body later. This separation ensures the proposer never sees the block's contents before selection, mitigating certain MEV-related risks and censorship vectors.

The winning builder's bid is paid from the builder to the proposer. This payment is typically included as the first transaction in the block, often via a coinbase transaction or a direct transfer to the proposer's fee recipient address. The economic incentive aligns both parties: builders profit from the MEV and transaction fees they capture within the block, minus their bid, while proposers are compensated for their role in block finalization. This market-driven auction is essential for efficiently distributing the value extracted from block production in a post-PBS ecosystem.

key-features
AD TECH MECHANISM

Key Features of a Header Bid

A header bid is a programmatic advertising auction mechanism that runs in a user's browser before the publisher's ad server is called, allowing multiple demand partners to bid simultaneously for ad inventory.

01

Client-Side Auction

The auction logic and bidding occur directly in the user's web browser (the client). This is the defining architectural feature that differentiates it from server-side solutions.

  • Bid Requests: JavaScript wrappers from each Supply-Side Platform (SSP) or Ad Exchange are loaded in the page header.
  • Parallel Execution: All demand partners receive the bid request and submit their bids concurrently, reducing latency compared to sequential, server-side "waterfall" auctions.
02

Price Transparency & Yield Optimization

Publishers gain full visibility into all bid prices before making a decision, maximizing ad revenue.

  • Unified Auction: All bids are collected and the highest price is revealed to the publisher's ad server.
  • Eliminates Waterfall Inefficiency: In a traditional waterfall, a lower-paying ad network could win an impression if it is called first, leaving higher bids unconsidered. Header bidding ensures the highest bid always wins.
04

Integration with the Ad Server

The header bidding process must be synchronized with the publisher's primary ad server, which makes the final decision on which ad to serve.

  • Price Key-Value Pairs: The winning bid price is passed to the ad server as a key-value pair (e.g., hb_pb=5.50).
  • Line Item Targeting: The publisher creates guaranteed line items in their ad server that target these key-values, ensuring the header bid wins the ad server's own auction.
05

Latency Considerations

A primary trade-off of client-side header bidding is its potential impact on page load performance.

  • Timeout Management: Wrappers use a configurable bid timeout (typically 500-1500ms). Bids not returned in time are discarded.
  • Performance Optimizations: Techniques like server-to-server (S2S) header bidding, bundling requests, and lazy loading are used to mitigate latency.
06

Demand Diversification

Enables publishers to integrate dozens of demand sources beyond their primary ad exchange, increasing competition for every impression.

  • Direct Demand: Can include direct deals with advertisers, multiple SSPs, and ad networks.
  • Floor Pricing: Publishers can set global or granular floor prices to ensure minimum CPMs are met across all demand partners.
visual-explainer
AUCTION MECHANICS

Visualizing the Header Bid Flow

A step-by-step breakdown of the real-time auction process where multiple demand-side platforms compete for ad inventory before a webpage loads.

The header bidding flow is a client-side auction sequence initiated when a user visits a publisher's webpage. The process begins when the publisher's header wrapper—a piece of JavaScript code in the page's <head>—sends an ad request with key parameters (like ad unit size and user data) to multiple demand-side platforms (DSPs) and ad exchanges simultaneously. This parallel request, often called the bid request, allows all potential buyers to evaluate the impression at the same time, in contrast to the slower, sequential waterfall method.

Each participating buyer's platform receives the bid request and runs its own internal auction, evaluating the user against advertiser criteria and budgets. Winners return a bid response to the wrapper within a strict timeout window (typically 200-1000ms). This response contains the bid price and the creative ad code. The wrapper collects all these bids and conducts a header auction to determine the highest bidder. The winning bid's price is then often sent to the publisher's primary ad server (like Google Ad Manager) in a secondary, server-side auction via a price floor parameter to compete with guaranteed, direct-sold campaigns.

Finally, the ad server makes the ultimate decision on which ad to serve, comparing the header bid's price against its own direct deals and network bids. The winning creative is returned and rendered in the publisher's pre-designated ad slot. This entire flow, from bid request to ad render, must complete before the webpage finishes loading to avoid damaging user experience. Key technical components enabling this include prebid.js and other wrapper technologies that standardize communication between publishers and dozens of demand sources.

components
HEADER BIDDING

Core Components of a Header Bid

A header bid is a complex on-chain transaction that bundles multiple operations. These are its fundamental building blocks.

01

The Transaction Sender

The wallet address that initiates and signs the header bid. This entity pays the gas fees and is responsible for the transaction's success. The sender can be an individual user, a smart contract, or a specialized relayer service. In many systems, the sender is distinct from the ultimate beneficiary of the bid's outcome.

02

The Target Block

A specific, future block number that the header bid is attempting to influence. The bidder specifies this as a block height. The mechanics of the bid—such as its execution and settlement—are contingent on the properties of this block (e.g., its hash, timestamp, or the transactions it includes). Bids are invalid if submitted for a past block.

03

Bid Amount & Currency

The economic stake committed by the sender. This consists of:

  • Amount: The quantity of the specified token.
  • Currency/Token: The specific asset used (e.g., native ETH, a stablecoin like USDC, or a protocol's governance token). This stake is typically locked in a smart contract and is subject to slashing or redistribution based on the bid's outcome and the rules of the protocol.
04

Bid Logic (Payload)

The encoded instructions that define the bid's purpose and conditions. This is the core smart contract call data. It specifies:

  • Target Contract: The protocol or auction house address.
  • Function Call: The specific method to execute (e.g., placeBid, commitHash).
  • Parameters: Any required arguments, such as a commitment hash or a preferred validator set.
05

Gas Parameters

Settings that determine how the transaction is processed by the network. Critical for ensuring the bid is included in a timely manner. Includes:

  • Gas Limit: Maximum computational units the sender allows.
  • Max Priority Fee (Tip): Incentive for the block producer.
  • Max Fee: Absolute maximum price per gas unit the sender will pay. Failure to set these correctly can result in the bid being stuck or outbid by other transactions.
06

Settlement Conditions

The on-chain logic that determines the bid's final outcome and disbursement of funds. This is enforced by the receiving protocol's smart contract. Conditions may include:

  • Reveal Phase: Submitting hidden data after a commitment.
  • Oracle Resolution: Waiting for an external data feed.
  • Challenge Period: A time window for disputing the result. Successful bids result in reward payouts; failed or slashed bids forfeit the staked amount.
AD TECH COMPARISON

Header Bidding vs. Related Concepts

A technical comparison of header bidding with other key programmatic advertising mechanisms.

Feature / MechanismHeader BiddingWaterfall (Classic)Server-Side Bidding (SSP)

Primary Architecture

Client-side auction

Sequential server calls

Server-side auction

Auction Type

First-price or second-price

Second-price (historically)

First-price or second-price

Latency Impact

Higher (parallel client calls)

High (sequential blocking calls)

Lower (single server call)

Publisher Revenue

Typically higher

Typically lower

Comparable to header bidding

Demand Transparency

Full price transparency

Limited price transparency

Limited price transparency

Implementation Complexity

High (client-side wrapper)

Medium (ad server rules)

Medium (server integration)

Primary Control Point

Publisher's wrapper

Ad server

Supply-Side Platform (SSP)

GDPR/Privacy Compliance

More challenging (client-side data)

Easier to manage

Easier to manage

ecosystem-usage
HEADER BID

Ecosystem Implementation

Header bidding is a programmatic advertising auction mechanism where publishers offer ad inventory to multiple demand sources simultaneously before making ad server calls, maximizing yield and transparency.

02

Server-to-Server (S2S) Header Bidding

An implementation where the auction logic is moved from the user's browser to a server. This reduces page latency and avoids header bidding wrapper bloat.

  • Mechanism: The publisher's server sends a single bid request to a header bidding wrapper server, which manages the parallel auction with buyers.
  • Trade-off: Increases speed but can reduce transparency compared to client-side setups.
03

Unified Auction & First-Price Paradigm

Header bidding created a unified auction, collapsing the traditional waterfall model. All demand partners bid in a single, simultaneous auction, often under first-price rules.

  • Impact: Drives competition and price discovery, as all bids are considered equal at the time of the auction.
  • Contrasts with the legacy second-price auction model used in many ad servers.
04

Google's Open Bidding (Formerly EBDA)

Google's server-side response to header bidding, integrated into its Google Ad Manager platform. It allows selected demand partners to compete in a unified auction alongside Google's own demand.

  • How it works: Partners connect via APIs; Google's servers run the auction.
  • Publisher Benefit: Simplified integration but centralizes auction control within Google's ecosystem.
05

Header Bidding for Video & CTV

The extension of header bidding principles to video and Connected TV (CTV) inventory. Implementations are typically server-side (S2S) due to the need for VAST/VPAID tags and stricter latency requirements.

  • Challenges: Complexities with ad pods, content rights, and multiple device types.
  • Growth Driver: The rapid expansion of programmatic CTV advertising.
06

Identity Resolution & Privacy Challenges

Header bidding faces significant hurdles in a post-third-party-cookie landscape. Passing user identifiers between multiple partners in a client-side auction is becoming more difficult.

  • Solutions: Emergence of seller-defined audiences, clean rooms, and increased reliance on first-party data.
  • Impact: Accelerates the shift towards server-side and contextual buying models.
security-considerations
HEADER BID

Security and Trust Considerations

Header Bidding is a decentralized auction mechanism where multiple ad exchanges bid simultaneously for ad inventory before a webpage loads. This section details the security models, trust assumptions, and potential vulnerabilities inherent to this architecture.

01

The Trusted Execution Environment (TEE)

A Trusted Execution Environment (TEE) is a secure, isolated area within a processor that protects code and data from the main operating system. In header bidding, TEEs are used to run the auction logic, ensuring bid data remains confidential and the auction is executed fairly, free from manipulation by the publisher or other parties.

  • Key Function: Creates a secure enclave for cryptographic operations.
  • Trust Assumption: Relies on hardware security from vendors like Intel (SGX) or AMD (SEV).
  • Vulnerability: Potential side-channel attacks or TEE implementation flaws.
02

Cryptographic Commitments & Reveals

This mechanism prevents front-running and bid manipulation by separating the submission of a bid from its content reveal. Bidders first send a cryptographic commitment (a hash) of their bid. After all commitments are received, they reveal the actual bid details. The system verifies the reveal matches the commitment.

  • Purpose: Ensures bid integrity and fair ordering.
  • Process: Commit → Reveal → Verify.
  • Failure Impact: If a bidder fails to reveal, they lose their chance and may be penalized.
03

Decentralization vs. Centralized Trust

Traditional header bidding relies on a centralized ad server as a trusted auctioneer, creating a single point of failure and potential data leakage. Decentralized models distribute trust across a network of nodes or a blockchain.

  • Centralized Risk: Publisher or ad server can log, copy, or manipulate bid data.
  • Decentralized Goal: Eliminate the need to trust any single entity with sensitive bid information.
  • Challenge: Balancing latency, cost, and complexity against trust minimization.
04

Data Leakage & Privacy

A primary security concern is the unintended exposure of bid data, which contains commercially sensitive pricing information. Leakage can occur through:

  • Network Requests: Bid requests sent to multiple exchanges can be intercepted.
  • JavaScript Vulnerabilities: Malicious code on the publisher page can snoop on bid objects.
  • Post-Auction Logs: Data stored by intermediaries post-auction.

Secure models use on-device auctions or encrypted channels to minimize exposure.

05

Bid Fraud & Invalid Traffic

Header bidding systems must defend against fraudulent activities that distort auction outcomes or steal ad spend.

  • Bid Spoofing: Faking a bid request from a premium publisher.
  • Bid Shielding: Submitting a high fake bid to suppress legitimate competitors.
  • Invalid Traffic (IVT): Bots generating fake impressions to win auctions.

Mitigation involves bid request authentication, TEE-verified traffic signals, and post-auction fraud analysis.

06

Ad Quality & Malware Injection

Winning a header bid auction grants the right to load creative content (ads) onto the user's page. This introduces significant security risks:

  • Malicious Creatives: Ads containing malware, phishing links, or auto-redirects.
  • Supply Chain Attacks: Compromised ad tags from demand-side platforms (DSPs).

Publishers rely on ad verification vendors and sandboxing techniques to scan and isolate ad content before it renders, protecting end-users.

BLOCKCHAIN GLOSSARY

Common Misconceptions About Header Bids

Clarifying frequent misunderstandings about the header bidding mechanism in blockchain consensus, distinct from its use in digital advertising.

A header bid in blockchain is a mechanism where a block builder (or proposer) auctions off the right to include transactions in a block's header to specialized searchers or other builders, separate from the block body. This is a core component of proposer-builder separation (PBS) architectures, designed to decentralize block production and mitigate MEV (Maximal Extractable Value) centralization. It works by having builders compete in a first-price auction to have their block header—containing a commitment to the block's contents—selected by the validator. The winning bid's value is then paid to the validator, while the associated block body is transmitted separately for verification.

HEADER BID

Frequently Asked Questions (FAQ)

Common questions about the header bidding mechanism, its role in blockchain transaction processing, and its impact on user experience and network efficiency.

Header bidding is a mechanism in blockchain transaction processing where a user's transaction is simultaneously broadcast to multiple mempools (the waiting areas for unconfirmed transactions) across different block builders or searchers before being included in a block. This process, often facilitated by mev-geth or similar infrastructure, allows the transaction to be evaluated by a broader market of potential block producers, increasing the likelihood of inclusion and potentially securing a better execution price. It is analogous to the advertising industry practice of the same name, aiming to create a more efficient and competitive auction for transaction space.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team
Header Bid - Definition & Role in PBS Auctions | ChainScore Glossary