Beginner · 25 min · 4 steps

Paying delivery riders the right amount in rainy-day surge pricing

Ananya Rao, Compensation Systems Engineer at QuickBite

Ananya Rao is an engineer at QuickBite, a food delivery app that works in 40 Indian cities. It is 9:45 AM on Friday. The VP of driver operations has called a quick meeting with the finance engineers.

The question

How do we work out each rider's pay correctly when there is a surge bonus and a customer tip, so that the tip is not multiplied by mistake?

  • Datetime arithmetic
  • Dynamic pricing logic
  • Floating point precision
  • Function modularization

The rest of this case study is locked

The data, every step with its code and result, and the final answer open with a pass. A few case studies stay free so you can see how they work.