Grind the Spice Paste ingredients in a blender until fine. Set aside.
Heat the oil in a wok over medium heat and fry the cinnamon, cardamoms, cloves and fennel until aromatic. Add the onion and tomatoes and stir-fry until the onion turns golden brown, about 3 minutes.