Decomposition and oxidation of pyrite