A new theory of high-temperature superconductivity in cuprates