Mantle–slab interaction and redox mechanism of diamond formation