18 days light period?

I’ve been on 500mg of metformin for about a month, got my first period under 40 days 2 weeks into taking it on the 10th, then got (what I’m assuming is) my period again today.. 18 days later? What’s goin on? Just hormones regulating body resetting??