You can deal on an order of 5 of a resource for 0.001. This is because utils.roundCredits does not round up due to usage of toFixed. Deal cost is calculated correctly (except on subscription tokens, see below).
There are several unnecessary utils.roundCredits when calculating the deal cost. This is because you are already rounding up the value prior to passing it into utils.roundCredits.
Orders on subscription tokens are rounded, not rounded up, because this is the only place the dealCost was NOT rounded up prior to sending it into utils.roundCredits.
I'd PR these, but I do not know what your intentions are for these (and the last time I tried to post something about a bug to the repo, I got yelled at ) so I'll let you handle them.
I can tell that this change has been a big improvement for my script. I have had no hard resets since this change over the last 3 hours. My performance-throttling code is now working as expected to avoid them.