Investors have been making a pretty penny on dollar stores, even as the Great Recession wanes, thanks to low-income shoppers who have learned to eat store-brand snack foods and mop their floors with generic polish to save money. But now that Wall Street has discovered how the 99% shops, dollar-store stocks are getting high-class prices -- maybe too rich for our blood.

After seeing the news of Dollar General's (NYSE: DG) secondary offering and the reports of Family Dollar's (NYSE: FDO) generally positive earnings report, a Foolish observer would feel it's time to start looking more critically at dollar stores in general. For growth investors, the dollar stores' best days may already be behind them. So much of their upside potential has been baked in already, that investors need to have a lot of faith that sales growth will continue at the same pace as before.

That's a big maybe, seeing the macro trends are beginning to turn against them, as seen in the recent drop in consumer confidence  and the increases in gas prices, which are always a shock to the system for the low-income households that make up the dollar stores' core customers.

These discount stores are still a good segment to put your dollar into, but beware that the markdowns are about to begin. The big dollar chains are seeing costs increase as they build up their brand-name offerings to play down the cheap-generic label, and the competition is stepping up the pressure. While their results are still good -- as seen in Family Dollar's better-than-expected second quarter -- and margins remain strong, the easy-money days may be behind them.

Citi's Deborah Weinswig dove into Family Dollar's results and noted that same-store sales (for stores open at least a year) were slightly below expectations and SG&A leverage was rising, partly because of higher advertising expense.

The competitive pressure -- and expense -- is only going to get worse. The discount category leaders are not going stand by for long and let the dollar stores eat their lunch. Both Target and Wal-Mart have been pushing the everyday-low-price buttons for the last year and keep expanding the food and health and beauty aisles. That's not just a shot against the food and drug retailers, but also the dollar stores. And their search for smaller stores in urban markets is another jab.

So, should you back away from Dollar General's secondary offering? No, it's still a solid buy, with a growing business. And in a note today, Weinswig suggested it could be a candidate for the S&P 500 index, which would force indexers to buy it, driving up the price. So it could work as a speculative play.

But with all the attention they've been getting, dollar store shares overall have been bid up to the point that they're no bargain going forward. You'd need to have a lot of faith that these companies can fight off the forces of competition and the economy to justify some pretty rich valuations.  

Dollar General priced its secondary offering at $45.25, a couple of dollars below its current trading price and not far from the consensus target of $45.33, as Fool Seth Jayson noted here. And the shares are now trading at a P/E ratio of 20, higher than that of Wal-Mart and the other big boxes.

Family Dollar has gotten a bit less attention, but it's also trading at a P/E of around 18. As fellow Fool John Maxfield noted here, it requires faith that the chain can grow earnings at a faster clip than the rest of the retail marketplace, which he rightly notes is a tall order. Even Dollar Tree (Nasdaq: DLTR), which has been more low-profile than the other two, is trading at at P/E of almost 24 -- a pretty rich valuation.

For now, the stocks look attractive in the short term, but if you're a long-term investor, you'd better  keep your fingers crossed that low-income shoppers don't get scared off by another downturn and that the middle-class shoppers that converted to dollar stores during the recession don't go back to name-brand shopping when times improve. And all that after paying full retail price for your purchase.

If you're into retail stocks, check out The Motley Fool's top stock for 2012. Its founder wrote the book on big-box retailing, and it's growing in increasingly important international markets. Click here for instant access to this free report.