Magnetars are highly magnetized neutron stars that can produce X-ray and soft gamma-ray emissions and that have a dipole of $10^{14}$ G to $10^{15}$ G. A promising mechanism for explaining magnetar formation is magnetic field amplification by the MRI in fast-rotating protoneutron stars (PNS). This scenario is supported by recent global models, which showed that small-scale turbulence can generate a dipole with magnetar-like intensity. However, the impact of buoyancy and density stratification on the efficiency of the MRI in generating a dipole is still unknown. We assess the impact of the density and entropy profiles on the MRI dynamo in a global model of a fast-rotating PNS, which focuses on its outer stratified region that is stable to co...