The two-layer creation is also called "chocoflan."

Credit: Grace Elkus

In our opinion, the best (and tastiest) kind of science is the science of baking. Cookies won’t puff up, for example, without the addition of baking soda, which releases carbon dioxide in the form of bubbles when heated. Gently folding dry ingredients into wet reduces gluten formation, and therefore lessens the likelihood of a tough, heavy cake. The list goes on.

If the chemical reactions in a recipe create a particularly surprising result, the dish will often be described as “magical” or in this case, “impossible!” which, we’ll admit, is a very catchy way of interesting us in a science experiment. We couldn’t resist giving the 3-layer magic cake a go, and it turned out to be one of our most popular recipes to date.

Next up? The “impossible cake" (watch us make it here) also known as chocoflan. What makes it impossible, is that the two layers—chocolate cake and flan—reverse in the oven, making for a gorgeous, but startling, presentation. We had to know: What’s going on here?

We’ll start with the recipe, then the science. Preheat your oven to 350°F and generously butter a Bundt, tube, or angel food cake pan (cooking spray will work as well). Use a large spoon to drizzle caramel sauce into the bottom of the pan. Next, you’ll need to make a batch of chocolate cake. We used a box cake mix, but feel free to use your favorite chocolate cake recipe that yields two 8 or 9-inch round cake layers. Pour the batter into the pan and set aside. Now, make the flan (we adapted ours from this recipe). In a blender, combine one 12-oz can evaporated milk, one 14-oz can sweetened condensed milk, 4 ounces room temperature full-fat cream cheese, 3 large eggs, and 1 tablespoon pure vanilla extract. Blend until combined, about 30 seconds. Pour this mixture on top of the cake batter. Some will begin to seep in, and it will look like the two batters are mixing. This is okay.

Cover the pan with foil and place in a large roasting pan. Pour hot water into the roasting pan until it comes about 1/2 of the way up the sides of the Bundt pan (boiling water works too—we tried both ways and found it didn’t make much of a difference how hot the water was). Start checking on your cake about an hour and 15 minutes into the baking time until a toothpick comes out clean, or with a few crumbs clinging to it (but no wet batter). The baking time may vary based on the size and color of your pan (darker pans will bake faster), the temperature of your water bath, etc. Don't be alarmed if it takes a full two hours to cook.

When the cake is done, remove the roasting pan from the oven, remove the Bundt from the water bath, remove the foil, and let cool at room temperature until it is no longer warm to the touch. Transfer to the refrigerator for at least one hour. When ready to serve, run a knife around the edge of the cake, place a serving platter over the pan, and flip! If all goes as planned, you’ll have just released a gorgeous two-layer dessert, with a layer of moist chocolate cake on the bottom and a caramel-topped flan on top. Top with another drizzle of caramel sauce and a sprinkling of chopped nuts.

Now, for the science. Similar to the magic cake, the layers separate in the oven due to their differing weights. The heavier, custard-y flan batter sinks to the bottom of the pan, while the fluffy, air-filled cake batter rises to the top. The water bath keeps the direct oven heat from curdling the flan, and adequate time in the refrigerator ensures it sets up before slicing. Ultimately, it's the best kind of recipe: an impressive party trick and utterly delicious, too.