Fannie Mae (NASDAQOTH:FNMA) and Freddie Mac (NASDAQOTH:FMCC) earned a very impressive profit of about $10.2 billion in the first quarter of 2014.

Thanks to their bailout arrangement, 100% of this amount goes straight into the pockets of the U.S. Treasury.

While the Treasury deserves to be compensated for its bailout of both companies during the financial crisis, don't the shareholders deserve some of the profits as well? After all, these are people who put their faith in businesses that were left for dead and have now returned to profitability, so it makes sense they want a cut.

However, it's looking pretty unlikely they'll see anything and may even get wiped out altogether. Congress is actively trying to wind down both agencies, and unless the shareholders are successful in forcing a change of the arrangement, they will be entitled to nothing if and when it happens.

That's quite a rebound
For the first quarter; the Treasury is receiving $10.2 billion in profit from Fannie and Freddie. These two companies that looked like they were down for the count have now posted their ninth consecutive quarterly profit. If you recall, when the bailouts were originally given to the companies, there was a lot of opinion that the government would never see that money again.

However, Fannie Mae has now paid the Treasury back $126.8 billion, more than the $116.1 billion in borrowed, and Freddie Mac has now returned $86.3 billion to taxpayers for their $71.3 billion "investment". Now that the Treasury has been made whole on their bailout, shareholders are screaming louder than ever that now is the time to share some of the profits.

Several ways investors can lose
If Congress succeeds in its attempts to wind down Fannie and Freddie; it's entirely possible that current shareholders could be left with nothing. In fact, under the current Senate bill, 100% of the proceeds from selling Fannie and Freddie's assets would go straight into the pockets of the U.S. Treasury. Even the preferred shareholders would be left with nothing.

Not surprisingly, the shareholders aren't thrilled about the possibility of their investments being wiped out. Fannie and Freddie's shares were trading for less than one-tenth of their current value until a little over a year ago, so a lot of people are sitting on some pretty impressive gains they really don't want to see get wiped out.

Led by hedge fund managers Bill Ackman and Bruce Berkowitz, shareholders have filed a lawsuit to try and change the current arrangement. Basically, they say investors were "duped" by the government, who allowed shares to continue to trade, and now are illegally taking profits from shareholders who took the risk and bought shares.

In addition, there is a movement to stop the attempted winding down of the companies in its tracks.

Stay and play, or walk away?
Sure, if the investors happen to win the lawsuit, it could mean a very nice payday. According to Ackman, who owns about 10% of both companies, the shares could have a long term value of between $23 and $47, and that's factoring in the Treasury's stake.

Now, I know the Treasury pocketing all of the profits isn't fair to shareholders. Not even close. If the government wanted shareholders to get nothing, they shouldn't have let the stock trade on the open market after taking control of the companies.

Whether the government's actions are right or wrong, I have to think now might be a good time for investors to get out.

Look, the potential for a huge gain from the current share price might make it very tempting to stick with Fannie and Freddie, but you're gambling your entire investment on the outcome of a shareholder lawsuit and congressional action working out in your favor.

This just doesn't seem like a risk worth taking to me.

Matthew Frankel has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.