What layer of the earth is responsible for earths magnetism?

the layer of the earth resposible for the earths magnetic field is the core which consists of the liquid core/outer core and the solid core/inner core. The outer core constitutes mainly of nickel, colbalt and iron. in the ouer core there are convectional currents and from physics we have that when a magnetic conductor is subjected to a veloctiy a voltage is created and this voltage leads to an electric current and this leads to a magnetic charge being generated. this leads to magnetism of the earth.