No modern bank is complete without a large credit card franchise. It's an incredibly profitable business if managed correctly, as an examination of Bank of America's (BAC 3.35%) financial filings reveals.

The primary appeal of credit cards to a lender like Bank of America are the multiple streams of revenue the business generates, starting with the act of lending itself.

Because credit card loans aren't secured by identifiable collateral akin to a home mortgage, and because the standards to qualify for a credit card are easier for the average person to meet, the loans themselves tend to be riskier than other consumer and commercial loans.

In this year's stress tests, the Federal Reserve estimated that credit card loans should generally be expected to default at more than twice the rate of other types of bank loans. It projected that 13.1% of the typical credit card portfolio would be lost under a severely adverse economic scenario akin to the financial crisis of 2008-09. First-lien mortgages, by contrast, were forecast to default at a rate of only 3.6% under the same set of economic assumptions.

This sounds ominous, but it isn't innately bad. Banks cut their teeth managing risk. They borrow money at low and often short-term interest rates and then assume the risk of lending that money out to borrowers. The riskier the loan, the higher the rate charged.

In the latest quarter, Bank of America's domestic credit card loans yielded an average annual interest rate of 9.08%. Meanwhile, it costs the $2.2 trillion bank an average of only 0.81% to fund the credit card loans. With a total outstanding credit card portfolio approaching $100 billion, that equates to a significant amount of net revenue for the nation's second biggest bank by assets.

Further sweetening the pot are the fees charged to cardholders. There are annual account fees, over-the-limit fees, late fees, and most importantly so-called interchange fees.

All told, Bank of America assessed $1.44 billion in credit card fees in the second quarter alone. This was fueled by the addition of 1.3 million new accounts as well as a 10% sequential increase in the amount of money its customers spent on their cards -- purchasing volume matters because banks get a small slice of every transaction processed.

This isn't to say the credit card business is foolproof. From 2008 to 2010, Bank of America charged off over $70 billion worth of credit card loans that defaulted in the wake of the financial crisis. Combined with the tens of billions of dollars' worth of losses in its mortgage business, this nearly sunk the North Carolina-based bank.

"In the boom we pushed cards through the branches and in mass mailings," CEO Brian Moynihan told Fortune's Shawn Tully in 2011. "To drive growth we gave cards to people who couldn't afford them."

But assuming that Bank of America learned its lesson – which, of course, will only be clear once the economy takes a turn for the worse -- then its large credit card franchise should offer a beachhead from which to grow consolidated revenue and gain market share in the years and decades ahead.