if your batter has a high liquid content, shrinking will occur after baking. the liquid produces a lot of steam. this steam puffs up the cupcake, but will evaporate after baking and your cupcakes will shrink. most amazing chocolate cupcake recipes call for boiling water, which is totally fine.