In the blue corner, we have Joe Nocera and Henry Blodget (twice). In the red corner, there’s The Epicurean Dealmaker (twice), with The Analyst as cornerman. The debate centers on the fact that the shares LinkedIn sold Thursday are worth hundreds of millions of dollars more than LinkedIn received from its bankers. To Nocera and Blodget, the conclusion is clear: LinkedIn’s bankers screwed the company out of that money, giving it instead to their favored buy-side clients.

There’s no doubt that investment bankers deliberately underprice IPOs. Blodget explains why:

If underwriters aimed to price each IPO exactly at fair-market value, there would be no incentive for institutions to take the risk of buying the stock before the shares started trading. Instead, they’d just wait to see where the stock traded and then make their buying decision then.

In the case of an oversubscribed IPO like LinkedIn, this isn’t completely convincing — getting a large allocation of shares at once is preferable to having to taking your chances with respect to being able to cobble together a significant position in the secondary market. After all, as TED says, the banks “want to weight the initial buyers in the deal toward investors who intend to not only hold the stock after it frees to trade but also add to their positions in the aftermarket”.

But the bankers don’t only want to place stock with high-quality long-term investors; they also want to achieve one of the main purposes of going public in the first place, which is price discovery. For that, you need a substantial volume of buyers — and sellers — all day every day for years and decades to come.

In other words, it’s the market which sets the price of the stock; it’s the job of the bankers to bring the company to market. And the bankers only have room for error in one direction. They can underprice the IPO; in fact, they have to underprice the IPO by some amount. But they can’t set the price too high.

Now the view of Nocera and Blodget is that the bankers can or should have a very good idea where the shares are going to end up trading, and that therefore if they end up underpricing the IPO by as much as we saw on Thursday, that’s unprofessional at best and downright theft at worst. Nocera says that the LinkedIn bankers “absolutely must have known” that the IPO was going to double in price; Blodget says that “Wall Street underwriters are paid massive amounts of money to estimate fair-market value, so they deserve to be held accountable when they blow it.”

I agree with Blodget’s premise here, but I come to a different conclusion. The whopping 7% fee that banks charge for an IPO is indeed a very large sum of money; if markets were remotely efficient, that fee would be much smaller, closer to the kind of fees normally seen on bond issuances, which can be less than 0.2%. Or, you can consider the 7% fee to be the cost of a guarantee that the company will get analyst coverage from the lead managers for the foreseeable future, rather than the price of market expertise which costs much less in other contexts.

In any event, I disagree with Blodget and Nocera that the banks knew what was going to happen when LinkedIn went public, and generously gifted hundreds of millions of dollars to their clients rather than giving 93% of that sum to LinkedIn and keeping the rest for themselves.

For one thing, if the large 7% fee does anything, it aligns the banks’ interests with the issuer’s. If the banks felt they could make millions more dollars for themselves just by raising the offering price, it’s reasonable to assume that they would have done so. I’m sure that the institutions which were granted IPO access are grateful to the banks for the money they made, but that gratitude isn’t worth a ten-figure sum to the ECM divisions of the banks in question.

But there’s an even easier way to prove that the banks didn’t know what was going to happen on IPO day. Which bank, after all, is the greediest and most knowledgeable of them all? Goldman Sachs. And Goldman was one of the few investors which sold its entire position at the IPO price of $45 per share. If Wall Street knew that LinkedIn was going to soar into triple digits on day one, you can be quite sure that Goldman would have held on to most if not all of those shares.

This, then, looks much more like a cock-up than a conspiracy. If the banks knew that they could get the IPO away at $80 per share and still see a 15% pop, they would surely have done so. But they didn’t know that, because LinkedIn was the first social-networking company to go public, and therefore no one — on either the buy side or the sell side — really had a clue where the public markets would end up valuing it.

And indeed it’s not entirely clear that the banks could have gotten the IPO away at $80 per share. The way that the LinkedIn IPO worked, the shares were issued at $45 to investors who were happy to hold them at that level; those investors then started selling when the first-day pop reached insane proportions. At $80 per share, however, very few of those investors would have been happy to hold on to the stock for the long term — which means they wouldn’t have put in bids in the first place. The banks might well have had serious difficulty even allocating the shares in the first place, and would have been risking a busted IPO.

What’s more — and this is a point which, weirdly, neither TED nor The Analyst have made — bankers and investors actually had a very good idea what the market price for LinkedIn shares was. It was $35 per share. LinkedIn was the fourth-most-traded stock on SecondMarket, with an auction every month from April 2010 through March 2011. In January there was a significant pop to $34 per share, and then it stayed there: in February the auction cleared at $35, and in March it was the same amount.

Yes, the LinkedIn prices were arrived at with only a small number of buyers and sellers, but they were real market prices in an anonymized market; pricing well above the SecondMarket level was always going to be dangerous. The bookbuilding process is vague and error-prone compared to the hard numbers being generated on a monthly basis on private markets, and so bankers were naturally going to trust SecondMarket as a very important datapoint in their pricing decisions. If LinkedIn had priced well below the SecondMarket price and then popped up to exactly that level, then it would have been easy to criticize the bankers. But instead it priced at a 30% premium to the highest-ever SecondMarket price — which was pretty aggressive, I think.

The SecondMarket story also shows that auctions often don’t work very well. There’s a 50-page paper here explaining all the reasons why that might be, especially when it comes to initial public offerings. But this is an important point: the Noceras and Blodgets of this world are very quiet on the question of whether there’s a better way of doing things than the one we’ve got right now.

Auctions have been tried, in many markets and jurisdictions around the world, and they’ve always failed; attempts to improve them have been unsuccessful, largely because it’s pretty much impossible for underwriters to distinguish between investors who have done their homework and know exactly how much they want to pay, on the one hand, and free-riders who add a lot of noise to proceedings, on the other, who trust in the former group to get the pricing right. On top of that, the mathematics of the winner’s curse means that bidders have to be extremely sensitive to the number of other bidders in the auction — and that is a number they’re unlikely to know.

And yet I’m not completely on board with the people who think that everything’s fine. Consider the point is made by The Analyst, that the only people complaining, here, seem to be kibitzers in the press. The bankers, the sellers, and the buyers are all happy — so what’s not to love? Here I think Nocera and Blodget are on stronger ground, because of the slightly invidious way in which IPOs are set up.

Essentially, there are two types of stock sale, generally known as primary and secondary, although “secondary”, in particular, can have different meanings. What I’m talking about here is the distinction between primary offerings, where a company sells shares in itself; and secondary offerings, where shareholders sell stock to each other. Rights issues are primary offerings, even if they’re not IPOs, while a founder selling stock in the market would be considered a secondary offering, even though such activities are generally done very quietly.

The LinkedIn IPO was, like most IPOs, mainly a primary offering — LinkedIn itself sold most of the shares, and received most of the proceeds. Insofar as those shares were underpriced, LinkedIn was the victim. Now LinkedIn is owned by many shareholders, who can be considered victims proportionally to the number of shares that they own. If I own 1% of LinkedIn, and the company left $200 million on the table, then $2 million of that money can be considered mine.

But the fact is that if I own 1% of LinkedIn, and I just saw the company getting valued on the stock market at a valuation of $9 billion or so, then I’m just ecstatic that my stake is worth $90 million, and that I haven’t sold any shares below that level. The main interest that I have in an IPO like this is as a price-discovery mechanism, rather than as a cash-raising mechanism. As TED says, LinkedIn has no particular need for any cash at all, let alone $300 million; if it had an extra $200 million in the bank, earning some fraction of 1% per annum, that wouldn’t increase the value of my stake by any measurable amount, because it wouldn’t affect the share price at all.

In that sense, the extra $200 million, while having a huge amount of value to the lucky investors who got to buy in at the IPO price, is actually worth very little to LinkedIn’s shareholders. If markets were wondrously efficient, that $200 million in cash would be reflected in a share price being $2 higher. In reality, the people buying the shares at this level really don’t care how much money LinkedIn has in the bank — especially now that it has a much stronger acquisition currency, should it want to start buying other companies, in its own stock.

As a result, almost none of the “losers”, here, bar LinkedIn’s corporate treasurer, really cares about that money. LinkedIn’s shareholders care about the share price, and the amount of money that LinkedIn has is irrelevant to the share price. LinkedIn’s managers and executives care about the fundamental business, not about trying to manage a cash pile which was already very large and is now significantly larger. The only real losers are the investors in Goldman Sachs’s fund — I suspect they’re rightly very angry about the company’s decision to divest itself of its entire stake at $45 per share.

Meanwhile, the big winners — the funds given access to the IPO — are ecstatic. But those funds did nothing, really, to deserve their windfall. Early-stage investors in the company were taking big risks and locking up their money for years; the people who got IPO allocations were taking no risk at all and locking up their money for, oh, a few minutes.

It would be wonderful if there were a better, fairer way of running IPOs, which didn’t give Wall Street banks the power to make millions of dollars overnight for their well-connected friends. But many attempts have been made to find such a way, and none of them have really caught on.

And here’s where SecondMarket could come in handy. Companies wanting to go public could simply lift most of the restrictions on who can buy and sell company stock on SecondMarket, SharesPost, and other private exchanges — including any restrictions limiting the number of shareholders to less than 500. At that point, under SEC rules, the company would be making a clear statement that it intended to have a fully-fledged listing the following year. It could file an S1, and maybe release some shares of its own onto the private markets just to improve liquidity and price discovery.

Then, a few months later, the company would officially sign up with Nasdaq or the NYSE, and let its shares be listed, possibly in conjunction with another tranche of newly-issued shares coming to market at the same time. Because a large number of shares had already been trading in a quasi-public market for months, there probably wouldn’t be nearly as much room for pricing error as there is now. There needn’t even be a big official IPO; that would be up to the company and its bankers.

Many companies, of course, love seeing their name splashed across the Corinthian columns of the NYSE, and having their executives ring some bell or other to celebrate their listing. All that pomp and ceremony is worth something — as is the press coverage which comes with it. A fairer way of going public would necessarily mean that IPOs would become much less momentous events. Which is why I suspect that we’ll stick with the old-fashioned way for the time being. Even if it means dumping hundreds of millions of dollars into the laps of investors who really don’t deserve it.