DEV Community

Rodion Larin
Rodion Larin

Posted on

Pricing at $100M+ Scale: Engineering Financially Safe Automation

Pricing at $100M+ Scale: Engineering Financially Safe Automation

When pricing manages 1,000,000 SKUs and 500,000 daily updates, it stops being optimization.

It becomes financial risk infrastructure.


Pricing Is Not a Feature. It’s a Financial Control Surface.

At small scale, repricing is a competitive tool.

At scale, it becomes something else entirely.

Consider a system that:

  • Manages 1,000,000+ SKUs
  • Executes ~500,000 price updates daily
  • Operates across multiple marketplaces
  • Sustains ~2000 RPS
  • Influences $100M+ in transaction volume
  • Serves 10,000+ sellers

At this point, pricing is not UI logic.

It is a financial command pipeline.

A single incorrect price can:

  • Instantly eliminate 30% margin per unit
  • Trigger high-velocity purchase cascades
  • Create $15,000–$20,000 daily exposure per seller
  • Propagate across thousands of SKUs in minutes

The core problem is not that errors happen.

The problem is propagation velocity.


Architecture Principle

The system was designed around one constraint:

Every price change must be financially survivable.

Not optimal.

Not aggressive.

Survivable.


High-Level Architecture

Event-driven microservices with strict isolation:

  • Market Data Ingestion
  • Canonical Pricing Model
  • Decision Engine
  • Independent Risk Layer
  • Execution Service
  • Post-Apply Verification
  • Audit & Observability Layer

Isolation exists at:

  • Marketplace level
  • Seller level
  • SKU level
  • Risk-tier level

Queues are not throughput tools.

They are blast-radius containment mechanisms.


The Decision Engine (And Why It’s Not Trusted)

The pricing engine calculates:

  • Target price
  • Confidence score
  • Risk classification
  • Reason code

Inputs:

  • Base price
  • Current live price
  • Competitor data
  • Inventory depth
  • Conversion trends
  • Promotions
  • Internal performance signals

But the system does not trust its own output.

Every price passes through multi-layer validation.


Two-Phase Validation Model

Phase 1: Pre-Calculation Validation

  • Data freshness checks
  • Canonical normalization
  • Null/type enforcement
  • API integrity validation

Phase 2: Pre-Send Guardrails

  • Hard min/max price bounds
  • Percentage change caps
  • Margin floor enforcement
  • Price corridor limits
  • Seller risk-tier caps

Phase 3: Post-Apply Verification

  • Marketplace confirmation match
  • Drift detection
  • Automatic anomaly flagging
  • Batch rollback capability

This reduced systemic pricing incidents from 3% to 0.1%.


Budget-at-Risk Modeling

Pricing cannot validate SKUs independently.

Exposure must be modeled across inventory and velocity.

Conceptual model:

Risk Exposure ≈ Inventory × (Cost - TargetPrice) × SellThroughVelocity
Enter fullscreen mode Exit fullscreen mode

If projected exposure exceeds per-seller thresholds:

  • Execution is blocked
  • Fallback price is applied
  • Alert is triggered
  • Manual confirmation may be required

This prevents catastrophic underpricing events.


Blast-Radius Containment Strategy

Propagation is controlled via staged execution:

  1. Low-inventory SKUs
  2. Low-risk categories
  3. Small batch validation
  4. Progressive expansion

Rollout never begins with:

  • High inventory
  • High velocity SKUs
  • Promotion-amplified categories

No pricing change is deployed without rollback ready.


Self-Healing Data Architecture

Marketplaces are volatile external systems.

Observed real-world behaviors:

  • Null → 0 field changes
  • Discount semantics changes
  • Silent contract updates
  • Stale responses
  • Undocumented behavior shifts

Mitigation mechanisms:

  • Cross-source validation
  • Data freshness scoring
  • Semantic abstraction per marketplace
  • Anomaly scoring layer
  • Dataset quarantine

Full SKU coverage improved from 80% to 100%.


AI With Guardrails (Not In Control)

ML components are advisory only.

They provide:

  • Anomaly scores
  • Competitive pattern recognition
  • Promotion effect estimation

They do not have write authority.

All AI outputs pass through:

  • Hard bounds
  • Risk-tier checks
  • Budget-at-risk validation

AI without containment in financial automation is volatility amplification.


Real Incident: API Contract Change

A marketplace changed discount removal semantics.

Old behavior:

discount = null
Enter fullscreen mode Exit fullscreen mode

New behavior:

discount = 0
Enter fullscreen mode Exit fullscreen mode

Impact:

  • ~15% sellers affected
  • Price interpretation drift
  • Potential six-figure exposure

Containment mechanisms:

  • Two-phase validation triggered anomaly
  • Risk-tier escalation
  • Fallback pricing
  • Batch rollback
  • Alerting

Financial loss was contained.

Lesson:

External API volatility must be treated as financial risk.


Measurable Transformation

Over system evolution:

  • Incident rate: 3% → 0.1%
  • Uptime: 80% → 99.9%
  • SKU coverage: 80% → 100%
  • Test coverage: 20% → 95%
  • Workers: 20 → 256
  • Sellers: 0 → 10,000+

Support load remained stable despite exponential growth.

This was not optimization.

It was resilience engineering.


Core Engineering Principles

Guardrails First, Optimization Second

If optimization conflicts with containment, containment wins.

Isolation by Default

Multi-tenant boundaries enforced at queue, risk, and execution layers.

Idempotency Everywhere

Retries must never duplicate financial commands.

Financial Simulation Before Deployment

Every strategy is tested against projected sell-through impact.

Observability Is Mandatory

Dashboards monitor:

  • Queue lag
  • API heatmaps
  • Marketplace × action × status patterns
  • Risk-tier escalation rates
  • Exposure modeling trends

Closing Thought

At small scale, pricing competes.

At large scale, pricing regulates financial risk.

When managing 1M+ SKUs and 500k daily price updates, architecture determines whether automation becomes leverage — or liability.


Author: Rodion Larin

Financial Systems Architect & Head of Pricing Automation Engineering

Top comments (0)