In electrowinning, an electrical current is passed from an inert anode (oxidation) through a "leach" solution containing the dissolved metal ions so that the metal is recovered as it is deposited in an electroplating process onto the cathode (reduction). In electrorefining, the anode consists of the impure metal (e.g., copper) to be refined. The impure metallic anode is oxidized and the metal dissolves into solution. The metal ions migrate through the acidic electrolyte towards the cathode where the pure metal is deposited. Insoluble solid impurities sedimenting below the anode often contain valuable rare elements such as gold, silver, selenium... .