Bernie Sanders, the socialist senator from Vermont, is proving that railing against the capitalist system is a lucrative business, even if it undermines his relentless attacks on America’s wealthy.

Recent federal financial disclosures show Sanders is raking it in through his multiple book deals and political connections, with royalties and other “non-investment” income reaching nearly seven figures in both of the last two years.

Sanders’ 2017 Senate financial disclosure, filed in May 2018, shows the 2016 presidential candidate took in a total of more than $810,000 from two different book deals with Macmillan – St. Martin’s Press in New York City, one that netted a $505,000 advance against earnings and another for $306,000 in royalties.

According to a description of the agreements, one of the deals, inked in July 2016, involved a “contract with St. Martin’s Press to write ‘Our Revolution: A Future To Believe In’ that was published in November 2016.”

The other, signed in February 2017, is for a new book, “Where Do We Go From Here?” set for publication in “the fall of 2018.”

Sanders also disclosed other deals with different publishers for smaller amounts.

An August 2016 arrangement with Macmillan – Henry Holt and Company to write a book for young adults banked $63,750 in royalties, while a reboot of his 1990 book “Outsider in the White House” updated in 2016 brought in $5,341 from Verso Publications.

Sanders also made some cash off a small project with Todd R. Lockwood Works in Burlington, Vermont, and his wife, Jane, landed her own book deal with Macmillan – St. Martin’s Press as well, reported as an undisclosed amount worth more than $1,000.

It was a similar situation in 2016, when Sanders reportedly received nearly the same payouts for the same deals.

Sanders reported $795,000 from Macmillan – St. Martin’s Press, $63,750 from Macmillan – Henry Holt and Company, $6,734 from Verso Publications, and $2,520 from Todd Lockwood Works in calendar year 2016 – figures that were reported in June 2017.

The 2016 report shows Sanders also received an all-expenses paid book tour to promote “Our Revolution” in 18 cities across the country that was covered by Macmillan – St. Martin’s Press.

And while Sanders isn’t Nancy Pelosi-rich, he’s not exactly struggling like the poor folks he’s supposedly fighting to save from the greedy one percent. It’s impossible to tell exactly what Sanders is worth because loopholes in federal disclosures allow politicians to exempt things like the value of a primry residence or certain personal possessions. The reporting system also lets lawmakers report broad ranges for their assets, making it difficult to tell what they’re really worth. Most of Sanders’ money and assets are listed in Jane’s name.

What is for certain is Sanders’ financial forms shows he has between $150,000 and $350,000 in cash in the bank, and three different high-dollar homes. The residences include a $600,000 vacation home in Vermont’s swanky Champlain Islands, a half-million dollar row house three blocks from the Capitol, and a home in Burlington worth between $100,000 and $250,000.

To put it in perspective, Sanders’ book deals combined with his six-figure taxpayer funded salary amounts to about $1 million a year, or roughly 1700 percent more than the median household income of his constituents in Vermont.