Dynamic Pricing Engine Hero

Engineering / Commodity Logistics

Dynamic Pricing Engine

650+ Formula Calculations at Scale for Mining & Commodities.

Objective

Transform traditional, fragile Excel spreadsheets with over 650 complex mathematical formulas into a robust, centralized web application.

Outcome

A high-performance pricing logic engine capable of executing concurrent multi-variable formulas with a user-customizable interface and real-time analytical depth.

The Fragility of Scale

Mining operations rely on hyper-specific pricing formulas that fluctuate based on purity, weight, global index shifts, and logistics surcharges. For years, these resided in legacy spreadsheets that were prone to human error and lacked version control.

Our mission was to centralize this logic into an asynchronous execution environment where formulas could be updated via a GUI without code deployment, while maintaining sub-millisecond calculation speeds for analytical querying.

Core Architecture

Framework
Laravel 10
Runtime
PHP 8.1
Async Engine
amphp/amp
Primary DB
PostgreSQL

Infrastructure

Message Broker
RabbitMQ
In-Memory Cache
Redis
Audit Logging
Laravel Auditing
Formula Parser
Symfony Expr.

The Evaluation Pipeline

01

Ingestion

Real-time market indices and commodity purity levels are ingested via RabbitMQ workers.

02

Parsing

Symfony Expression Language evaluates complex formula nodes safely within an asynchronous PHP pool.

03

Aggregation

Calculated metrics are aggregated into PostgreSQL for high-speed analytical dashboarding.

System Capabilities

bolt

Async Evaluation

Parallel processing of 650+ mathematical formulas using amphp, reducing calculation time from minutes to milliseconds.

edit_square

Formula Builder

A bespoke UI allowing engineers to construct complex logic using a library of predefined nodes and variables.

dashboard

Analytics Dashboard

Leveraging PostgreSQL for fast analytical queries across millions of historical pricing points.