Along with a handful of traders at smallish firms, Goldman’s securities lending unit has been cited by regulators for lapses. In 2010, the S.E.C. sued Goldman on accusations that it “willfully” had failed to preborrow shares as required for its short-selling clients in January 2009, shortly after Copper River went out of business. The improprieties involved 385 short sales in which the firm had not located shares for its brokerage clients to borrow.

Goldman paid $450,000 to settle the case without admitting or denying the accusations.

Failing to borrow shares on behalf of customers is illegal because of concerns about market manipulation. But it can also leave a brokerage firm’s client who is short a stock dangerously exposed to an escalating price in the shares. If a stock shorted by an investor began to trade higher and the shares were not borrowed, closing out the transaction would require the fund to buy them in the open market. That could propel the already rising price of the shares even higher, adding to the costs of the trade.

Mr. Cohodes, who worked at the hedge fund for 25 years, testified in the Overstock case because his firm had placed short bets on that Internet company’s shares during the mid-2000s. In 2005 Overstock sued Copper River for stock manipulation, seeking $1 billion in damages. Copper River denied the accusations but settled the matter in late 2009, paying $5 million.

In his Overstock testimony, Mr. Cohodes described Goldman’s role as the primary brokerage firm used by Copper River from 2004 through October 2008. Goldman conducted many of Copper River’s trades and was relied upon to locate all the shares the firm needed to borrow before it bet against companies.

According to Mr. Cohodes’s deposition, Copper River often sold short shares that were hard to locate for borrowing purposes and therefore extremely costly. As such, Copper River paid Goldman handsomely to make sure its trades complied with securities laws, Mr. Cohodes testified. He was unhappy about these fees, he said, but assumed that they were the cost of doing business and that Goldman was charging the market rate for following the rules.

“I view stock loan sort of as the Mafia,” Mr. Cohodes said in his deposition. “It’s a black box where you don’t know people’s inputs and costs, and it was sort of: ‘Here’s the rate. If you want to borrow it, this is the rate.’ And it is what it is.”

As an investor, Mr. Cohodes had long expected a stock market correction to result when the overheated mortgage market finally cooled. By mid-2008 he had put on sizable bets against companies that he thought would suffer in such a rout, he testified. One was American Capital, an investment company; others were the Open Text Corporation, a company that offers intranet applications, and Jos. A. Bank, a men’s clothing store.