Today I completely reworked the bid/ask/short matching system to address the issues discovered yesterday and the result appears to be working as expected except for an integer rounding error which is proving to be very challenging to address. The problem is that all prices are 'ratios' and if you use bids or asks with a price of '3 usd/bts' then you end up with numbers like 3333.33333 and 6666.66666 which when rounded turn into 6667 and when multiplied by say 2, propagates the error resulting in 13334 rather than the expected 13333 and if you truncate it then you get 13332.

What is an extra satoshi lost or gained here and there between friends?

I am having to perform a careful audit of the code to make sure that these kinds of rounding errors are properly avoided. Isn't fixed point 128 bit math fun!