If you're one of the millions of Americans suddenly underwater on your mortgage, then you can certainly relate to the pain being inflicted by borrowing base redeterminations on small oil and gas companies today.

Small-cap exploration and production companies (E&Ps), unable to tap the debt market as easily as a hulk like XTO Energy (NYSE:XTO), tend to lean heavily on bank borrowings. These credit facilities go by many names, but the structure is pretty uniform. There's a syndicate of banks -- sometimes upwards of 25 lenders -- each of which ponies up a small piece of the borrowing pie. The banks determine a "borrowing base" by looking at the E&P's reserves and discounted future cash flows, and this provides the basis for the facility's maximum commitment. As with other forms of debt, there are various financial covenants intended to restrict the borrower from becoming too bloated. Pioneer Natural Resources, for example, has to keep its total debt to adjusted capitalization ratio below 60%, and Range Resources (NYSE:RRC) agrees to keep its current ratio above 1.0.

Breaking the piggy bank
Like many homeowners, E&Ps lived beyond their means over the past few years, and their capital budgets routinely exceeded operating cash flows. Bank borrowings helped to cover the cash flow gap. Now, aside from challenging economics, a major motivation for E&Ps to dramatically cut their capex in 2009 is to free up cash flow to pay down these bank lines and increase liquidity.

Borrowing base redeterminations makes the situation doubly dire for some overleveraged outfits. As you may have guessed from the name, this is a periodic (often semi-annual) exercise in which the banks take a fresh look at the E&P's reserves and future expected commodity prices and make adjustments to the borrowing base if necessary.

In good times, E&Ps are usually able to ratchet their borrowing bases higher. EOG Resources (NYSE:EOG), for example, revised its revolving credit facility from $600 million to $1 billion in May of 2007. With oil and gas prices plunging, however, borrowing bases are now getting cut.

Who's playing with fire
For a company like McMoRan Exploration, which had an undrawn facility at year-end, the fact that the company expects a lower borrowing base coming out of its April redetermination isn't too serious. For PetroQuest (NYSE:PQ), which is now 100% drawn after a blow to its borrowing base, this is a serious strain. Other companies have it even worse, finding themselves overdrawn on a newly shrunken base, and having to repay the deficit within a limited period of time. At least one firm has been delisted from the NYSE after hitting such a solvency snag.

Some companies that are pretty heavily drawn on their bank revolvers have so far dodged a bullet. Mariner Energy (NYSE:ME), for example, just saw its borrowing base reaffirmed at $850 million. That was key because the firm is light on cash and nearly 80% drawn on its facility. Mariner didn't get off scot-free, however. Its interest rate got bumped up 1%, and the commitment fee on the unused portion of the facility is now more expensive as well. Further, its 17 lenders will need to be unanimous if they want to keep the borrowing base above $800 million at the next redetermination in August. That all but guarantees that the bank line is headed lower later this year.

Some companies are coming out of this process unscathed. Range Resources not only maintained its borrowing base, but avoided the fee and interest rate hikes hitting Mariner. Given its low-cost production and cash flow hedges, I feel fine about Range, despite its roughly 65% drawdown as of February. I'm even more comfortable with Southwestern Energy (NYSE:SWN), another skilled shale player that entered March with an untouched $1 billion credit line.

The Foolish bottom line
While redeterminations can spell havoc for overleveraged firms, they also open an opportunity for well-financed outfits. In order to stay on side of borrowing limits and financial covenants, distressed E&Ps are going to start putting a lot of properties on the market over the next few months. That fire sale to Chesapeake Energy (NYSE:CHK) was just the beginning, Fools. Avoid the distressed and stick with the best.

Chesapeake Energy is a Motley Fool Inside Value selection. Check out other stocks offering a monster margin of safety with a free 30-day trial.

Fool contributor Toby Shute doesn't have a position in any company mentioned. Check out his CAPS profile or follow his articles using Twitter or RSS. The Motley Fool has a disclosure policy.