Electrolysis of dimethyl alkylidenemalonates RCH = C(COOMe) 2 (R = n-Alk, Ph) in an undivided cell in MeOH in the presence of alkali metal halide as mediator, leads to the formation of cyclic dimers, i.e., 3,4-disubstituted 1,1,2,2-cyclobutanetetracarboxylates. The reaction proceeds via the reductive coupling of two substrate molecules at cathode and the cyclization of a hydrodimer dianion by its interaction with an active form of a mediator, an anode-generated halogen.