So remember how we wondered whether Frank DiPascali was getting enough from the feds for his cooperation in the investigation in Bernie Madoff's scam?

Well, it turns out that part of his deal is having the feds overlook his history of taking illegal drugs, carrying an illegal firearm right up until the time of his arrest and reporting that he had no income during a year when he earned $4 million.

The New York Post's Kaja Whitehouse reports:

According to documents released yesterday by federal prosecutors, DiPascali, the former CFO at Madoff's investment firm, agreed to spill the beans about Madoff in part to guarantee the feds didn't go after him on "use of controlled substances prior to 1992" and for possessing illegal firearms up until last Friday.

The 52-year-old Queens native, who is cooperating with prosecutors in the Madoff scandal, is also avoiding criminal prosecution for evading taxes, the documents show.

Indeed, DiPascali cheated Uncle Sam out of several million dollars between 2002 and 2007 through a number of shady schemes, including depositing his income into accounts under other names and filing false returns. In 2006, for example, DiPascali reported zero dollars in taxable income even though he actually earned $4 million that year. He also reported no income in 2002 and 2005.