Pour 3/4 cup water and all of the vinegar into a saucepan and bring to a boil over medium-high heat. (Remaining water will be used later to mix with the cornstarch.)
Stir in sugar, ginger, garlic, and ketchup; simmer for 5 minutes.
Stir sambal oelek or chile peppers into the sauce.
Mix cornstarch and remaining 1/4 cup water until they form a slurry. Add this to the saucepan a little at a time until the sauce is the thickness you desire. (We use all of it so that the finished sauce is like a dip, but if you want a sauce you can pour, you would use less.) Stir until blended.
Pour sauce into a bowl. Cover and refrigerate until needed, at least an hour.