Your pouring water over the pellets, so the whole pot soakes the chemical in the pellets up. Gnats will die from eating that chem, & gnat larvae will hatch & die as well. I also had them nesting in the seems of the fabric on the outsides of the pot. The gnats have to eat tho. & that chem even gets soaked up by the plant, so gnat have nothing to feed on.