Corrosion and rancidity are two types of chemical reactions. Corrosion is the deterioration of materials, like metals, due to reaction with their environment such as oxygen, water and acid. Rancidity is the process where oils and fats break down into smaller molecules over time due to oxidation, which causes them to take on unpleasant odors and flavors. Both corrosion and rancidity are examples of oxidation reactions, where substances react with oxygen in their surroundings.