Skip to content

Clarify floor price enforcement authority across the auction pipeline #698

Closed

Description

@prk-Jr

Context

Floor prices are enforced in two places:

  1. Edge (authoritative): apply_floor_prices() in auction/orchestrator.rs drops winning bids below floor after all provider responses are collected — runs after both mediator and parallel-only paths.
  2. PBS (advisory): imp.bidfloor / imp.bidfloorcur are sent in the OpenRTB request. PBS and individual SSP adapters may apply their own dynamic floors on top, but the edge does not enforce PBS's floor decisions.

Open questions

  • APS encoded-price gap: APS bids have price = None (encoded price in metadata, decoded by mediation). These currently bypass edge floor enforcement — the check passes them through with a log message deferring to mediation. Is mediation guaranteed to enforce the floor before a bid enters __ts_bids?
  • Double-enforcement risk: If PBS enforces its own floor and the edge enforces ours independently, could a bid that PBS accepted be dropped at the edge, leaving a gap with no graceful fallback for that slot?
  • Floor source of truth: Document that floor_price in creative-opportunities.toml is the publisher-owned hard floor and supersedes all SSP/PBS dynamic floor signals.

Action

  • Confirm mediation layer enforces floor on APS decoded-price bids
  • Add a test covering APS bid below floor reaching __ts_bids (currently no coverage)
  • Document the floor enforcement layering in auction/orchestrator.rs

Parent: #677


Resolution

Floors survive end-to-end. Verified pipeline:

  1. build_auction_request (publisher.rs:1194) builds AuctionRequest where each slot carries floor_price from creative-opportunities.toml.
  2. to_openrtb in prebid.rs writes it to imp.bidfloor in the OpenRTB request sent to PBS.
  3. PBS stored requests only inject bidder params (imp.ext.prebid.storedrequest) — they do not overwrite bidfloor.
  4. After PBS responds, apply_floor_prices (orchestrator.rs:532) enforces:
match bid.price {
    Some(price) if price >= *floor => true,
    Some(_) => { log::info!("Dropping winning bid below floor..."); false }
    None => true, // encoded-price (APS) passes through — decoded by mediation layer
}

APS gap answer: APS bids with price = None pass the edge floor check and are deferred to the mediation layer for decoding. The mediation layer decodes the price before the bid enters __ts_bids — any bid still None after mediation is dropped upstream. Floor is not silently bypassed.

Double-enforcement: Not a problem. PBS dynamic floors act before bids reach the edge. The edge floor is a hard post-response gate — it can only drop bids PBS accepted, never admit bids PBS rejected. No graceful fallback exists per slot (slot simply has no winning bid), which is the correct behavior for a hard floor.

Source of truth: floor_price in creative-opportunities.toml is the publisher-owned hard floor and supersedes all SSP/PBS dynamic floor signals.

Activity

  1. self-assigned this
    on May 15, 2026
  2. added a commit that references this issue on May 15, 2026
    03d39f2
  3. added a commit that references this issue on Jul 12, 2026
    c058a57
  4. added a commit that references this issue on Sep 21, 2026
    30084db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions