Preheat oven to 350°F (175°C). Grease a 9x13-inch baking dish.
In a large bowl, mix melted butter, sugar, and eggs until well combined.
In a separate bowl, whisk together flour, cocoa powder, baking powder, and salt.
Gradually add the dry ingredients to the wet ingredients, stirring until smooth.
Mix in vanilla extract and pecans (if using).
Pour batter into the prepared baking dish and bake for 30-35 minutes, or until a toothpick inserted in the center comes out clean.
Immediately sprinkle mini marshmallows over the hot cake and return to the oven for 3-5 minutes until marshmallows are slightly melted.
In a saucepan over medium heat, melt butter for frosting. Stir in cocoa powder and milk, then bring to a slight boil.
Remove from heat and stir in vanilla extract and powdered sugar until smooth.
Drizzle warm frosting over the marshmallow layer and allow it to set before serving.