(TMZ) -- Lil Pump's still a minor, but he's on track to become a millionaire before he can legally drink ... TMZ has learned.

According to the 17-year-old "Gucci Gang" rapper's record contract with Warner Bros., he got a fat $345k advance on his debut album, and that doesn't even include his 15 percent royalties.

Judging by the success of the record -- which also features tracks like "Boss" and "D Rose" -- it's safe to say he'll be making another album, which means another hefty advance between $200k and $400k. Again, plus royalties.

There are a few conditions he has to meet -- such as having at least 14 tracks per album -- but if he keeps cranking out huge hits he'll rake in up to $500k for his fifth album. And don't forget the royalties, too.

Pump's also got some added kickers in his contract -- like a cut of his merchandise sold in chain stores -- so his huge fan base makes his wallet even fatter.

Now that's Boss.

**WARNING: Explicit language**

Photo: Getty Images