Mix tomato paste and apple cider vinegar in a small bowl and set aside. In another small bowl, add cumin, oregano, salt, pepper, chile powder, and cocoa powder. Put a small pot over low heat, and add the stock or water, keeping it warm.
In a medium-sized pot add the olive oil, and place over medium heat. Add in the onions, and cook until translucent, about 7 minutes. Add in garlic, and cook a minute more, until fragrant. Add in the spices, cook for a few seconds, and then add in the tomato paste mixture. After everything is thoroughly mixed up to this point, add in the flour and cook a minute more. Using a ladle, add the stock to the mixture, one spoon at a time, mixing well after each addition. A whisk helps remove any clumps as you go, and is my tool of choice here. After about 3 ladles of stock, you can add the rest of the liquid in all at once, continuing to whisk until you have a smooth sauce. Add the bay leaf, turn the heat to low, and simmer for 15 minutes.
Use immediately, or store in an air-tight container for 3-4 days.