Genetic effect of metformin use on risk of cancers: evidence from Mendelian randomization analysis Authors: Yao Chen, Bingjun Bai, Shuchang Ye, Xing Gao, Xinnan Zheng, Kangkang Ying, Hongming Pan, Binbin Xie Published: 2023 ABSTRACT BackgroundIncreasing number of studies reported the positive effect of metformin on the prevention and treatment of cancers. However, the genetic causal effect of metformin utilization on the risk of common cancers was not completely demonstrated.MethodsTwo-sample Mendelian Randomization (two-sample MR) analysis was conducted to uncover the genetically predicted causal association between metformin use and 26 kinds of cancers. Besides, two-step Mendelian Randomization (two-step MR) assessment was applied to clarify the mediators which mediated the causal effect of metformin on certain cancer. We utilized five robust analytical methods, in which the inverse variance weighting (IVW) method served as the major one. Sensitivity, pleiotropy, and heterogeneity were assessed. The genetic statistics of exposure, outcomes, and mediators were downloaded from publicly available datasets, including the Open Genome-Wide Association Study (GWAS), FinnGen consortium (FinnGen), and UK Biobank (UKB).ResultsAmong 26 kinds of common cancers, HER-positive breast cancer was presented with a significant causal relationship with metformin use [Beta: − 4.0982; OR: 0.0166 (95% CI: 0.0008, 0.3376); P value: 0.0077], which indicated metformin could prevent people from HER-positive breast cancer. Other cancers only showed modest associations with metformin use. Potential mediators were included in two-step MR, among which total testosterone levels (mediating effect: 24.52%) displayed significant mediating roles. Leave-one-out, MR-Egger, and MR-PRESSO analyses produced consistent outcomes.ConclusionMetformin use exhibited a genetically protective effect on HER-positive breast cancer, which was partially mediated by total testosterone levels.Supplementary InformationThe online version contains supplementary material available at 10.1186/s13098-023-01218-3. Introduction The growing frequency and high mortality of malignant tumors imposed a significant burden on people all over the world [1]. Over the past few decades, healthcare professionals have tirelessly sought effective and safe strategies for cancer prevention, albeit with limited success. Metformin, a widely prescribed medication for managing type 2 diabetes, has garnered increasing interest for its potential anti-tumorigenic properties [2]. An increasing number of clinical studies attempted to reveal the efficacy of metformin on different types of cancer, but the controversial conclusions left the issue unsolved [3–5]. Biases induced by confounders which were hard to avoid in observational studies might be responsible for this. Scientists were also interested in the biological pathways of metformin in cancer treatment. Apart from its well-documented benefits in improving glucose metabolism, recent years have witnessed extensive investigations into metformin's molecular mechanisms against various malignancies. These mechanisms include the reduction of leukocyte–endothelium interactions, modulation of oxidative stress, and the regulation of AMP-activated protein kinase (AMPK) [6, 7]. However, researches related to the genetic effect of metformin use on the risk of cancers were not complete yet. Contrary to conventional observational research, Mendelian Randomization analysis (MR) provided a cost- and time-saving approach with high efficiency to investigate the genetically predicted causal relationships [8]. As Dr. Tobin stated, MR is also known as 'Mendelian deconfounding' since it attempts to present estimates of causal effects that are free of biases caused by confounding [9]. Robust-associated genetic variants were selected to explore the genetic association between exposures and outcomes. Genetic variations in the MR method are equal to lifetime changes caused by exposure and reflect the long-term implications of the alteration on certain illnesses [10]. In our study, two-sample MR was used to unveil the causal relationship between metformin use and 26 common types of cancer. Additionally, we supplemented our analysis with a two-step MR to identify potential mediators and assess their contribution to the genetic causal effect. Ultimately, we conducted a comprehensive review of previous clinical studies to enhance our understanding of the association between metformin use and cancer. Materials and methods Study design The overview of the study design is demonstrated in Fig. 1. As shown in Fig. 1a, the MR analysis requires three basic assumptions to be met: (1) instrumental variables (IVs) are strongly correlated to exposure; (2) IVs are independent of any potential confounders; and (3) IVs only affect the outcome through exposure. Two distinct genetic datasets should be integrated into a single MR study, which is the fundamental prerequisite of two-sample MR.Fig. 1Overview of the study design. A We firstly applied two-sample MR analyses to figure out the genetic effect of metformin use on 26 prevalent cancers with five robust methods. B Two-step MR analysis and MVMR were further conducted to figure out the potential mediator who mediate the protective genetic effect of metformin on HER-positive breast cancer Overview of the study design. A We firstly applied two-sample MR analyses to figure out the genetic effect of metformin use on 26 prevalent cancers with five robust methods. B Two-step MR analysis and MVMR were further conducted to figure out the potential mediator who mediate the protective genetic effect of metformin on HER-positive breast cancer To determine the mediating factors in the genetic causal relationship, two-step MR was performed as illustrated in Fig. 1b. In the first step, single-nucleotide polymorphisms (SNPs) to genetically predict metformin use were incorporated to evaluate the causal relationship of metformin use on 22 potential mediators (e.g. BMI, CRP, and testosterone levels) in the univariable MR method. And SNPs robustly related to mediators were used to calculate the causal association of mediators and cancer outcome(s) [11]. It should be noted that the genetic information utilized in this study is freely accessible to researchers around the world and is therefore not subject to additional ethical review or informed consent. Selection of instrumental variants (IVs) of metformin use Genetic variants of metformin use in European ancestry were obtained from the UK Biobank dataset (8392 cases/328,767 controls). The following inclusion criteria guided our selection of the IVs: (1) SNPs should have a genome-wide significance level (P < 5×10–8), which strongly indicates genetic association with exposure. (2) Genetic variants with linkage disequilibrium (LD) (r2 > 0.001) were excluded. The LD between SNPs was assessed to clump the independence of SNPs; (3) The F-statistics (beta2/se2) > 10. SNPs with F-statistics less than 10 may have inferior statistical power. Additional file 1: Table S1 summarizes the IVs of metformin use involved in this work. Selection of cancer outcomes The genetic information associated with the following types of malignant tumors was obtained from the FinnGen consortium: colorectal cancer (3022 cases/215,770 controls), stomach cancer (633 cases/218159 controls), pancreas cancer (605 cases/218187 controls), oral pharynx cancer (126 cases/218666 controls), oesophagus cancer (212 cases/218560 controls), bone and articular cartilage cancer (119 cases/218673 controls), kidney cancer (971 cases/217,821 controls), melanoma (98 cases/218694 controls), non-melanoma skin cancer (10,382 cases/208410 controls), thyroid gland cancer (989 cases/217803 controls), overall breast cancer (8401 cases/115178 controls), HER-negative breast cancer (3092 cases/99267 controls), HER-positive breast cancer (4263 cases/99267 controls), lung cancer (1681 cases, 217,111 controls), non-small cell lung cancer (NSCLC) (1627 cases/217165 controls) and small cell lung cancer (SCLC) (179 cases/218613 controls). The genetic information of other cancers was gotten from UKB: colon cancer (2226 cases/358968 controls), rectum cancer (1085 cases/461925 controls), liver cancer (168 cases/372016 controls), small intestine cancer (156 cases/337003 controls), bladder cancer (1554 cases/359640 controls), overall skin cancer (1436 cases/461497 controls). Only the European population was incorporated into this study, and no sample overlap in this MR study. Statistical analyses Two-sample Mendelian randomization Two-sample MR studies were conducted using TwoSampleMR package (version 0.5.6) and R software (version 4.2.1) [12]. A total of five different approaches were used. The inverse variance weighting (IVW) method, which evaluates the causal influence of genetically predicted exposures on outcomes by weighted regression of SNP-specific Wald ratios, acted as the major approach. To examine the consistency and heterogeneity of our findings, four additional assessment techniques—weighted median, MR Egger, simple model, and weighted model—were performed [13–15]. When the variable in MR has an impact on illness independent of its impact on exposure, this is known as horizontal pleiotropy. To avoid the biases of horizontal pleiotropy, MR-PRESSO method was performed to identify the outliers with MRPRESSO package (version 1.0) [16]. Pleiotropy was tested by leave-one-out analysis and MR-Egger intercept method [17, 18]. Heterogeneity was evaluated by Cochran's Q-statistic, and any MR results with heterogeneity were excluded. Median analysis The genetic information of potential mediators was downloaded from publicly accessible GWAS consortia, and relevant GWAS identifiers or available references were listed in Table 2. Two-step MR analysis was applied to figure out if the potential mediator attributed any mediating effect between exposure and outcome [11]. Of note, the mediator has to meet the premise of a continuous variable [19]. In the first step, genetic variants of exposure (metformin use) were obtained to determine the causal effect of exposure on potential mediators. After that, genetic variants of mediators were also acquired to assess the causal role of mediators on outcomes (cancers) in the second step. Beta 1 and beta 2 were calculated in step one and step two respectively (Fig. 1b). Potential mediator which presented supporting evidence in two-step MR would be included in the median analysis. Multivariable MR (MVMR) analysis was performed on metformin use-TT level-HER(+) breast cancer. The mediation effect was obtained by multiplying beta1 by beta 2. Comparison with clinical studies To further confirm our findings, we reviewed the prevention and treatment effects of metformin on breast cancer in previous clinical studies. Phrase II, Phrase III randomized clinical trials (RCT), prospective studies and retrospective studies that published on Pubmed, Medline and Embase were included. Results Selected genetic instrumental variants (IVs) We meticulously followed the aforementioned criteria when selecting the IVs. As a consequence, 26 independent SNPs were selected out of the total amount of 10,894,596 SNPs, acting as the IVs of metformin use. Detailed information could be found in Additional file 1: Table S1. F-statistics, which were also presented in the supplementary document, showed no evidence of weak instrumental bias. Assessment of the genetic causal effect of metformin on cancers Two-sample MR results The brief results of two-sample MR analyses of metformin use on 26 prevalent cancers were listed in Table 1. IVW results presented the genetically predicted protective effect of metformin use on HER-positive breast cancer (Beta: − 4.0982; OR: 0.0166 (95% CI: 0.0008, 0.3376); P value: 0.0077). The scatter plots and funnel plots were illustrated in Additional file 1: Fig. S1. The leave-one-out analysis showed no pleiotropy in the MR result (Additional file 1: Fig. S2). And no significant genetic relationship existed between metformin use and other types of cancers.Table 1Two-sample Mendelian randomization results for genetic effect of metformin use on 26 common cancersOutcomesIVs amountMethodsBetaOdds ratioOR_lo95%OR_up95%P valueQ-statisticsPh-valueGastrointestinal tract cancersColorectal24MR Egger − 6.21E+002.01E−031.43E−072.83E+012.16E−012.88E+011.49E−01Weighted median − 2.73E+006.53E−022.41E−041.77E+013.40E−01IVW − 2.70E+006.71E−021.27E−033.55E+001.82E−012.97E+011.59E−01Colon25MR Egger6.92E−031.01E+009.44E−011.07E+008.36E−012.74E+012.39E−01Weighted median1.18E−021.01E+009.72E−011.05E+005.64E−01IVW1.20E−021.01E+009.85E−011.04E+003.86E−012.74E+012.84E−01Rectum9MR Egger − 2.11E−018.09E−016.33E−011.04E+001.36E−011.04E+011.68E−01Weighted median − 1.43E−029.86E−019.50E−011.02E+004.49E−01IVW − 1.14E−029.89E−019.56E−011.02E+005.01E−011.42E+017.68E−02Liver19MR Egger6.22E−031.01E+009.86E−011.03E+005.59E−012.55E+018.40E−02Weighted median − 2.30E−039.98E−019.87E−011.01E+006.75E−01IVW − 3.19E−039.97E−019.88E−011.01E+004.70E−012.70E+017.93E−02Stomach24MR Egger − 1.21E+015.50E−069.34E−143.24E+021.98E−011.31E+019.31E−01Weighted median − 4.97E+006.97E−032.86E−071.70E+023.35E−01IVW − 2.76E+006.34E−023.68E−051.09E+024.68E−011.43E+019.17E−01Pancreas24MR Egger3.36E+002.88E+011.23E−086.75E+107.63E−013.03E+011.12E−01Weighted median5.58E+002.64E+021.25E−035.59E+073.73E−01IVW3.47E+003.21E+014.92E−032.10E+054.39E−013.03E+011.42E−01Small intestine25MR Egger3.20E−041.00E+009.84E−011.02E+009.69E−011.96E+016.68E−01Weighted median3.15E−031.00E+009.93E−011.01E+005.58E−01IVW1.72E−031.00E+009.95E−011.01E+006.19E−011.96E+017.20E−01Larynx24MR Egger3.50E+003.31E+011.13E−139.68E+158.39E−012.12E+015.10E−01Weighted median8.72E+006.11E+032.23E−061.68E+134.32E−01IVW4.62E+001.02E+029.25E−051.11E+085.15E−012.12E+015.70E−01Oral pharynx24MR Egger − 1.72E+013.26E−081.66E−256.38E+094.05E−012.26E+014.24E−01Weighted median − 1.16E+019.10E−061.35E−166.11E+053.61E−01IVW − 1.25E+013.86E−062.82E−135.29E+011.37E−012.27E+014.79E−01Oesophagus24MR Egger2.15E+012.14E+094.16E−041.10E+221.64E−012.06E+015.46E−01Weighted median8.05E+003.14E+032.61E−053.79E+113.96E−01IVW1.15E+019.51E+044.68E−011.93E+106.60E−022.11E+015.73E−01Breast cancersBreast cancer24MR Egger6.05E−011.83E+002.06E−031.63E+038.63E−013.46E+014.22E−02Weighted median − 1.10E+003.32E−011.28E−028.65E+005.08E−01IVW − 2.26E+001.05E−016.17E−031.77E+001.18E−013.59E+014.18E−02HER(−)24MR Egger3.37E+002.91E+013.84E−042.21E+065.62E−013.89E+011.45E−02Weighted median − 1.33E+002.65E−011.12E−036.27E+016.34E−01IVW − 2.00E+001.36E−011.23E−031.50E+014.06E−014.08E+011.26E−02HER(+)24MR Egger − 1.16E+003.14E−012.35E−044.19E+027.55E−011.63E+017.99E−01Weighted median − 2.42E+008.88E−021.11E−037.09E+002.79E−01IVW − 4.10E+001.66E−028.16E−043.38E−017.66E−03*1.71E+018.04E−01ER(+)24MR Egger3.59E+003.61E+011.33E−019.78E+032.23E−011.15E+021.68E−14Weighted median − 2.00E−018.19E−011.18E−015.68E+008.40E−01IVW − 1.19E+003.04E−012.88E−023.22E+003.23E−011.32E+022.88E−17ER(−)24MR Egger9.72E+001.67E+041.25E−012.22E+091.21E−013.25E+016.90E−02Weighted median − 4.86E+007.73E−031.87E−053.20E+001.14E−01IVW − 2.73E+006.53E−024.86E−048.78E+002.75E−013.99E+011.56E−02Lung cancersLung25MR Egger − 5.42E−039.95E−019.77E−011.01E+005.52E−012.07E+015.97E−01Weighted median − 7.87E−039.92E−019.80E−011.00E+001.92E−01IVW − 6.19E−039.94E−019.86E−011.00E+001.06E−012.08E+016.53E−01NSCLC24MR Egger − 2.83E+005.88E−022.12E−071.63E+046.62E−012.76E+010.1910275Weighted median − 7.83E−014.57E−013.03E−046.89E+028.34E−01IVW1.39E−011.15E+006.62E−031.99E+029.58E−012.79E+012.20E−01SCLC24MR Egger − 7.91E+003.66E−041.26E−181.06E+116.46E−011.93E+016.29E−01Weighted median − 1.29E+012.53E−061.97E−153.24E+032.28E−01IVW − 4.91E+007.35E−036.55E−098.25E+034.89E−011.93E+016.84E−01Skin cancersSkin16MR Egger − 1.06E−029.89E−019.47E−011.03E+006.47E−011.72E+012.47E−01Weighted median − 4.75E−039.95E−019.71E−011.02E+007.05E−01IVW3.59E−031.00E+009.84E−011.02E+007.10E−011.78E+012.75E−01Melanoma24MR Egger4.95E+001.42E+021.05E−181.92E+228.36E−012.36E+013.70E−01Weighted median2.38E+012.24E+101.90E−022.65E+229.29E−02IVW5.54E+002.56E+021.44E−064.55E+105.67E−012.36E+014.28E−01Non-melanoma24MR Egger − 2.39E+009.21E−023.71E−052.29E+025.56E−015.65E+017.30E−05Weighted median − 4.90E−016.12E−013.01E−021.25E+017.50E−01IVW − 6.49E−015.22E−012.10E−021.30E+016.92E−015.71E+011.00E−04Other cancersKidney24MR Egger2.75E+001.57E+018.17E−063.01E+077.13E−011.90E+016.45E−01Weighted median1.48E+004.40E+003.98E−044.87E+047.55E−01IVW3.07E+002.15E+015.05E−029.11E+033.21E−011.90E+017.00E−01Bladder25MR Egger1.26E−021.01E+009.63E−011.06E+006.29E−011.63E+018.43E−01Weighted median2.67E−021.03E+009.93E−011.06E+001.24E−01IVW1.88E−021.02E+009.97E−011.04E+008.65E−021.64E+018.75E−01Bone/cartilage24MR Egger − 1.34E+002.61E−017.12E−219.56E+189.54E−012.70E+012.11E−01Weighted median − 1.95E+001.42E−013.60E−125.58E+098.75E−01IVW − 1.22E+014.84E−064.13E−145.68E+021.97E−012.73E+012.41E−01Thyroid gland24MR Egger − 6.72E+001.20E−036.00E−102.40E+033.74E−011.89E+016.54E−01Weighted median4.42E+008.33E+017.96E−038.71E+053.49E−01IVW1.78E+005.93E+001.40E−022.52E+035.64E−012.05E+016.14E−01Brain24MR Egger6.43E+006.20E+025.36E−077.18E+115.52E−011.66E+017.87E−01Weighted median1.63E+005.10E+002.02E−051.29E+067.97E−01IVW2.64E−011.30E+002.13E−047.97E+039.53E−011.70E+018.11E−01*P value < 0.05; IVW, inverse variance weighted method; OR, odds ratio; OR_lo95%, the lower margin of OR’s 95% confidence interval; OR_up95%, the upper margin of OR’s 95% confidence interval; IVs, instrumental variants; Ph-value, the P value of heterogeneity, heterogeneity existed when Ph-value < 0.05 Table 1Two-sample Mendelian randomization results for genetic effect of metformin use on 26 common cancersOutcomesIVs amountMethodsBetaOdds ratioOR_lo95%OR_up95%P valueQ-statisticsPh-valueGastrointestinal tract cancersColorectal24MR Egger − 6.21E+002.01E−031.43E−072.83E+012.16E−012.88E+011.49E−01Weighted median − 2.73E+006.53E−022.41E−041.77E+013.40E−01IVW − 2.70E+006.71E−021.27E−033.55E+001.82E−012.97E+011.59E−01Colon25MR Egger6.92E−031.01E+009.44E−011.07E+008.36E−012.74E+012.39E−01Weighted median1.18E−021.01E+009.72E−011.05E+005.64E−01IVW1.20E−021.01E+009.85E−011.04E+003.86E−012.74E+012.84E−01Rectum9MR Egger − 2.11E−018.09E−016.33E−011.04E+001.36E−011.04E+011.68E−01Weighted median − 1.43E−029.86E−019.50E−011.02E+004.49E−01IVW − 1.14E−029.89E−019.56E−011.02E+005.01E−011.42E+017.68E−02Liver19MR Egger6.22E−031.01E+009.86E−011.03E+005.59E−012.55E+018.40E−02Weighted median − 2.30E−039.98E−019.87E−011.01E+006.75E−01IVW − 3.19E−039.97E−019.88E−011.01E+004.70E−012.70E+017.93E−02Stomach24MR Egger − 1.21E+015.50E−069.34E−143.24E+021.98E−011.31E+019.31E−01Weighted median − 4.97E+006.97E−032.86E−071.70E+023.35E−01IVW − 2.76E+006.34E−023.68E−051.09E+024.68E−011.43E+019.17E−01Pancreas24MR Egger3.36E+002.88E+011.23E−086.75E+107.63E−013.03E+011.12E−01Weighted median5.58E+002.64E+021.25E−035.59E+073.73E−01IVW3.47E+003.21E+014.92E−032.10E+054.39E−013.03E+011.42E−01Small intestine25MR Egger3.20E−041.00E+009.84E−011.02E+009.69E−011.96E+016.68E−01Weighted median3.15E−031.00E+009.93E−011.01E+005.58E−01IVW1.72E−031.00E+009.95E−011.01E+006.19E−011.96E+017.20E−01Larynx24MR Egger3.50E+003.31E+011.13E−139.68E+158.39E−012.12E+015.10E−01Weighted median8.72E+006.11E+032.23E−061.68E+134.32E−01IVW4.62E+001.02E+029.25E−051.11E+085.15E−012.12E+015.70E−01Oral pharynx24MR Egger − 1.72E+013.26E−081.66E−256.38E+094.05E−012.26E+014.24E−01Weighted median − 1.16E+019.10E−061.35E−166.11E+053.61E−01IVW − 1.25E+013.86E−062.82E−135.29E+011.37E−012.27E+014.79E−01Oesophagus24MR Egger2.15E+012.14E+094.16E−041.10E+221.64E−012.06E+015.46E−01Weighted median8.05E+003.14E+032.61E−053.79E+113.96E−01IVW1.15E+019.51E+044.68E−011.93E+106.60E−022.11E+015.73E−01Breast cancersBreast cancer24MR Egger6.05E−011.83E+002.06E−031.63E+038.63E−013.46E+014.22E−02Weighted median − 1.10E+003.32E−011.28E−028.65E+005.08E−01IVW − 2.26E+001.05E−016.17E−031.77E+001.18E−013.59E+014.18E−02HER(−)24MR Egger3.37E+002.91E+013.84E−042.21E+065.62E−013.89E+011.45E−02Weighted median − 1.33E+002.65E−011.12E−036.27E+016.34E−01IVW − 2.00E+001.36E−011.23E−031.50E+014.06E−014.08E+011.26E−02HER(+)24MR Egger − 1.16E+003.14E−012.35E−044.19E+027.55E−011.63E+017.99E−01Weighted median − 2.42E+008.88E−021.11E−037.09E+002.79E−01IVW − 4.10E+001.66E−028.16E−043.38E−017.66E−03*1.71E+018.04E−01ER(+)24MR Egger3.59E+003.61E+011.33E−019.78E+032.23E−011.15E+021.68E−14Weighted median − 2.00E−018.19E−011.18E−015.68E+008.40E−01IVW − 1.19E+003.04E−012.88E−023.22E+003.23E−011.32E+022.88E−17ER(−)24MR Egger9.72E+001.67E+041.25E−012.22E+091.21E−013.25E+016.90E−02Weighted median − 4.86E+007.73E−031.87E−053.20E+001.14E−01IVW − 2.73E+006.53E−024.86E−048.78E+002.75E−013.99E+011.56E−02Lung cancersLung25MR Egger − 5.42E−039.95E−019.77E−011.01E+005.52E−012.07E+015.97E−01Weighted median − 7.87E−039.92E−019.80E−011.00E+001.92E−01IVW − 6.19E−039.94E−019.86E−011.00E+001.06E−012.08E+016.53E−01NSCLC24MR Egger − 2.83E+005.88E−022.12E−071.63E+046.62E−012.76E+010.1910275Weighted median − 7.83E−014.57E−013.03E−046.89E+028.34E−01IVW1.39E−011.15E+006.62E−031.99E+029.58E−012.79E+012.20E−01SCLC24MR Egger − 7.91E+003.66E−041.26E−181.06E+116.46E−011.93E+016.29E−01Weighted median − 1.29E+012.53E−061.97E−153.24E+032.28E−01IVW − 4.91E+007.35E−036.55E−098.25E+034.89E−011.93E+016.84E−01Skin cancersSkin16MR Egger − 1.06E−029.89E−019.47E−011.03E+006.47E−011.72E+012.47E−01Weighted median − 4.75E−039.95E−019.71E−011.02E+007.05E−01IVW3.59E−031.00E+009.84E−011.02E+007.10E−011.78E+012.75E−01Melanoma24MR Egger4.95E+001.42E+021.05E−181.92E+228.36E−012.36E+013.70E−01Weighted median2.38E+012.24E+101.90E−022.65E+229.29E−02IVW5.54E+002.56E+021.44E−064.55E+105.67E−012.36E+014.28E−01Non-melanoma24MR Egger − 2.39E+009.21E−023.71E−052.29E+025.56E−015.65E+017.30E−05Weighted median − 4.90E−016.12E−013.01E−021.25E+017.50E−01IVW − 6.49E−015.22E−012.10E−021.30E+016.92E−015.71E+011.00E−04Other cancersKidney24MR Egger2.75E+001.57E+018.17E−063.01E+077.13E−011.90E+016.45E−01Weighted median1.48E+004.40E+003.98E−044.87E+047.55E−01IVW3.07E+002.15E+015.05E−029.11E+033.21E−011.90E+017.00E−01Bladder25MR Egger1.26E−021.01E+009.63E−011.06E+006.29E−011.63E+018.43E−01Weighted median2.67E−021.03E+009.93E−011.06E+001.24E−01IVW1.88E−021.02E+009.97E−011.04E+008.65E−021.64E+018.75E−01Bone/cartilage24MR Egger − 1.34E+002.61E−017.12E−219.56E+189.54E−012.70E+012.11E−01Weighted median − 1.95E+001.42E−013.60E−125.58E+098.75E−01IVW − 1.22E+014.84E−064.13E−145.68E+021.97E−012.73E+012.41E−01Thyroid gland24MR Egger − 6.72E+001.20E−036.00E−102.40E+033.74E−011.89E+016.54E−01Weighted median4.42E+008.33E+017.96E−038.71E+053.49E−01IVW1.78E+005.93E+001.40E−022.52E+035.64E−012.05E+016.14E−01Brain24MR Egger6.43E+006.20E+025.36E−077.18E+115.52E−011.66E+017.87E−01Weighted median1.63E+005.10E+002.02E−051.29E+067.97E−01IVW2.64E−011.30E+002.13E−047.97E+039.53E−011.70E+018.11E−01*P value < 0.05; IVW, inverse variance weighted method; OR, odds ratio; OR_lo95%, the lower margin of OR’s 95% confidence interval; OR_up95%, the upper margin of OR’s 95% confidence interval; IVs, instrumental variants; Ph-value, the P value of heterogeneity, heterogeneity existed when Ph-value < 0.05 Two-sample Mendelian randomization results for genetic effect of metformin use on 26 common cancers *P value < 0.05; IVW, inverse variance weighted method; OR, odds ratio; OR_lo95%, the lower margin of OR’s 95% confidence interval; OR_up95%, the upper margin of OR’s 95% confidence interval; IVs, instrumental variants; Ph-value, the P value of heterogeneity, heterogeneity existed when Ph-value < 0.05 Median analysis results The following 20 probable mediators were investigated to figure out whether MR is shown to be causally related to both the effect of metformin use on them (step one) and the mediators' effects on HER-positive breast cancer (step two): inflammation-related factors (white blood cell counts and C-reactive protein), body shape-related index (BMI, weight, waist circumference, body fat percentage, visceral adipose tissue volume, and abdominal subcutaneous adipose tissue volume), metabolism-related biomarkers (HbA1c, fasting insulin, and fasting glucose) and sex hormone-related biomarkers (SHBG, estradiol, total testosterone levels, and bioavailable testosterone levels). As shown in Table 2, we determined that metformin treatment had a causal influence on HDL cholesterol, LDL cholesterol, SHBG, total testosterone, bioavailable testosterone, estradiol, and fasting glucose levels. MR analyses were further conducted to evaluate the causal effect of the seven mediators above on HER-positive breast cancer (Table 3). Significant causal associations was exhibited in total testosterone levels (Beta: 0.4058, 95% CI: 0.0562 to 0.7556, P value: 0.0229). Hence, total testosterone (TT) levels was selected for mediation effect calculation (Additional file 1: Figs. S3–S10).Table 2Genetic causal effect of metformin use on potential mediatorsPotential mediatorsGWAS identifier/referenceBeta1Lo_95CIUp_95CIP1_valueBMIebi-a-GCST006802 [45] − 4.00E−01 − 1.51E+007.10E−014.80E−01Weightukb-b-11842 − 1.72E−01 − 2.02E+001.68E+008.55E−01Waist circumferenceieu-a-67 [46]5.12E−01 − 1.70E+002.73E+006.50E−01ASATVebi-a-GCST90016672 [47] − 2.40E−01 − 2.56E+002.08E+008.40E−01VATVebi-a-GCST90016671 [47]2.41E−01 − 1.61E+002.09E+007.99E−01Whole body fat-free massukb-b-13354 − 6.68E−02 − 1.32E+001.19E+009.17E−01Body fat percentageukb-b-8909 − 1.82E−01 − 1.45E+001.08E+007.78E−01WBCebi-a-GCST004610 [48] − 1.21E−01 − 1.05E+008.11E−017.99E−01CRPieu-b-4764 − 1.99E−01 − 1.35E+009.52E−017.35E−01HDL cholesterolieu-b-109 [49] − 2.38E+00 − 4.40E+00 − 3.62E−012.08E−02*LDL cholesterolieu-b-5089 − 2.37E+00 − 3.21E+00 − 1.54E+002.38E−08*Total cholesterolieu-a-301 [50] − 6.69E−01 − 3.02E+001.68E+005.77E−01SHBGebi-a-GCST90012111 [51] − 1.50E+00 − 2.08E+00 − 9.24E−013.57E−07*Total testosteroneebi-a-GCST90012114 [51] − 6.04E−01 − 9.99E−01 − 2.08E−012.76E−03*Bioavailable testosteroneebi-a-GCST90012102 [51]9.28E−013.35E−011.52E+002.15E−03*Estradiol levelsebi-a-GCST90012105 [51] − 1.23E−01 − 2.32E−01 − 1.31E−022.82E−02*Fasting insulinebi-a-GCST90002238 [52] − 3.85E−01 − 1.34E+005.68E−014.28E−01Fasting glucoseebi-a-GCST005186 [53]2.65E+001.06E+004.23E+001.06E−03*HbA1cieu-b-104 [54] − 3.96E−01 − 9.88E−011.97E−011.90E−01Telomere lengthieu-b-4879 − 6.25E−03 − 4.43E−014.30E−019.78E−01All the results above were derived from the IVW method.*P1_value < 0.05; Lo_95CI, the lower margin of beta 1’s 95% confidence interval; Up_95CI, the upper margin of beta 1’s 95% confidence interval; SHBG,Sex hormone-binding globulin; VATV, Visceral adipose tissue volume; ASATV, Abdominal subcutaneous adipose tissue volume; HDL, high-density lipoprotein; LDL, low-density lipoprotein; WBC, White blood cellTable 3Genetic causal effect of potential mediators on HER-positive breast cancerPotential mediatorsBeta2Lo_95CIUp_95CIP2_valueHDL cholesterol2.85E−02 − 8.63E−021.43E−016.27E−01LDL cholesterol6.97E−02 − 5.83E−021.98E−012.86E−01SHBG − 8.30E−02 − 3.50E−011.84E−015.42E−01Total testosterone4.06E−015.62E−027.56E−012.29E−02*Bioavailable testosterone1.73E−013.61E−023.81E−011.05E−01Estradiol levels1.34E+00 − 6.24E−013.30E+001.82E−01Fasting glucose − 1.66E−01 − 4.72E−011.39E−012.86E−01All the results above were derived from the IVW method.*P2_value < 0.05; Lo_95CI, the lower margin of beta 2’s 95% confidence interval; Up_95CI, the upper margin of beta 2’s 95% confidence interval; SHBG, Sex hormone-binding globulin; HDL, high-density lipoprotein; LDL, low-density lipoprotein Table 2Genetic causal effect of metformin use on potential mediatorsPotential mediatorsGWAS identifier/referenceBeta1Lo_95CIUp_95CIP1_valueBMIebi-a-GCST006802 [45] − 4.00E−01 − 1.51E+007.10E−014.80E−01Weightukb-b-11842 − 1.72E−01 − 2.02E+001.68E+008.55E−01Waist circumferenceieu-a-67 [46]5.12E−01 − 1.70E+002.73E+006.50E−01ASATVebi-a-GCST90016672 [47] − 2.40E−01 − 2.56E+002.08E+008.40E−01VATVebi-a-GCST90016671 [47]2.41E−01 − 1.61E+002.09E+007.99E−01Whole body fat-free massukb-b-13354 − 6.68E−02 − 1.32E+001.19E+009.17E−01Body fat percentageukb-b-8909 − 1.82E−01 − 1.45E+001.08E+007.78E−01WBCebi-a-GCST004610 [48] − 1.21E−01 − 1.05E+008.11E−017.99E−01CRPieu-b-4764 − 1.99E−01 − 1.35E+009.52E−017.35E−01HDL cholesterolieu-b-109 [49] − 2.38E+00 − 4.40E+00 − 3.62E−012.08E−02*LDL cholesterolieu-b-5089 − 2.37E+00 − 3.21E+00 − 1.54E+002.38E−08*Total cholesterolieu-a-301 [50] − 6.69E−01 − 3.02E+001.68E+005.77E−01SHBGebi-a-GCST90012111 [51] − 1.50E+00 − 2.08E+00 − 9.24E−013.57E−07*Total testosteroneebi-a-GCST90012114 [51] − 6.04E−01 − 9.99E−01 − 2.08E−012.76E−03*Bioavailable testosteroneebi-a-GCST90012102 [51]9.28E−013.35E−011.52E+002.15E−03*Estradiol levelsebi-a-GCST90012105 [51] − 1.23E−01 − 2.32E−01 − 1.31E−022.82E−02*Fasting insulinebi-a-GCST90002238 [52] − 3.85E−01 − 1.34E+005.68E−014.28E−01Fasting glucoseebi-a-GCST005186 [53]2.65E+001.06E+004.23E+001.06E−03*HbA1cieu-b-104 [54] − 3.96E−01 − 9.88E−011.97E−011.90E−01Telomere lengthieu-b-4879 − 6.25E−03 − 4.43E−014.30E−019.78E−01All the results above were derived from the IVW method.*P1_value < 0.05; Lo_95CI, the lower margin of beta 1’s 95% confidence interval; Up_95CI, the upper margin of beta 1’s 95% confidence interval; SHBG,Sex hormone-binding globulin; VATV, Visceral adipose tissue volume; ASATV, Abdominal subcutaneous adipose tissue volume; HDL, high-density lipoprotein; LDL, low-density lipoprotein; WBC, White blood cell Genetic causal effect of metformin use on potential mediators All the results above were derived from the IVW method. *P1_value < 0.05; Lo_95CI, the lower margin of beta 1’s 95% confidence interval; Up_95CI, the upper margin of beta 1’s 95% confidence interval; SHBG,Sex hormone-binding globulin; VATV, Visceral adipose tissue volume; ASATV, Abdominal subcutaneous adipose tissue volume; HDL, high-density lipoprotein; LDL, low-density lipoprotein; WBC, White blood cell Table 3Genetic causal effect of potential mediators on HER-positive breast cancerPotential mediatorsBeta2Lo_95CIUp_95CIP2_valueHDL cholesterol2.85E−02 − 8.63E−021.43E−016.27E−01LDL cholesterol6.97E−02 − 5.83E−021.98E−012.86E−01SHBG − 8.30E−02 − 3.50E−011.84E−015.42E−01Total testosterone4.06E−015.62E−027.56E−012.29E−02*Bioavailable testosterone1.73E−013.61E−023.81E−011.05E−01Estradiol levels1.34E+00 − 6.24E−013.30E+001.82E−01Fasting glucose − 1.66E−01 − 4.72E−011.39E−012.86E−01All the results above were derived from the IVW method.*P2_value < 0.05; Lo_95CI, the lower margin of beta 2’s 95% confidence interval; Up_95CI, the upper margin of beta 2’s 95% confidence interval; SHBG, Sex hormone-binding globulin; HDL, high-density lipoprotein; LDL, low-density lipoprotein Genetic causal effect of potential mediators on HER-positive breast cancer All the results above were derived from the IVW method. *P2_value < 0.05; Lo_95CI, the lower margin of beta 2’s 95% confidence interval; Up_95CI, the upper margin of beta 2’s 95% confidence interval; SHBG, Sex hormone-binding globulin; HDL, high-density lipoprotein; LDL, low-density lipoprotein In the MVMR of metformin-TT-HER(+) breast cancer, the direct effect of metformin on HER(+) breast cancer was OR 0.0992 (95% CI: 0.0038 to 2.5986, P value: 0.1655) after being adjusted by TT levels, and the direct effect of TT on HER(+) breast cancer was OR 1.5964 (95% CI: 1.1334 to 2.2486, P value: 0.0074) after being adjusted by metformin use (Additional file 1: Table S2). The mediation effect of TT levels was 24.52%. Review of previous clinical studies With the help of the three databases mentioned above, we listed the literature reviews of clinical studies concerning metformin use on breast cancer in Table 4, both therapeutic and preventive effect were reviewed here.Table 4Literature review of clinical studies concerning metformin use on breast cancerStudy designMetformin doseT2DMPopulationSample sizeAge (years)OutcomesReferencesClinical studies of the treatment effect of metformin on breast cancerRCT, Phase III850 mg b.i.d for 5 yearsNoAmerican Indian or Alaska Native (0.5%)ER/PgR−:Median (range)ER/PgR−: not significantGoodwin et al. [55]Case: 1268/control: 1265Case: 51 (25–74)DFS:HR = 1.01 (95% CI 0.84–1.21)Asian (2.8%)OS:HR = 1.10 (95% CI 0.86–1.41)Control: 52 (23–74)Black or African American (4.3%)Hispanic (4.9%)ER/PgR+:Case: 52 (25–74)ER/PgR+: not significantCase: 556/control: 560DFS:HR = 1.01 (95% CI 0.79–1.30)Native Hawaiian or Pacific Islander (0.4%)OS:HR = 0.89 (95% CI 0.64–1.23)Control: 53 (25–74)White non-Hispanic (85.7%)RCT, Phase II1000 mg b.i.d for 1.5 yearsNoEgyptianCase: 36/control: 38Mean (± SD)Not significantBarakat et al. [5]Case: 49.14 ± 11.22PCR:OR = 2.429 (95% CI 0.662–8.914)Control: 47.13 ± 10.53ORR:OR = 1.912 (95% CI 0.655 –5.585)CCR:OR = 3.269 (95% CI 0.921–11.606)RCT, Phase II850 mg b.i.d for 6 weeksPartialChineseCase: 41/control: 35Case: ≤ 50 (42.0%), > 50 (58.0%)Not significantHuang et al. [56]tpCR (P = 0.777)Control: ≤ 50 (40.5%), > 50 (59.5%)bpCR (P = 0.956)Clinical response (P = 0.930)RCT, Phase II850 mg b.i.d for 151 daysNoCanadianCase: 22/control: 17Median (range)Not significantPimentel et al. [57]Case: 55 (39–75)PFS:HR = 1.2 (95% CI 0.63–2.31)Control: 57 (41–73)OS:HR = 1.68 (95% CI 0.79–3.55)RCT, Phase II1000 mg b.i.d for 39.6 monthsNoItalianHER2−:Case: ≤ 50 (26.0%), > 50 (74.0%)Not significantNanni et al. [58]Case: 57/control: 65PFS:HR = 1.09 (95% CI 0.75–1.58)Control: ≤ 50 (21.0%), > 50 (79.0%)OS:HR = 0.81 (95% CI 0.50–1.30)ORR (P = 0.901)RCT, Phase II1000 mg b.i.d for 6.3 monthsNoBlack or African American (9%)HR+, HER2−:Median (range)Median PFS: 6.3 months (95% CI 3.8–11.3 months)Yam et al. [59]White non-Hispanic (91%)2257.2 (37.6–70.5)Median OS: 28.8 months (95% CI 17.5–59.7 months)RCT, Phase II500 mg b.i.d until endpointNoEgyptianCase: 57/control: 50Mean (± SD)Not significantEssa et al. [60]Case: 49.56 ± 12.53RR: P = 0.205Control: 48.40 ± 12.61PFS: P = 0.753Case–control observational studyNot mentionedYesBelgiumHR+:case: ≤ 50 (13.08%), > 50 (86.92%)Signficant in HR + groupSonnenblick et al. [61]Case: 136/control: 95DFS:HR+:HR = 0.46 (95% CI 0.24–0.89);HR−:HR = 0.99 (95% CI 0.53–1.87)HR−:Control: ≤ 50 (18.82%), > 50 (81.18%)DFS:HR+:HR = 0.29 (95% CI 0.14–0.63);Case: 124/control: 91HR−:HR = 1.05 (95% CI 0.51–2.14)OS:HR+:HR = 0.27 (95% CI 0.10–0.71);HR−:HR = 1.09 (95% CI 0.48–2.47)Cohort studyNot mentionedPartialAustralian6717Mean (± SD)SignificantFeng et al. [62]66.8 (± 9.8)Each 1-year adherence to metformin reduces cancer-specific mortality: adjusted HR = 0.95 (95% CI 0.93–0.97)Retrospective studyNot mentionedYesKoreanCase: 11,490/control: 22,265Case: ≤ 65 (70.6%), > 65 (29.4%)OS:HR = 0.83 (95% CI 0.73–0.94);Kim et al. [63]Control: ≤ 65 (68.8%), > 65 (31.2%)Retrospective studyNot mentionedPartialChineseCase: (diabetic) 312/control (non-diabetic): 3139SignificantHui et al. [64]Case: ≤ 55 (41.7%), > 55 (58.3%)OS:HR = 0.386 (95% CI 0.248–0.601)Control: ≤ 55 (67.3%), > 55 (32.7%)DFS:HR = 0.384 (95% CI 0.247–0.598)Retrospective studyNot mentionedYesFinnish3165Median (range)Not significantHosio et al. [65]72 (64–79)HR= 0.92 (95% CI 0.64–1.31)Retrospective studyNot mentionedPartialEgyptianCase: 25/control (diabetic): 14/control (non-diabetic): 400Median (range)SignificantEl-Benhawy et al. [66]Case: 55 (36–75)DFS: compared with diabetic control group: P = 0.0001; compared with non-diabetic control group: P = 0.0249Control (diabetic): 53 (43–64)OS: compared with diabetic control group: P = 0.0032; compared with non-diabetic control group: P = 0.0350Control (non-diabetic): 53 (33–65)Retrospective studyNot mentionedYesKoreanCase: 202/control: 184Median (range)SignificantKim et al. [67]Case: 55 (± 10.5)Higher metastasis risk in diabetic control group: HR= 5.37 (95% CI 1.88–15.28)Control: 59 (± 10.2)Higher breast cancer death in control group: HR= 6.51 (95% CI 1.88 to 15.28)Observational studies of the prevention effect of metformin on breast cancerProspective studyNot mentionedYesNon-Hispanic white: case: (69%); control: (86%)Case: (diabetic)111/control (non-diabetic): 1800Mean (± SD)Not Significant in overall breast cancer risk (HR= 0.98; 95% CI 0.83–1.15)Non-Hispanic black: case: (18%); control: (8%)Case: 58.2 ± 8.2Significant in ER + Park et al. [68]Other: case: (13%); control: (7%)Control: 55.1 ± 8.9HR= 0.86; (95% CI 0.70–1.05) ≥ 10 years metformin use: HR 0.62 (95% CI 0.38–1.01)Case–control observational studyNot mentionedYesWhite: case: (80.58%); control: (65.60%)Case: 690/control: 2747Mean (± SD)SignificantBlack: case: (7.54%); control: (10.74%)Case: 70.06 ± 5.00 > 500 mg/day metformin use had 39% lower odds of HR + /HER2- breast cancer (OR = 0.61, 95% CI 0.46–0.82)Chikermane et al. [69]Asian: case: (5.22%); control: (11.47%)Control: 69.92 ± 4.84Hispanic: case: (2.17%); control: (7.10%)Other: case: (4.49%); control: (5.10%)RCT, randomized clinical trial; T2DM, type 2 diabetes; SD, standard deviation; OR, odds ratio; CI, confidential interval; PFS, progression-free survival; DFS, disease-free survival; ORR, objective response rate; OS, overall survival; HR, hormone receptor/hazard ratio; tpCR, total pathological complete response; bpCR, pathological complete response in the breast; ER, estrogen receptor; PgR, progesterone receptor Table 4Literature review of clinical studies concerning metformin use on breast cancerStudy designMetformin doseT2DMPopulationSample sizeAge (years)OutcomesReferencesClinical studies of the treatment effect of metformin on breast cancerRCT, Phase III850 mg b.i.d for 5 yearsNoAmerican Indian or Alaska Native (0.5%)ER/PgR−:Median (range)ER/PgR−: not significantGoodwin et al. [55]Case: 1268/control: 1265Case: 51 (25–74)DFS:HR = 1.01 (95% CI 0.84–1.21)Asian (2.8%)OS:HR = 1.10 (95% CI 0.86–1.41)Control: 52 (23–74)Black or African American (4.3%)Hispanic (4.9%)ER/PgR+:Case: 52 (25–74)ER/PgR+: not significantCase: 556/control: 560DFS:HR = 1.01 (95% CI 0.79–1.30)Native Hawaiian or Pacific Islander (0.4%)OS:HR = 0.89 (95% CI 0.64–1.23)Control: 53 (25–74)White non-Hispanic (85.7%)RCT, Phase II1000 mg b.i.d for 1.5 yearsNoEgyptianCase: 36/control: 38Mean (± SD)Not significantBarakat et al. [5]Case: 49.14 ± 11.22PCR:OR = 2.429 (95% CI 0.662–8.914)Control: 47.13 ± 10.53ORR:OR = 1.912 (95% CI 0.655 –5.585)CCR:OR = 3.269 (95% CI 0.921–11.606)RCT, Phase II850 mg b.i.d for 6 weeksPartialChineseCase: 41/control: 35Case: ≤ 50 (42.0%), > 50 (58.0%)Not significantHuang et al. [56]tpCR (P = 0.777)Control: ≤ 50 (40.5%), > 50 (59.5%)bpCR (P = 0.956)Clinical response (P = 0.930)RCT, Phase II850 mg b.i.d for 151 daysNoCanadianCase: 22/control: 17Median (range)Not significantPimentel et al. [57]Case: 55 (39–75)PFS:HR = 1.2 (95% CI 0.63–2.31)Control: 57 (41–73)OS:HR = 1.68 (95% CI 0.79–3.55)RCT, Phase II1000 mg b.i.d for 39.6 monthsNoItalianHER2−:Case: ≤ 50 (26.0%), > 50 (74.0%)Not significantNanni et al. [58]Case: 57/control: 65PFS:HR = 1.09 (95% CI 0.75–1.58)Control: ≤ 50 (21.0%), > 50 (79.0%)OS:HR = 0.81 (95% CI 0.50–1.30)ORR (P = 0.901)RCT, Phase II1000 mg b.i.d for 6.3 monthsNoBlack or African American (9%)HR+, HER2−:Median (range)Median PFS: 6.3 months (95% CI 3.8–11.3 months)Yam et al. [59]White non-Hispanic (91%)2257.2 (37.6–70.5)Median OS: 28.8 months (95% CI 17.5–59.7 months)RCT, Phase II500 mg b.i.d until endpointNoEgyptianCase: 57/control: 50Mean (± SD)Not significantEssa et al. [60]Case: 49.56 ± 12.53RR: P = 0.205Control: 48.40 ± 12.61PFS: P = 0.753Case–control observational studyNot mentionedYesBelgiumHR+:case: ≤ 50 (13.08%), > 50 (86.92%)Signficant in HR + groupSonnenblick et al. [61]Case: 136/control: 95DFS:HR+:HR = 0.46 (95% CI 0.24–0.89);HR−:HR = 0.99 (95% CI 0.53–1.87)HR−:Control: ≤ 50 (18.82%), > 50 (81.18%)DFS:HR+:HR = 0.29 (95% CI 0.14–0.63);Case: 124/control: 91HR−:HR = 1.05 (95% CI 0.51–2.14)OS:HR+:HR = 0.27 (95% CI 0.10–0.71);HR−:HR = 1.09 (95% CI 0.48–2.47)Cohort studyNot mentionedPartialAustralian6717Mean (± SD)SignificantFeng et al. [62]66.8 (± 9.8)Each 1-year adherence to metformin reduces cancer-specific mortality: adjusted HR = 0.95 (95% CI 0.93–0.97)Retrospective studyNot mentionedYesKoreanCase: 11,490/control: 22,265Case: ≤ 65 (70.6%), > 65 (29.4%)OS:HR = 0.83 (95% CI 0.73–0.94);Kim et al. [63]Control: ≤ 65 (68.8%), > 65 (31.2%)Retrospective studyNot mentionedPartialChineseCase: (diabetic) 312/control (non-diabetic): 3139SignificantHui et al. [64]Case: ≤ 55 (41.7%), > 55 (58.3%)OS:HR = 0.386 (95% CI 0.248–0.601)Control: ≤ 55 (67.3%), > 55 (32.7%)DFS:HR = 0.384 (95% CI 0.247–0.598)Retrospective studyNot mentionedYesFinnish3165Median (range)Not significantHosio et al. [65]72 (64–79)HR= 0.92 (95% CI 0.64–1.31)Retrospective studyNot mentionedPartialEgyptianCase: 25/control (diabetic): 14/control (non-diabetic): 400Median (range)SignificantEl-Benhawy et al. [66]Case: 55 (36–75)DFS: compared with diabetic control group: P = 0.0001; compared with non-diabetic control group: P = 0.0249Control (diabetic): 53 (43–64)OS: compared with diabetic control group: P = 0.0032; compared with non-diabetic control group: P = 0.0350Control (non-diabetic): 53 (33–65)Retrospective studyNot mentionedYesKoreanCase: 202/control: 184Median (range)SignificantKim et al. [67]Case: 55 (± 10.5)Higher metastasis risk in diabetic control group: HR= 5.37 (95% CI 1.88–15.28)Control: 59 (± 10.2)Higher breast cancer death in control group: HR= 6.51 (95% CI 1.88 to 15.28)Observational studies of the prevention effect of metformin on breast cancerProspective studyNot mentionedYesNon-Hispanic white: case: (69%); control: (86%)Case: (diabetic)111/control (non-diabetic): 1800Mean (± SD)Not Significant in overall breast cancer risk (HR= 0.98; 95% CI 0.83–1.15)Non-Hispanic black: case: (18%); control: (8%)Case: 58.2 ± 8.2Significant in ER + Park et al. [68]Other: case: (13%); control: (7%)Control: 55.1 ± 8.9HR= 0.86; (95% CI 0.70–1.05) ≥ 10 years metformin use: HR 0.62 (95% CI 0.38–1.01)Case–control observational studyNot mentionedYesWhite: case: (80.58%); control: (65.60%)Case: 690/control: 2747Mean (± SD)SignificantBlack: case: (7.54%); control: (10.74%)Case: 70.06 ± 5.00 > 500 mg/day metformin use had 39% lower odds of HR + /HER2- breast cancer (OR = 0.61, 95% CI 0.46–0.82)Chikermane et al. [69]Asian: case: (5.22%); control: (11.47%)Control: 69.92 ± 4.84Hispanic: case: (2.17%); control: (7.10%)Other: case: (4.49%); control: (5.10%)RCT, randomized clinical trial; T2DM, type 2 diabetes; SD, standard deviation; OR, odds ratio; CI, confidential interval; PFS, progression-free survival; DFS, disease-free survival; ORR, objective response rate; OS, overall survival; HR, hormone receptor/hazard ratio; tpCR, total pathological complete response; bpCR, pathological complete response in the breast; ER, estrogen receptor; PgR, progesterone receptor Literature review of clinical studies concerning metformin use on breast cancer RCT, randomized clinical trial; T2DM, type 2 diabetes; SD, standard deviation; OR, odds ratio; CI, confidential interval; PFS, progression-free survival; DFS, disease-free survival; ORR, objective response rate; OS, overall survival; HR, hormone receptor/hazard ratio; tpCR, total pathological complete response; bpCR, pathological complete response in the breast; ER, estrogen receptor; PgR, progesterone receptor Discussion In addition to its well-established role in reducing persistently high plasma glucose and insulin levels, metformin stands out as a promising candidate for the prevention and treatment of malignant tumors. Recent years have witnessed the promising efficacy of metformin in the management of several types of cancer. However, clinical outcomes have been inconsistent [5, 20, 21]. To optimize the anti-tumor effect of metformin, researchers have focused on the underlying mechanisms for decades. As previously mentioned, numerous pathways and mediating molecules connecting metformin to its effects on cancer have come to light. These include the activation of AMPK-related pathways [22, 23], the promotion of apoptotic cell death in cancer cells [24, 25], and the inhibition of mitochondrial metabolism [26, 27]. These mechanistic studies have shed light on the pivotal role of metformin in cancer therapy and the regulatory pathways involved. Their findings hold significant promise for advancing future clinical management and pharmaceutical development in the field of cancer treatment. There is a growing focus on investigating the genetic aspects of metformin's role in cancer treatment. In this study, we employed MR analysis to uncover the genetically predicted connections between metformin usage and the risk of common cancers. Unlike traditional clinical studies, MR analysis offers several advantages. It helps eliminate the influence of irrelevant confounding factors and environmental exposures, mitigates the impact of reverse causality, and enhances the strength of evidence for causal inference [28]. As a result, MR analysis stands as a relatively reliable and cost-effective method, leveraging global genome databases to advance our understanding of the relationship between metformin and cancer risk. Several MR studies have demonstrated the genetic influence of metformin on a variety of diseases. For instance, Zhou et al.'s MR analysis examined the relationship between metformin use and lung cancer risk, finding no genetic causality between the two, a result consistent with our own findings [29]. Modest genetic associations were also reported in the context of breast cancer and prostate cancer [30]. Notably, the MR study on breast cancer encompassed overall, estrogen receptor (ER)-positive, and ER-negative subtypes, yielding results congruent with our research. Beyond cancers, the causal role of metformin on other diseases has been assessed as well. Zhang et al. reported the protective causal relationship between metformin targets and osteoarthritis, highlighting AMPK and GDF-15 as promising targets for osteoarthritis treatment [31]. However, GDF-15 as a therapeutic target of metformin might increase the risk of gallstone disorders [32]. Given metformin's multiple drug targets, which cannot be simplified into one or two specific targets, the accuracy of drug target MR analysis for explaining its therapeutic effects may be limited. The relationship between sex hormone levels and breast cancer is indeed intricate and has been the focus of extensive research. A comprehensive review study, encompassing 44 breast cancer research studies, revealed that the risk of breast cancer increased with the use of oral contraceptives [33]. Furthermore, this risk was positively correlated with the duration of oral contraceptive use, shedding light on the association between estrogen and progestogen and the prevalence of breast cancer [34]. Testosterone, another sex hormone, also plays a significant role in the development of breast cancer. Evidence from a case–control analysis within the European Prospective Investigation into Cancer and Nutrition cohort established a link between elevated blood testosterone concentrations and an increased incidence of breast cancer (OR: 1.73, 95% CI: 1.16 to 2.57; P value: 0.01) among premenopausal individuals [35]. Similar findings have been reported by researchers from various countries [36–38]. Moreover, two-sample MR studies conducted by UK scientists underscored the potential impact of sex steroid hormones on breast cancer risk, These studies pointed out that testosterone and bioavailable testosterone could elevate the risk of both overall and estrogen receptor-positive (ER-positive) breast cancer [39, 40]. These findings align closely with our own research, solidifying the notion of a robust association between testosterone levels and breast cancer risk. Remarkably, our current study unveiled a novel finding, demonstrating that metformin has the potential to reduce the risk of HER-positive (HER+) breast cancer, and this reduction is partially mediated through its impact on total testosterone levels. The testosterone reduction effect of metformin has been observed in previous reports [41, 42]. Some clinical trials have administrated metformin on non-diabetic breast cancer women, ending with a significant reduction of both insulin and testosterone levels [43, 44]. Furthermore, metformin primarily lowered estradiol levels by diminishing testosterone levels, and these hormonal alterations may hold relevance in certain clinical contexts. This underscores the multifaceted effects of metformin on hormonal regulation and its potential implications in breast cancer prevention and treatment. Our study boasts several notable strengths. To our knowledge, this is the first study figuring out the genetic effect of metformin use on multiple prevalent cancer risks. And the mediators on the genetic pathway were clarified, and their mediating effects were calculated. Moreover, the genetic information incorporated in this study is giant, which increases the credibility of the conclusion. While our study presents valuable insights, it's important to acknowledge its limitations. First, to ascertain the consistency of genetic background, this MR analysis only concluded European populations, which could not be extended to other ethnicities. Second, MR analysis of tumors with a small number of instances was less accurate (fewer than 1000). For the validation analysis, more genetic data from large samples need to be added. The association between metformin use and other malignancies cannot be determined at this time; however, this will be clarified in follow-up research. Conclusion The current MR study revealed that metformin use could genetically shield individuals from HER-positive breast cancer, which was mediated by total testosterone levels. Further investigation is required to determine whether metformin-induced changes in total testosterone levels could potentially serve as a predictor or biomarker in HER-positive breast cancer development and progression. Supplementary Information Additional file 1. Table S1: SNPs associated with metformin use, which performed as instrumental variants (IVs) in two-sample MR analysis. Table S2: The genetic effect obtained from MVMR analysis. TT: total testosterone levels. Fig. S1: Scatter plots and funnel plots of metformin use on HER-positive breast cancer. A Scatter plots of the genetic association between metformin use and HER-positive breast cancer. The genetic predicted metformin use is associated with a lower risk of HER-positive breast cancer. The slope of each line shows the estimated causal effect of metformin use on HER-positive breast cancer for each approach. B Funnel plots showing the statistical association between metformin use and the risk of HER-positive breast cancer. Fig. S2: Leave-one-out analysis and Forest plots results. A Leave-one-out analysis of sensitivity test. After one by one eliminating the IVs, calculate the MR outcomes for the remaining IVs. B Forest plot of the causal effects of metformin use associated SNPs on HER-positive breast cancer. B Showed the Mendelian randomization estimated effects sizes for metformin use on HER-positive breast cancer. Fig. S3: Leave-one-out analysis result of metformin use on total testosterone levels. Fig. S4: Leave-one-out analysis result of total testosterone levels on HER-positive breast cancer. Fig. S5: Scatter plot of metformin use on total testosterone levels. Fig. S6: Scatter plot of total testosterone levels on HER-positive breast cancer. Fig. S7: Forest plot of metformin use on total testosterone levels. Fig. S8: Forest plot of total testosterone levels on HER-positive breast cancer. Fig. S9: Funnel plot of metformin use on total testosterone levels. Fig. S10: Funnel plot of total testosterone levels on HER-positive breast cancer. Additional file 1. Table S1: SNPs associated with metformin use, which performed as instrumental variants (IVs) in two-sample MR analysis. Table S2: The genetic effect obtained from MVMR analysis. TT: total testosterone levels. Fig. S1: Scatter plots and funnel plots of metformin use on HER-positive breast cancer. A Scatter plots of the genetic association between metformin use and HER-positive breast cancer. The genetic predicted metformin use is associated with a lower risk of HER-positive breast cancer. The slope of each line shows the estimated causal effect of metformin use on HER-positive breast cancer for each approach. B Funnel plots showing the statistical association between metformin use and the risk of HER-positive breast cancer. Fig. S2: Leave-one-out analysis and Forest plots results. A Leave-one-out analysis of sensitivity test. After one by one eliminating the IVs, calculate the MR outcomes for the remaining IVs. B Forest plot of the causal effects of metformin use associated SNPs on HER-positive breast cancer. B Showed the Mendelian randomization estimated effects sizes for metformin use on HER-positive breast cancer. Fig. S3: Leave-one-out analysis result of metformin use on total testosterone levels. Fig. S4: Leave-one-out analysis result of total testosterone levels on HER-positive breast cancer. Fig. S5: Scatter plot of metformin use on total testosterone levels. Fig. S6: Scatter plot of total testosterone levels on HER-positive breast cancer. Fig. S7: Forest plot of metformin use on total testosterone levels. Fig. S8: Forest plot of total testosterone levels on HER-positive breast cancer. Fig. S9: Funnel plot of metformin use on total testosterone levels. Fig. S10: Funnel plot of total testosterone levels on HER-positive breast cancer.