Preheat your oven to 356ºF (180ºC) and line 18 cupcake molds with paper cases.
Beat sugar and butter until fluffy, then add eggs and vanilla extract. Fold in the cake flour, then pour in milk and mix until combined.
Divide your cupcake batter into the cases, reserving 3 tablespoons. Sprinkle salt on half of your caramel sauce, place on top of each cupcake, then use the remaining 3 tablespoons of batter to cover it. Bake for 15 to 20 minutes.
While cooling, prepare the icing. Whisk the icing sugar (added half by half) and butter until fluffy, then mix in the remaining half of your salted caramel. Pipe the frosting onto your cool cupcakes.
Sprinkle some sea salt if you want.