The setup for deposition was as follows. The STM tip was coupled to a bipotentiostat in a 4-electrode setup and could be switched to a pulse generator by means of a relay, as is shown schematically in Figure , and described in detail in the methods and SI-2. Importantly, a home-built low-pass filter was included to the potentiostat feedback loop, to prevent it from counteracting the applied pulse.