G. officinalis itself does not contain any of these medications, but isoamylene guanidine; phenformin, buformin, and metformin are chemically synthesized compounds composed of two guanidine molecules, and are more lipophilic than the plant-derived parent compound.Metformin was first described in the scientific literature in 1922, by Emil Werner and James Bell, as a product in the synthesis of N,N-dimethylguanidine. In 1929, Slotta and Tschesche discovered its sugar-lowering action in rabbits, finding it the most potent biguanide analog they studied. This result was completely forgotten, as other guanidine analogs such as the synthalins, took over and were themselves soon overshadowed by insulin.Interest in metformin resumed at the end of the 1940s. In 1950, metformin, unlike some other similar compounds, was found not to decrease blood pressure and heart rate in animals. That year, Filipino physician Eusebio Y. Garcia used metformin (he named it Fluamine) to treat influenza; he noted the medication "lowered the blood sugar to minimum physiological limit" and was not toxic. Garcia believed metformin to have bacteriostatic, antiviral, antimalarial, antipyretic, and analgesic actions. In a series of articles in 1954, Polish pharmacologist Janusz Supniewski was unable to confirm most of these effects, including lowered blood sugar. Instead he observed antiviral effects in humans.French diabetologist Jean Sterne studied the antihyperglycemic properties of galegine, an alkaloid isolated from G. officinalis, which is related in structure to metformin, and had seen brief use as an antidiabetic before the synthalins were developed.
Metformin treatment decreases the risk of developing type 2 diabetes mellitus in women with PCOS who exhibited impaired glucose tolerance at baseline. Diabetes mellitus and pregnancy
A total review of metformin use during pregnancy compared to insulin alone found good short-term safety for both the mother and baby, but unclear long-term safety. Several observational studies and randomized controlled trials found metformin to be as effective and safe as insulin for the management of gestational diabetes. Nonetheless, several concerns have been raised and evidence on the long-term safety of metformin for both mother and child is lacking. Compared with insulin, women with gestational diabetes treated with metformin gain less weight and are less likely to develop pre‐eclampsia during pregnancy. Babies born to women treated with metformin have less visceral fat, and this may make them less prone to insulin resistance in later life. The use of metformin for gestational diabetes resulted in smaller babies compared to treatment with insulin. However, despite initially lower birth weight, children exposed to metformin during pregnancy had accelerated growth after birth, and were heavier by mid-childhood than those exposed to insulin during pregnancy. This pattern of initial low birth weight followed by catch-up growth that surpasses comparative children has been associated with long-term cardiometabolic disease. Weight change
Metformin use is typically associated with weight loss. It appears to be safe and effective in counteracting  the weight gain caused by the antipsychotic medications olanzapine and clozapine.