Jake Rajs / Getty Images

Over the last year-and-a-half, several of the most prominent social media companies in the country have sold shares to investors in high-profile initial public offerings. Throughout the process, insiders at those companies, including venture capitalists, executives and early employees, were able to cash out to the tune of billions of dollars, in an epic financial windfall. For ordinary shareholders, however, investing in these newly-public social media giants hasn’t been as lucrative. Since going public — and following the insider cash-outs — Facebook shares have fallen by 43%, Zynga shares have plunged by 69%, and Groupon shares have plummeted by 72%. All three companies are now the subject of shareholder lawsuits.

The divergent fortunes of company insiders, who made billions, and ordinary shareholders, who have been left holding the bag, raise questions about the purpose, and indeed fairness, of the IPO process. One can take the cynical view that the entire game has been a rigged set-up, designed to enrich insiders at the expense of the investing public. To be fair, venture capitalists and early employees took big risks, and deserve to be rewarded — that’s part of what going public means. The IPO process is also designed to raise money from the public to fund business operations, and in that respect the offerings were successful: Facebook is sitting on over $10 billion in cash, while Zynga and Groupon are each holding over $1 billion. Finally, tech IPOs are not for the faint of heart, and investors should not expect much sympathy for bets gone sour — unless, of course, the SEC or a court finds there was securities fraud or other malfeasance.

(MORE: Do Facebook Ads Work?)

The grotesque contrast between the massive insider cash-outs at Facebook, Zynga and Groupon, and the abysmal performance of those company’s stocks, makes the IPO process — and by extension, U.S. capital markets — look bad. And that’s not good for anyone. Trust is essential for the effective functioning of our capital markets, and to the extent that investors think the process was rigged to benefit insiders, it feeds into a broader narrative about fairness in a U.S. economic system currently experiencing the largest wealth disparity in decades. Let’s take a look at the performance of three prominent social media IPOs, as well as the massive windfalls reaped by insiders. I want to be clear that there appears to be nothing illegal or even unethical about these stock sales, but they do illustrate how the process can generate massive wealth for insiders, even as regular shareholders face the prospect of dramatic stock declines.

Facebook: The social networking titan went public in May at a $100 billion valuation. Today, just three months later, the company is worth almost half that, despite the fact that the Nasdaq index — where Facebook went public — has increased almost 20% over that time. What’s wrong with this picture? During the IPO, Facebook insiders cashed-out to the tune of a staggering $10 billion, including (courtesy of Henry Blodget, still doing penance): Mark Zuckerberg, Facebook CEO: $1.14 billion; Accel Partners: $2.1 billion; Peter Thiel: $638 million; DST Global, $1.7 billion; Goldman Sachs: $923 million; Mail.ru Group: $745 million; and Tiger Global: $722 million. To be sure, most of these early investors still own Facebook stock, so their holdings have declined, like all shareholders. But the cold-hard cash they made by selling shares in the IPO has no doubt salved the distress caused by the stock’s plunge.

(MORE: How Low Can Facebook Go?)

Zynga: The Internet video game firm went public last December at a valuation of $10 billion. Today, the company is worth a mere $2.24 billion, down a shocking 69% from the IPO price. Back in April, with shares still above the IPO price, Zynga held a “secondary stock offering,” in which insiders sold over half-a-billion dollars worth of stock to the public — stock that is now worth a fraction of the offering price. The insiders (again, thanks to BI): Marc Pincus, Zynga CEO: $200 million; Institutional Venture Partners: $70 million; Union Square Ventures: $62 million; Google: $48 million; Silver Lake Partners: $48 million; and Reid Hoffman: $8.2 million. Again, these insiders are still big Zynga shareholders, but they certainly had the good timing to make hundreds of millions in profit at the stock’s peak price.

(MORE: Zynga Plunges 40% in Tech Bloodbath)

Groupon: The case of online deals company Groupon, which went public last November at a valuation of of nearly $13 billion, is a little different. (Groupon is now worth $4.8 billion, as its shares have fallen 72% since the IPO.) In Groupon’s case, company insiders cashed out to the tune of over $800 million, before the company even went public. In January 2011, Groupon raised $950 million in its last pre-IPO fund-raising round. Yet by the end of March 2011, the company only had $209 million in cash, as AllThingD‘s Peter Kafka reported at the time. So where did all the money go? Turns out that even as Groupon was losing money, the company was paying out huge cash windfalls to company insiders via stock purchases, including: Eric Lefkofsky, Groupon Chairman: more than $300 million; Samwer brothers: $170 million; and Rugger Ventures: $133 million.

(MORE: Groupon Faces SEC Probe, Investor Lawsuit as Stock Hits New Low)

If one didn’t know better, one might conclude that these insiders used the venture capital and IPO process to inflate their companies’ valuations and then turn them into personal piggy banks. Cash out early — and let ordinary shareholders deal with the fallout, which in each company’s case, has been the dramatic, even shocking, decline in each of the companies’ stock prices. Sure, most of these insiders have suffered large paper losses along with ordinary shareholders, but it’s hard to feel sorry for them after billions of dollars in cash-outs. (It’s worth noting that one social media firm, LinkedIn, is up 11% since going public after a hair-raising ride over the last year.)

The broader issue is a potential crisis of confidence in a crucial function of U.S. capital markets — the IPO process — if investors think the market is little more than a rigged casino where the house and insiders win — while they play the role of the suckers. What we’ve seen play out over the last 18 months has been nothing short of a multi-billion-dollar transfer of wealth from the investing public to Silicon Valley insiders, most of whom were already incredibly wealthy. Set aside the shareholder lawsuits and federal investigations. This IPO period should have been a triumphant moment for Silicon Valley and Wall Street; instead, it’s turned into an embarrassment.