VeraSun Energy, the second-largest producer of corn-based ethanol in the United States has run out of money and filed for bankruptcy protection.

The South Dakota-based company said in a court filing on Monday that it wouldn't be able to make this week's payroll without help and also needs money to buy corn, natural gas, and pay its leases and other expenses.

Verasun lost $63m to $103m when attempting to hedge risks in the corn market, Bloomberg reports. This summer, VeraSun had agreed to purchase corn at a fixed price of $6.75 to $7 a bushel when Midwest flooding sent grain prices sky-rocketing.

But the flood damage wasn't as bad as anticipated, and combined with worldwide economic slowdown, corn futures settled back down to $4 a bushel.

The credit crisis also found VeraSun unable to secure funding needed to pay the interest on its debt.

"Today's filing allows VeraSun to address its short-term liquidity constraints as we navigate historically challenging market conditions while we focus on restructuring to address the company's long-term future," company CEO Don Endres said in a statement Friday.

In its SEC filing, VeraSun claims $3.45bn in assets and $1.91bn in debt.

Ethanol investments gained much of its legitimacy when the uber-nerd himself, Bill Gates bought a $84m stake in Pacific Ethanol in 2006. But the former Microsoft chief later started selling off the shares, taking a big financial hit to get the hell out of Dodge. ®