1. For making spice paste - in a blender put all the ingredients and blend until smooth.
2. In a pan, heat oil and saute onions, garlic, ginger and chillies. Keep aside.
3. In a skillet, heat oil and add the spice paste. Add chicken, potatoes, salt and soy sauce and stir well.
4. Add sugar,vinegar and water. Bring to a boil and leave to simmer for 30 minutes. Keep stirring at regular intervals.
5. Add sauteed onion, garlic and ginger to the chicken.