RTB Architecture
Bid shading explained: how DSPs bid in first-price auctions
Published · Last updated
Next scheduled review:
Bid shading is the step in which a demand-side platform lowers its bid in a first-price auction toward the lowest price it expects would still win. It exists because the winner of a first-price auction pays exactly what it bid. A good shading algorithm trades a little win rate for a lower price per impression.
Contents
Key facts
- Google made first price the default in 2019. Google announced a unified first-price auction for Ad Manager on 6 March 2019 (Google, 6 March 2019). It began the full rollout on 10 September 2019 and reported Ad Exchange traffic fully moved on 7 October 2019 (Google Ad Manager 2019 release notes).
- The whole market followed within a year. Researchers at Verizon Media report that first-price auctions went from about 40% of auctions in January 2019 to nearly 100% by December 2019 (Gligorijevic et al., CIKM 2020).
- Shading can cut the price paid by almost half. In production at Verizon Media's DSP, bid shading cut the price per impression to about 55% of the unshaded cost (Pan et al., AdKDD 2020).
- Prices jumped when sellers switched, then eased. A field study of publishers moving to first price found revenue per sold impression rose 25% to 70%, with the increase fading over time as bidders learned to shade (Goke et al., arXiv, October 2021).
- The protocol carries the feedback. OpenRTB 2.6 added the
${AUCTION_MIN_TO_WIN}macro so an exchange can tell each bidder the price it needed (OpenRTB 2.6, section 4.4.1).
Definition
Bid shading: the reduction a bidder applies to its valuation of an impression before bidding in a first-price auction, chosen to maximise expected surplus. Surplus is the gap between what the impression is worth to the advertiser and what the advertiser pays. See the glossary entry for bid shading.
The term is older than ad tech. The Verizon Media authors note that buyers shade in cattle auctions, US Treasury auctions and FCC spectrum auctions (Gligorijevic et al., CIKM 2020). The idea goes back to William Vickrey's 1961 auction paper, which showed that truthful bidding is optimal under second-price rules but not under sealed first-price rules (PPC Land, 23 August 2026).
Why first-price auctions made bid shading necessary
In a second-price auction, the winner pays the second-highest bid plus a small increment. If you bid $5.00 and the next bid is $2.50, you pay $2.51. Bidding your true value is the best strategy, because your bid only decides whether you win, not what you pay (Gligorijevic et al., CIKM 2020).
In a first-price auction, the winner pays its own bid. The same $5.00 bid now costs $5.00, even though $2.51 would have won. So a demand-side platform (DSP) adds a step after valuation: it estimates how high rival bids are likely to be and bids just above that. Bid too low and you lose impressions you wanted. Bid too high and you overpay. Shading is the search for the best point between the two.
Header bidding forced the change. When several exchanges compete in a publisher's wrapper, a second-price winner arrives at the ad server with a price that was lowered inside its own exchange, which distorts the final comparison. Exchanges moved to first price through 2017 and 2018, and Google's Ad Manager was the last large holdout (PPC Land, 23 August 2026). The auction flow itself is explained step by step in how real-time bidding works.
Google Ad Manager's move, 2019
8 of 8 rows
6 Mar 2019 | Google announces a unified first-price auction for Ad Manager, expected complete by the end of 2019 | |
Apr 2019 | Schedule published: 1% of Ad Exchange traffic in late May, 5% in June, all by late July | |
10 May 2019 | Google details unified pricing rules, which replace Open Auction pricing rules and apply to all partners equally | |
29 Jul 2019 | 10% of Ad Exchange traffic moves to first price | |
5 Sep 2019 | Google reports neutral to positive revenue in tests and promises buyers the minimum bid to win after each auction | |
10 Sep 2019 | Full rollout begins | |
7 Oct 2019 | Ad Exchange traffic has transitioned in full; Open Auction rules no longer available | |
16 Dec 2019 | Monitoring ends; the last 3% or less of traffic held on second price moves to first price |
6 Mar 2019
- Step
Google announces a unified first-price auction for Ad Manager, expected complete by the end of 2019
- Source
Apr 2019
- Step
Schedule published: 1% of Ad Exchange traffic in late May, 5% in June, all by late July
- Source
10 May 2019
- Step
Google details unified pricing rules, which replace Open Auction pricing rules and apply to all partners equally
- Source
29 Jul 2019
- Step
10% of Ad Exchange traffic moves to first price
- Source
5 Sep 2019
- Step
Google reports neutral to positive revenue in tests and promises buyers the minimum bid to win after each auction
- Source
10 Sep 2019
- Step
Full rollout begins
- Source
7 Oct 2019
- Step
Ad Exchange traffic has transitioned in full; Open Auction rules no longer available
- Source
16 Dec 2019
- Step
Monitoring ends; the last 3% or less of traffic held on second price moves to first price
- Source
Table by AdSovereign, CC BY 4.0.
The April schedule slipped: the release notes show 10% of traffic moving only at the end of July. The September post explains that Google extended the test period after partner feedback (Google, 5 September 2019).
The math of bid shading, with a worked example
A shading model needs two inputs. The first is the value v the DSP places on the impression, the bid it would make in a second-price auction. The second is a win-rate curve W(b): the probability that a bid b beats the highest rival bid. The win rate curve is the cumulative distribution of the highest competing bid, which is why the literature treats it as a forecast of the distribution of winning prices. The DSP then picks the bid that maximises expected surplus.
expected surplus per bid request: S(b) = (v - b) x W(b)
optimal shaded bid b*: the b that maximises S(b)
first-order condition: W(b*) = (v - b*) x W'(b*)
shading factor: b* / vTake one ad slot. The DSP values it at $4.00 CPM. Its model says rival bids follow a logistic curve centred at $3.00, the curve shape used in the win-rate method of Pan et al., so a $3.00 bid wins half the time. The table shows what happens across a million bid requests at different bids. Figures are illustrative, computed from that curve.
7 of 7 rows
$2.00 | 11.9% | 119,203 | $238 | $477 | $238 |
$2.50 | 26.9% | 268,941 | $672 | $1,076 | $403 |
$2.75 | 37.8% | 377,541 | $1,038 | $1,510 | $472 |
$3.00 | 50.0% | 500,000 | $1,500 | $2,000 | $500 |
$3.25 | 62.2% | 622,459 | $2,023 | $2,490 | $467 |
$3.50 | 73.1% | 731,059 | $2,559 | $2,924 | $366 |
$4.00 (no shading) | 88.1% | 880,797 | $3,523 | $3,523 | $0 |
$2.00
- Win rate
11.9%
- Impressions won
119,203
- Spend
$238
- Value delivered
$477
$2.50
- Win rate
26.9%
- Impressions won
268,941
- Spend
$672
- Value delivered
$1,076
$2.75
- Win rate
37.8%
- Impressions won
377,541
- Spend
$1,038
- Value delivered
$1,510
$3.00
- Win rate
50.0%
- Impressions won
500,000
- Spend
$1,500
- Value delivered
$2,000
$3.25
- Win rate
62.2%
- Impressions won
622,459
- Spend
$2,023
- Value delivered
$2,490
$3.50
- Win rate
73.1%
- Impressions won
731,059
- Spend
$2,559
- Value delivered
$2,924
$4.00 (no shading)
- Win rate
88.1%
- Impressions won
880,797
- Spend
$3,523
- Value delivered
$3,523
Table by AdSovereign, CC BY 4.0.
Bidding the full $4.00 wins the most impressions but leaves no surplus: every won impression costs exactly what it is worth. Shading to $3.00, a factor of 0.75, gives up 43% of those impressions and keeps $500 of value per million requests. The best bid is not the one that wins most often. It is the one that balances the chance of winning against the margin on each win.
The same model explains why the 2019 switch raised prices at first. In a second-price auction with this curve, a $4.00 bid wins 88.1% of the time and pays the rival's price, about $2.80 on average, for a surplus of roughly $1,056 per million requests. Under first price, even the best shaded bid earns less than half of that, unless rivals also shade and the whole curve moves left. That is what the field data show: prices jumped when publishers switched, then drifted down as bidders learned (Goke et al., arXiv, October 2021).
A minimal implementation of the grid search looks like this. Production systems replace the fixed curve with a model per segment or per request.
import math
def win_rate(bid, center=3.00, scale=0.50):
"""Logistic win-rate curve: probability that `bid` beats the highest rival bid."""
return 1 / (1 + math.exp(-(bid - center) / scale))
def best_bid(value, step=0.01):
"""Grid search for the bid that maximises expected surplus (value - bid) * win_rate(bid)."""
candidates = [round(i * step, 2) for i in range(1, int(value / step) + 1)]
return max(candidates, key=lambda b: (value - b) * win_rate(b))
print(best_bid(4.00)) # 3.0Bid shading algorithms: the main families
Published work from DSP research teams falls into six families. They differ mainly in what feedback they need from the exchange. In an open first-price auction, every bidder receives the minimum bid to win. In a closed one, losers learn nothing about the winning price (Gligorijevic et al., CIKM 2020).
6 of 6 rows
Exchange-side shading service | The exchange lowers high bids to a price that keeps the same win rate | None from the buyer | Easy for buyers who cannot shade | The exchange's yield and the buyer's surplus pull in different directions; examples include AdX Bid Translation Service, Rubicon Estimated Market Rate, AppNexus Bid Price Optimization | |
Segment-based parametric shading | A shading function per inventory segment (exchange, domain, device, layout), tuned by recursive least squares | Won and lost outcomes per segment | Simple, fast at bid time | Segments must be chosen by hand; sparse segments learn slowly | |
Winning-price distribution forecasting | The distribution of winning prices for a set of targeting attributes, often log-normal | Historical winning prices | Gives a full curve for planning and pacing | A fixed distribution shape can miss real data | |
Censored winning-price regression | The winning price, treating lost bids as censored observations | Wins, plus bid price on losses | Works when the exchange hides the winning price | Assumptions break on some real traffic, hence mixture models | |
Win-rate curve with surplus maximisation | A modified logistic win-rate curve per request, then the bid that maximises surplus | Win or loss only | No minimum-bid-to-win needed; reported 7% more profit than bidding the most likely winning price | Accuracy depends on calibration of the curve | |
Machine-learned shading on rich features | Factorization machines or deep distribution networks predicting the shading ratio or the full price distribution | Minimum bid to win (open auctions) or censored outcomes | Shares information across sparse segments; deployed at scale | Heavier models must fit a 20 ms bid budget |
Exchange-side shading service
- What it learns
The exchange lowers high bids to a price that keeps the same win rate
- Feedback needed
None from the buyer
- Strengths
Easy for buyers who cannot shade
- Limits
The exchange's yield and the buyer's surplus pull in different directions; examples include AdX Bid Translation Service, Rubicon Estimated Market Rate, AppNexus Bid Price Optimization
Segment-based parametric shading
- What it learns
A shading function per inventory segment (exchange, domain, device, layout), tuned by recursive least squares
- Feedback needed
Won and lost outcomes per segment
- Strengths
Simple, fast at bid time
- Limits
Segments must be chosen by hand; sparse segments learn slowly
Winning-price distribution forecasting
- What it learns
The distribution of winning prices for a set of targeting attributes, often log-normal
- Feedback needed
Historical winning prices
- Strengths
Gives a full curve for planning and pacing
- Limits
A fixed distribution shape can miss real data
Censored winning-price regression
- What it learns
The winning price, treating lost bids as censored observations
- Feedback needed
Wins, plus bid price on losses
- Strengths
Works when the exchange hides the winning price
- Limits
Assumptions break on some real traffic, hence mixture models
Win-rate curve with surplus maximisation
- What it learns
A modified logistic win-rate curve per request, then the bid that maximises surplus
- Feedback needed
Win or loss only
- Strengths
No minimum-bid-to-win needed; reported 7% more profit than bidding the most likely winning price
- Limits
Accuracy depends on calibration of the curve
Machine-learned shading on rich features
- What it learns
Factorization machines or deep distribution networks predicting the shading ratio or the full price distribution
- Feedback needed
Minimum bid to win (open auctions) or censored outcomes
- Strengths
Shares information across sparse segments; deployed at scale
- Limits
Heavier models must fit a 20 ms bid budget
Table by AdSovereign, CC BY 4.0.
Two newer lines of research address robustness. One treats bidding as an online learning problem against adversarial rivals and proves regret bounds (Han et al., arXiv, July 2020). Another builds a shading policy that stays sound when both the value estimate and the forecast of competing bids are noisy, tested on Yahoo DSP data (Qu et al., arXiv, October 2024).
The production numbers give a sense of scale. The factorization machine model improved total surplus by 20.54% online over the system it replaced (Gligorijevic et al., CIKM 2020). The deep distribution network raised advertiser ROI by 2.4% for CPM and CPC campaigns and 8.6% for CPA campaigns in an online A/B test (Zhou et al., KDD 2021). All of these results are from one DSP's own research team, so treat them as company-reported.
The feedback loop: what the exchange tells the bidder
Shading models learn from what comes back after each auction. OpenRTB carries three signals. The win or billing notice returns ${AUCTION_PRICE}, the clearing price. The loss notice URL (lurl) can return ${AUCTION_LOSS}, a reason code, and ${AUCTION_MIN_TO_WIN}, the price that would have tied the winner (OpenRTB 2.6, section 4.4). The loss codes that matter most for shading are 100, "Bid was Below Auction Floor", 101, "Bid was Below Deal Floor", and 102, "Lost to Higher Bid" (OpenRTB 3.0, List: Loss Reason Codes).
A bid that asks for all three looks like this:
{
"id": "bid-1",
"impid": "1",
"price": 3.0,
"nurl": "https://dsp.example/win?auction=${AUCTION_ID}&price=${AUCTION_PRICE}",
"lurl": "https://dsp.example/loss?auction=${AUCTION_ID}&reason=${AUCTION_LOSS}&min=${AUCTION_MIN_TO_WIN}",
"adomain": ["advertiser.example"],
"crid": "cr-1001"
}Exchanges decide what to fill. The spec lets them return an empty string when a bid was blocked, when price did not decide the loss, or when privacy rules forbid sharing it (OpenRTB 2.6, section 4.4.1). Google committed in September 2019 to give Authorized Buyers the minimum bid to win after each auction (Google, 5 September 2019). Field-level detail is in OpenRTB 2.6 explained.
Read the auction type before you shade. The at field says 1 for first price and 2 for second price plus, and a deal can override it, with 3 meaning a fixed deal price. Microsoft's Xandr exchange documentation says it sends at 1 for first-price auctions and also when soft floors make the outcome uncertain. It marks those auctions "Shade" and trusted second-price auctions "Don't Shade" (Microsoft Learn, Xandr bidder transparent auction FAQ, updated 21 October 2025). Shading a second-price bid lowers your win rate and saves nothing.
How to test what your DSP does
Most buyers never see the shading step. They see a bid setting and a final price. These seven steps make the behaviour visible.
- Read the setting and its default. Ask whether shading is on by default, whether it can be switched off per line item, and whether it touches deals. PPC Land reports that Display & Video 360 applies a setting called Optimized fixed bidding to fixed CPM bids by default (PPC Land, 23 August 2026).
- Get bid-level logs. You need, per auction, the submitted bid, the clearing price, win or loss, the loss reason and, where the exchange provides it, the minimum bid to win. The log-level data guide covers how to request and store these files.
- Compute the gaps. For wins, compare the clearing price with your line's maximum bid: that ratio is your effective shading factor. For losses, compare your bid with the minimum to win. Group both by exchange, domain and device.
- Run a split test. Clone one line item. Leave shading on in one copy and bid a fixed CPM with shading off in the other, with the same budget, targeting and dates. Compare win rate, average CPM and cost per outcome over at least two weeks.
- Check the fee base. Find out whether the DSP's percentage fee is charged on the shaded media cost or on the pre-shading bid, and whether shading appears as a separate line on the invoice. Fee structures are compared in DSP pricing explained.
- Check fixed-price deals. On a deal with
at3 the price is agreed, so there is nothing to shade. On first-price deals the deal floor is the lower bound for any shaded bid. - Watch the auction type per exchange. If shading is applied where
atis 2, the DSP is giving up impressions for no saving.
A log row that supports steps two to four can be as small as this. The field names are illustrative, not a vendor format.
{
"auction_id": "b7e1c0a2-5f3d-4e8a-9c41-2d6f8a0b9e17",
"exchange": "exchange-beta.example",
"auction_type": 1,
"floor_cpm": 0.85,
"max_bid_cpm": 4.0,
"submitted_bid_cpm": 3.0,
"won": true,
"clearing_price_cpm": 3.0,
"min_to_win_cpm": 2.61,
"loss_reason": null
}How publishers respond: floors
Shading shifts value from sellers to buyers, so publishers answer with floor prices. Google told publishers in May 2019 that floor tactics built to lift second-price clearing prices would no longer be relevant. Floors should reflect the true value of the inventory instead. Its unified pricing rules apply to all partners equally and cannot be set per buying platform (Google, 10 May 2019).
In OpenRTB 2.6, a seller can state floors in three places: imp.bidfloor, the video or audio object (mincpmpersec or durfloors), and the deal. Buyers read the deal floor first, then the media floor, then the impression floor (OpenRTB implementation guide, section 7.11). In header bidding, the Prebid Price Floors Module lets a publisher set static floors or fetch dynamic ones from a data service, and Prebid Server supports the same rule schema (Prebid.org, Price Floors Module).
Floors and shading models now train against each other. A floor above a DSP's shaded bid produces loss code 100, which teaches the model where the floor sits. A floor set too high cuts fill. The strategy for setting floors in first-price auctions, including dynamic floors and how to test them, is the subject of floor price strategy.
Bid shading is not bid caching, a discount or bid deflation
Several practices lower a price without being shading. Bid caching reuses a losing bid in a later auction.
A negotiated discount is applied by the seller to the clearing price; since release 2.6-202606, OpenRTB reports it through ${AUCTION_DISCOUNT_PCT} and ${AUCTION_DISCOUNT_CPM} (2.6-202606 release notes, 11 June 2026). Bid deflation by an intermediary is a different matter again.
Teads' August 2026 lawsuit against Google alleges that a program called Project Poirot reduced Display & Video 360 bids into non-Google exchanges (PPC Land, 23 August 2026). That is a claim in pending litigation, not a finding. Shading, by contrast, is done by or for the buyer to keep surplus on the buyer's side.
Common mistakes
- Shading second-price auctions. Check
aton the request and on each deal. Shading where the auction already prices you at the runner-up only loses impressions. - Training only on wins. Won auctions show what you paid, not what you needed to pay. Without loss outcomes the model learns a biased curve (Wu et al., KDD 2015).
- Treating an empty
${AUCTION_MIN_TO_WIN}as zero. An empty value means the exchange chose not to disclose it. Drop the row from training or treat it as censored. - One curve for all inventory. Rival bids differ widely by page, user and exchange. The Verizon Media team shows four segments with very different winning-price distributions (Gligorijevic et al., CIKM 2020).
- Ignoring floors. A shaded bid below
bidfloorcannot win. Clip the shaded bid at the floor, or drop the bid if the floor exceeds the value. - Shading fixed-price deals. If
atis 3 the floor is the agreed price; bidding below it simply loses the deal. - Letting pacing and shading fight. Both adjust the same final number. If the budget pacer raises bids while the shader lowers them, neither works as tested. Apply them in a fixed order and log both factors.
- Judging shading by CPM alone. Lower CPMs with a collapsing win rate can raise cost per outcome. Measure surplus or cost per action, not price.
The RTB architecture hub links the related engineering pages on bidders, latency and OpenRTB.
FAQ
What is bid shading in programmatic advertising?
Is bid shading good or bad for advertisers?
Does bid shading hurt publishers?
Can I turn bid shading off?
What data does a bid shading algorithm need?
How this works on owned infrastructure
Every shading model on this page runs on two private inputs: your valuation of each impression and the full record of your wins and losses. When the bidder is rented, both stay inside the vendor's system, and you see only a final price. AdSovereign is an enterprise RTB stack (DSP, SSP, exchange, DMP and clean room) that you run on your own infrastructure. Whatever shading logic the bidder runs, its training logs and the pre-shading bid stay on infrastructure you control, so the split test above runs on your own data. The architecture page shows where the bidder and its logs sit, and use cases describes the in-house buying teams this fits.
Sources
- Google, "Simplifying programmatic: first price auctions for Google Ad Manager" (6 March 2019). https://blog.google/products/admanager/simplifying-programmatic-first-price-auctions-google-ad-manager/
- Google, "An update on first price auctions for Google Ad Manager" (10 May 2019). https://blog.google/products/admanager/update-first-price-auctions-google-ad-manager/
- Google, "Rolling out first price auctions to Google Ad Manager partners" (5 September 2019). https://www.blog.google/products/admanager/rolling-out-first-price-auctions-google-ad-manager-partners/
- Google Ad Manager Help, "2019 Google Ad Manager releases archive" (accessed 9 November 2026). https://support.google.com/admanager/answer/9197913?hl=en
- PPC Land, "Google moves all auctions to first price by late July" (19 April 2019). https://ppc.land/google-moves-all-auctions-to-first-price-by-late-july/
- D. Gligorijevic, T. Zhou, B. Shetty, B. Kitts, S. Pan, J. Pan, A. Flores, "Bid Shading in The Brave New World of First-Price Auctions", CIKM 2020 (arXiv, 2 September 2020). https://arxiv.org/abs/2009.01360
- S. Pan, B. Kitts, T. Zhou et al., "Bid Shading by Win-Rate Estimation and Surplus Maximization", AdKDD 2020 (arXiv, 19 September 2020). https://arxiv.org/abs/2009.09259
- T. Zhou, H. He, S. Pan et al., "An Efficient Deep Distribution Network for Bid Shading in First-Price Auctions", KDD 2021 (arXiv, 12 July 2021). https://arxiv.org/abs/2107.06650
- Y. Han, Z. Zhou, A. Flores, E. Ordentlich, T. Weissman, "Learning to Bid Optimally and Efficiently in Adversarial First-price Auctions" (arXiv, 9 July 2020). https://arxiv.org/abs/2007.04568
- Y. Qu, R. Kant, Y. Chen et al., "Double Distributionally Robust Bid Shading for First Price Auctions" (arXiv, 18 October 2024). https://arxiv.org/abs/2410.14864
More sources (10)
- S. Goke, G. Y. Weintraub, R. Mastromonaco, S. Seljan, "Bidders' Responses to Auction Format Change in Internet Display Advertising Auctions" (arXiv, 20 October 2021, v4). https://arxiv.org/abs/2110.13814
- Y. Cui, R. Zhang, W. Li, J. Mao, "Bid landscape forecasting in online ad exchange marketplace", KDD 2011. https://doi.org/10.1145/2020408.2020454
- W. C.-H. Wu, M.-Y. Yeh, M.-S. Chen, "Predicting winning price in real time bidding with censored data", KDD 2015. https://doi.org/10.1145/2783258.2783276
- IAB Tech Lab, OpenRTB 2.6 specification, sections 4.4 and 4.4.1 (accessed 9 November 2026). https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/main/2.6.md
- IAB Tech Lab, OpenRTB 2.x implementation guide, sections 7.11 and 7.16 (accessed 9 November 2026). https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/main/implementation.md
- IAB Tech Lab, OpenRTB 3.0 specification, List: Loss Reason Codes. https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/OpenRTB%20v3.0%20FINAL.md
- IAB Tech Lab, openrtb2.x release 2.6-202606 (11 June 2026). https://github.com/InteractiveAdvertisingBureau/openrtb2.x/releases/tag/2.6-202606
- Microsoft Learn, "Bidder transparent auction FAQ" (Xandr documentation, updated 21 October 2025). https://learn.microsoft.com/en-us/xandr/bidders/bidder-transparent-auction-faq
- Prebid.org, "Module: Price Floors" (accessed 9 November 2026). https://docs.prebid.org/dev-docs/modules/floors.html
- PPC Land, "Explaining bid shading" (23 August 2026). https://ppc.land/bid-shading/