Residually finite group

For example the Baumslag–Solitar group B(2,3) is not Hopfian, and therefore not residually finite.

Every group G may be made into a topological group by taking as a basis of open neighbourhoods of the identity, the collection of all normal subgroups of finite index in G. The resulting topology is called the profinite topology on G. A group is residually finite if, and only if, its profinite topology is Hausdorff.

A group whose cyclic subgroups are closed in the profinite topology is said to be

Groups each of whose finitely generated subgroups are closed in the profinite topology are called subgroup separable (also LERF, for locally extended residually finite).

One question is: what are the properties of a variety all of whose groups are residually finite?