The factors which affect corrosion are:
1. More the reactivity of the metal, more will be the possibility of the metal getting corroded.
2. Presence of carbon dioxide in natural water increases rusting of iron.
3. When the iron surface is coated with layers of metals more active than iron, then the rate of corrosion is retarded.
4. A rise in temperature (within a reasonable limit) increases the rate of corrosion.