Preheat oven to 350°F (175°C). Grease and lightly flour a 9×13-inch metal pan, or line with parchment with overhang.
In a large bowl, whisk flour, sugar, cocoa, baking soda, and salt until combined.
In a medium saucepan over medium heat, combine cola, butter, and oil. Bring just to a gentle simmer, stirring until butter melts.
Pour the hot cola mixture over the dry ingredients. Whisk until smooth and glossy.
Add buttermilk, eggs, and vanilla. Whisk until just combined and no flour streaks remain.
Scrape batter into the prepared pan and smooth the top. Bake 30–35 minutes, or until a toothpick comes out with a few moist crumbs.
Near the end of baking, make the frosting: In a saucepan, melt butter with cocoa and cola over medium heat until just bubbling. Remove from heat; whisk in powdered sugar, vanilla, and a pinch of salt until silky. Stir in nuts if using.
While the cake is hot on a wire rack, poke a few holes with a skewer. Immediately pour the warm frosting evenly over the surface so it seeps in and sets with a glossy finish.
Cool at least 45 minutes before slicing. Serve slightly warm or at room temperature.