Hulk Hogan's best friend, Bubba the Love Sponge, not only secretly videotaped Hulk having sex -- he bragged afterwards that the tape was a goldmine that could be the key to Bubba's retirement.
TMZ has seen the last few minutes of Hulk's leaked sex tape -- in which he bangs Bubba's wife Heather Clem. It's very clear -- Bubba was in on it. Moments after the deed is done and Hulk leaves, Bubba says to his wife ... "If we ever did want to retire, all we'd have to do is use this footage."
His wife shoots back, "You'd never do that." Bubba then tries to recover, saying, "I wouldn't do that, you'd be the biggest rat, you'd be dead."
The revelation is interesting ... considering Hulk went on the Howard Stern show TODAY and said he and Bubba are still good friends -- and sounded confident Bubba was NOT the culprit.
There's more, TMZ just broke the story ... Hulk is filing a criminal police report in FL and trying to HUNT DOWN whoever leaked the tape -- claiming he was filmed illegally.