Condensing the core idea of those classical results, we introduce the concept of affine boundedness for an arbitrary universal algebra and show that for an affinely bounded topological algebra over a compact signature profiniteness is equivalent to the underlying topological space being a Stone space. Since groups, semigroups, rings, and distributive lattices are indeed affinely bounded algebras over finite signatures, all these known cases arise as special instances of our result. Furthermore, we present some additional applications concerning topological semirings and their modules, as well as distributive associative algebras. We also deduce that any affinely bounded simple compact algebra over a compact signature is either connected or finite. Towards proving the main result, we also establish that any topological algebra is profinite if and only if its underlying space is a Stone space and its translation monoid is equicontinuous.