Preheat the oven to 180°/160°C fan/350°F/gas mark 4. Grease and line two 20 cm/8 in round cake tins.
Sift together the flour, cocoa powder, baking powder and bicarbonate of soda in a large bowl.
Add the brown sugar, oil, treacle and hot milk and stir with a balloon whisk until smooth.
Divide the batter between the prepared tins and bake for 25-30 minutes until a skewer inserted into the centre comes out clean.
Allow the cakes to cool in the tins for 20 minutes then carefully turn them out onto a wire rack and allow to cool completely.
To make the frosting, place the cornflour in a medium saucepan and gradually whisk in the cold milk, making sure that there are no lumps. Whisk in the cocoa pwder, dark brown sugar and treacle.
Place the pan over a medium-low heat and whisk constantly until it comes to a boil and thickens.
Remove the pan from the heat and add the chopped chocolate, butter and vanilla extract. Stir until melted and smooth. You may find that when you add the chocolate and butter to the frosting it splits and becomes greasy looking. If this happens, simply whisk in a splash of boiling hot water and it will come back together.
Allow the frosting to cool to barely warm and thick enough to spread.
Place one of the cake layers on a serving plate and spread over about a third of the frosting. Place the other cake layer on top and use a palette knife to spread the rest of the frosting over the top and sides of the cake. Use the palette knife to give it a swirly appearance.
Store the cake in an airtight container at cool room temperature or in the fridge.