Roast the sweet potatoes on a baking sheet at 400°F (200°C) for about 45 minutes until soft and fragrant. Once cooled, scoop out the flesh and mash until smooth. This creates a rich, moist base for the batter.
In a large mixing bowl, combine the mashed sweet potatoes with melted butter and whisk until smooth and slightly glossy. This helps incorporate the ingredients evenly and relaxes the batter.
Add the eggs one at a time to the bowl, whisking thoroughly after each addition. The mixture should become thick, smooth, and slightly fluffy as the eggs are integrated.
Sift the cocoa powder, flour, baking powder, and salt together into a separate bowl. Sifting helps prevent lumps and ensures an even distribution of dry ingredients.
Gently fold the dry ingredients into the wet mixture using a spatula, mixing just until combined. Be careful not to overmix; the batter should be thick but moist.
Spoon the batter into cupcake liners or greased molds, filling each about two-thirds full to allow room for rising. Smooth the tops slightly with the back of a spoon or spatula.
Bake the cupcakes in a preheated oven at 350°F (175°C) for 20–25 minutes, or until the tops are set and a toothpick inserted in the center comes out clean. The cupcakes will be rich, fudgy, and slightly crackled on top.
Remove the cupcakes from the oven and let them cool in the pan for 10 minutes. Then transfer them to a cooling rack to cool completely before serving. They will have a moist, velvety crumb and a subtle roasted aroma.
Enjoy the cupcakes at room temperature or chilled, appreciating their rich, fudgy texture and deep chocolate flavor enhanced by the earthy sweetness of roasted sweet potatoes.