All finances count on the server, otherwise your program will be easy to cheat. To protect themselves from absolutely children's errors, implement financial logic of a single object, ideally even on a third-party engine, for example on the procedures in the database (this is the most logical place) to the atomicity and consistency of the data answered reliable database engine.
If you need to the balance of the user dependent on time out of the game user, or, track time and entry and exit, and each entrance, adjust the balances from time and a different logic or method that returns current balance, make a formula that will calculate each time by your logic, how much must be added to the saved balance constant time, since the creation of the game user. Grubo speaking you will have not one currency but two/a few, but under the hood, when calculating the final balance, you simply add up the available currencies what are virtual - i.e. which have no current balance and it is calculated from time or something, but what is the only number in the database.