Let X be an algebraic variety and let f:X−−→X be a rational self-map with a fixed point q, where everything is defined over a number field K. We make some general remarks concerning the possibility of using the behaviour of f near q to produce many rational points on X. As an application, we give a simplified proof of the potential density of rational points on the variety of lines of a cubic fourfold, originally proved by Claire Voisin and the first author in 2007.