Place all the ground ingredients in food processor and process into a coarse paste
Cooking on the stove:
Preheat a large skillet or wok with cooking oil. Add in the ground ingredients and stir fry for about 3 minutes. Add lemongrass, kaffir lime leaves, pandan leaves. Stir fry for about 5 minutes. It should be aromatic
Add chicken and seasonings stir to mix everything. Add in 1/2 cup of water. Bring it to a boil and then lower the heat to let it simmer until the chicken is cooked through and no longer pink, about 20-30 minutes, depending on the cut of the chicken you use. Once the chicken is cooked through, add the tomatoes and cook for another minute. Squeeze in the juice of one lime and have a taste and adjust to your taste. Turn off the heat. Stir in the lemon basil (if using) and thin strips of kaffir lime leaves
Serve immediately with plenty of white rice ;) because you gonna need it to eat that with the sauce
Cooking with Instant Pot pressure cooker:
Turn the saute mode on. When it says "hot", add cooking oil. Add in the ground ingredients and stir fry for about 3 minutes. Add lemongrass, pandan leaves, kaffir lime leaves. Stir fry for about 5 minutes. It should be aromatic. Turn off the saute mode
Add chicken and seasonings and stir to mix everything. Add about 1/4 cup of water. I know it's not a lot of water, but you don't lose much liquid when cooking with pressure cooker and the chicken will ooze out some juices too. Stir to mix everything
Close the lid and turn the steam release valve to "sealing". Set the timer to 12 minutes for drumsticks and 15 minutes for chicken thighs
When the timer is up, release the pressure immediately and add the tomatoes, kaffir lime leaves strips, squeeze of lime juice and close the lid back to let the residual heat soften the tomatoes. Uncover the lid and stir in lemon basil if using. Have a taste and adjust seasonings to your taste.