Elon Musk speaks on stage during the Westworld Featured Session during SXSW at Austin Convention Center on March 10, 2018 in Austin, Texas.

Short sellers betting against Tesla made more than half a billion off the stock's slide on Friday.

After a bizarre video showing CEO Elon Musk smoking pot on a podcast surfaced and a pair of C-level executives resigned, those betting against the company raked in $510 million in mark-to-market profits as Tesla fell more than 5 percent price, according to estimates from Ihor Dusaniwsky, S3's head of predictive analytics.

Despite recent gains amid Musk's antics, Tesla short sellers were still in the red for the year until Friday. Bets they've made against the carmaker as a group, which have drawn the ire of Musk, are now profitable for 2018.

The firm found that since Aug. 7, when Musk tweeted "funding secured," shorts have made back $3.7 billion in profits on Tesla's 22.5 percent slide. S3 Partners recently developed a website devoted to following Tesla and Wall Street's long and short positions on the stock at shortingtesla.com.

Musk appeared on comedian Joe Rogan's podcast smoking marijuana and sipping whiskey Thursday evening. The nearly three-hour interview did nothing to ease concerns about his reported recreational drug use.

The following morning, Tesla announced that its chief accounting officer, Dave Morton, had resigned. Morton, who had only been at the company for one month, cited the public attention as a reason for the departure. The company's HR boss Gaby Toledano reportedly won't return from a leave of absence she took last month, according to Bloomberg.

Short seller Andrew Left of Citron Research said this week he is suing the company and its CEO for violating federal securities laws after Musk tweeted in August about taking Tesla private.

Musk claimed at the time that funding for that effort had been "secured" — which was bad news for short sellers.