Preheat oven to 350 degrees F. Lightly grease a 9x13-inch pan or 2 9-inch round cake pans.
In a large mixing bowl, whisk together flour, sugar, cocoa powder, baking powder and baking soda. Stir in mayonnaise until well combined, then gradually stir in water and vanilla and blend until the mixture is smooth.
Pour the batter into the greased pan(s). Lightly tap a few times on the counter to release air bubbles.
Bake in the preheated oven for 30 minutes. Cool completely before frosting.
For the Chocolate Buttercream Frosting:
In the bowl of a stand mixerwith the whisk attachment, beat the butter for several minutes or until it’s light and fluffy.
Gradually add the cocoa powder and 1 cup of powdered sugar. Beat at low to medium speed until fully incorporated. Add more powdered sugar, 1 cup at a time. After the 3rd cup, stir in the vanilla, salt and a tablespoon of milk.
Taste and add more sugar, ½ cup at a time, until you are happy with the sweetness level. Add more milk, a tablespoon at a time, for a thinner consistency.