Exopolysaccharides can facilitate the attachment of nitrogen-fixing bacteria to plant roots and soil particles, which mediates a symbiotic relationship. This is important for colonization of roots and the rhizosphere, which is a key component of soil food webs and nutrient cycling in ecosystems. It also allows for successful invasion and infection of the host plant. Bacterial extracellular polymeric substances can aid in bioremediation of heavy metals as they have the capacity to adsorb metal cations, among other dissolved substances. This can be useful in the treatment of wastewater systems, as biofilms are able to bind to and remove metals such as copper, lead, nickel, and cadmium. The binding affinity and metal specificity of EPSs varies, depending on polymer composition as well as factors such as concentration and pH. In a geomicrobiological context, EPSs have been observed to affect precipitation of minerals, particularly carbonates. EPS may also bind to and trap particles in biofilm suspensions, which can restrict dispersion and element cycling. Sediment stability can be increased by EPS, as it influences cohesion, permeability, and erosion of the sediment. There is evidence that the adhesion and metal-binding ability of EPS affects mineral leaching rates in both environmental and industrial contexts. These interactions between EPS and the abiotic environment allow for EPS to have a large impact on biogeochemical cycling. Predator-prey interactions between biofilms and bacterivores, such as the soil-dwelling nematode Caenorhabditis elegans, had been extensively studied. Via the production of sticky matrix and formation of aggregates, Yersinia pestis biofilms can prevent feeding by obstructing the mouth of C. elegans. Moreover, Pseudomonas aeruginosa biofilms can impede the slithering motility of C. elegans, termed as quagmire phenotype, resulting in trapping of C. elegans within the biofilms and preventing the exploration of nematodes to feed on susceptible biofilms. This significantly reduced the ability of predator to feed and reproduce, thereby promoting the survival of biofilms.