I was trophy pushing one time, and i was so close to Crystal 2 and i saved up so many gems that i decided to gem my barracks, i had one attack and then i trained some more troops with gemmed barracks, i turned off my phone and went back on back in 15 mins and there was a maintenance break. I lost all those gems for one batch of troops. My idea is however long the Maintenance goes for , that time is added to the boost.
