How Inflation Broke Our DECIMAL Price Fields

Photo by Kevin Ache, Unsplash.
A small database decision once caused us a big headache. In one of our projects, we stored prices in the database using DECIMAL fields. It felt like the right choice. We wanted accuracy. We wanted clean financial data. Everything looked fine until inflation hit us hard.
Because of the high inflation in the Iranian currency, numbers grew very quickly. Prices ended up much higher than we had planned. One day, we saw errors. Some values could not be saved. Some calculations failed. Not because of destructive code. Just because the numbers were now too big.
That was the moment we learned something important.
Technical decisions do not live only in code. They live in real economies and real life.
For us, DECIMAL was no longer enough.
We had to change our price fields to BIGINT and store values in the smallest unit. It was not just a database change. It was a reminder that software must grow with the world around it.
Sometimes scaling is not about users or traffic. Sometimes scaling is about money losing its value. And sometimes, a simple database type tells the story of an entire economy.
Lesson learned: design systems that can survive extreme realities, not only normal ones.