Preheat your oven to 350°F (175°C) and grease a 9x13-inch baking pan.
In a large bowl, cream together the softened butter and granulated sugar until light and fluffy, about 3-4 minutes.
Beat in the eggs one at a time, ensuring each is fully incorporated before adding the next. Stir in the vanilla extract.
In a separate bowl, whisk together the flour, cocoa powder, and salt.
Gradually add the dry ingredients to the wet mixture, stirring just until combined. Fold in the chopped pecans if using.
Pour the batter into your prepared pan and spread evenly. Bake for 30-35 minutes, or until a toothpick inserted into the center comes out with a few moist crumbs.
Remove the cake from the oven and immediately sprinkle the mini marshmallows evenly over the hot surface. Return to the oven for 2-3 minutes, just until the marshmallows begin to puff and soften but not brown.
While the cake is still warm, melt the butter in a medium saucepan over medium heat. Stir in the cocoa powder and milk until smooth.
Remove from heat and gradually whisk in the confectioners' sugar, vanilla, and salt until glossy.
Pour the warm chocolate frosting over the marshmallow layer, allowing it to partially melt the marshmallows and create that signature "muddy" appearance.
Allow the cake to cool for at least 30 minutes before serving.