Preheat oven to 170°C fan forced. Grease and line a 20cm round cake tin with baking paper.
In a large bowl, sift together the flour, baking powder, bi-carb soda, cocoa, sugar and salt.
In a small bowl, mix together the egg replacer and water, whisking for 20 seconds to remove any lumps. Add milk, vinegar, melted margarine and vanilla, mixing well. Add dissolved coffee to this mix if using coffee.
Add wet ingredients to the dry ingredients and beat with an electric mixer on medium-high speed until light and fluffy for approx. 2 minutes.
Pour mixture into cake tin and bake in center of oven for approx. 40-45 minutes or until the top springs back when lightly touched in the middle.
Allow to cool in the pan for at least 15 minutes before transferring to a wire rack to cool completely.
For chocolate frosting: in a medium size bowl, use an electric mixer to beat the margarine until pale. Sift the cocoa powder into the sifted icing sugar and gradually add to the margarine (beating well after each addition). Add milk in small intervals and continue to mix at medium-high speed until it forms a spreadable consistency (approx. 5 minutes). Add a few more drops of milk if needed.
Spread frosting onto cake. This cake can be split in half to make a two layer cake with enough frosting to spread in the middle too.