Heat the oil in a pan and add the onions, ginger and garlic pastes. Over medium heat, sautxe9 until the raw smell of garlic disappears and the mixture starts turning brown. Reduce the heat slightly and add the turmeric, cumin, coriander and chilli powders. Stir frequently and let the mixture cook until the oil starts appearing on the side. Make sure the spices do not burn.