An original study of nanofluid viscosity is proposed. The carrier fluid is assumed Newtonian but the two-phase nanofluid displays properties typical of a generalized Maxwell constitutive law. Our approach is based on an extension of Einstein's model describing suspensions of solid particles in fluids by the introduction of the following elements: presence of a layer around the nanoparticles and a thermodynamic description of the role of size effects. The theoretical formalism is applied to liquid argon with lithium nanoparticles and to alumina nanoparticles in water. Good agreement with experimental data and molecular dynamics simulation is observed.