i have 4 mollies, and 2 corys, in a 10 gallon - so i correct myself,, i guess its not foam, its just bubbles. but its like a thin layer sometimes but they do pop over time, but are like replaced with new ones - maybe just from the air pump??
i havent used any medication, and... so maybe the...