PREPARE OVEN: Preheat the oven to 350°F. Grease a 9 by 13-inch baking pan with butter or nonstick spray.
MIX BATTER: In a large mixing bowl, add 1 box chocolate cake mix, 1 box chocolate instant pudding mix, 3 large eggs, ¾ cup vegetable oil, and 1 cup Dr Pepper. Mix until smooth and fully combined, scraping down the sides as needed.
BAKE: Pour the batter into the prepared pan and spread evenly. Bake for 35 to 40 minutes, until a toothpick inserted in the center comes out clean.
MAKE FROSTING: While the cake bakes, add ½ cup salted butter to a medium saucepan and melt over medium heat. Whisk in 2 ½ cups powdered sugar, ⅓ cup Dr Pepper, ½ cup cocoa powder, and 1 teaspoon pure vanilla extract until smooth.
BOIL: Continue whisking and bring the frosting to a gentle boil. Reduce heat slightly and boil for 1 minute, stirring constantly, until glossy and slightly thickened.
COOL FROSTING: Remove the saucepan from the heat and let the frosting cool for 20 to 25 minutes. It should be warm but pourable.
FROST CAKE: Pour the warm frosting evenly over the warm cake. Spread gently if needed. Let the cake rest for at least 30 minutes, until the frosting sets before slicing.
Notes
Make-Ahead: This cake can be baked up to 1 day ahead. Frost just before serving or within a few hours for the best texture.Storage: Cover tightly and store at room temperature for up to 2 days or refrigerate for up to 5 days.Reheating: Serve at room temperature. For warm slices, microwave individual pieces for 10 to 15 seconds.Freezing: Freeze unfrosted cake tightly wrapped for up to 3 months. Thaw completely, then frost.