Note that energy is actually sold in units of 100. So if you sold "20" units on the exchange, this is 20*100 = 2,000 energy sold. (~$5 worth) It's pretty confusing.
I don't know if this addresses your question, but if you rewrite it in complete sentences with more detail on how to reproduce the bug (how are you "losing crowns"?), one of the official tech support people might be able to look into this and see if there's a deeper underlying bug. Good luck!