Preheat the oven to 350°F (180°C) and line a 5 inches (12 cm) round baking mold with parchment paper or grease it with oil.
In a large bowl, mash the bananas.
Add egg, cocoa powder, oat flour or almond flour, baking powder, a pinch of salt and vanilla extract, if using it.
With the help of a fork or spatula, mix to combine until the batter is smooth and free of lumps.
Transfer the mixture to your prepared baking mold, spreading it out evenly.
Bake in the middle rack of a hot oven for 25-35 minutes, or until the cake has set and is cooked inside. To check for doneness, insert a toothpick into the center–it should come out clean with just a few crumbles.
Let cool, then serve immediately or top it with sugar-free frosting.