One problem that has happened few times to me is that in Treasure Cave somebody attacks me, and I am the winner (I saw the replay), but nevertheless it says the opponent won and well, I lose gold and diamonds. Don't know why that happens. I'm on server 237 if that helps.
Also, since the before last update, when I use up all my ability points, when I click the last point remaining, it prompts a pop-up that I don't have anymore points left and the level points return to before I started upgrading them and the money is lost until I restart the game. Not a big deal, but annoying sometimes.
Never faced the first issue with the treasure cave. Did the battle timeout? Then the attacker will win because both teams will die (like in CoF). Other possible reason could be a broken replay. I'm sure the team will have a look over it.
Regarding the ability points - this often occurs under unstable network connections. You're on wifi or mobile data when it occurs?