Hilariously, this gets stuck buying "Stuff" over and over and doesn't seem to ever complete the game
I don't think it does.
Here's the relevant part of the (dart2js'd but slightly cleaned-up) code:
https://gist.github.com/CyberShadow/11329584
Edit: I made a full graph of the entire game: https://news.ycombinator.com/item?id=7652770
Also, I noticed that something compounded to solve if you had more of them, notably stress. When you only had 1, it was instantaneous to solve. If you had more than one, the percent counter took time