qodebase logoqodebase
← All tracks

Unit 5 — the metered meter, demand-based surge, and stable pricing

Fare Estimation & Pricing

The rider sees one number before they tap Confirm: the price. Get it right and they ride; get it wrong — quote 12,charge12, charge 19 — and you lose them. That number is built directly on the distance and ETA from Units 1 and 4, then bent by the live balance of supply and demand.

This unit builds upfront pricing piece by piece — the metered meter, the surge multiplier that clears the market, the smoothing and hysteresis that keep it from flickering — and you implement each one, check it with python test.py, and unlock the next with a deterministic checkpoint.