New York CNN Business  — 

America’s largest banks are set to earn hundreds of millions of dollars in fees paid out by the federal government under its Paycheck Protection Program, according to S&P Global.

The loan program is designed to help smaller American businesses survive the coronavirus recession, and was part of Washington’s $2 trillion economic stimulus package.

But the program has come under intense scrutiny in recent days after the Small Business Administration disclosed that the loans have been doled out not only to mom-and-pop businesses but also to billionaires like Kanye West, large chain restaurants and Washington lawmakers.

The S&P analysis found that more than 30 community banks could earn as much from emergency small-business loans as they reported in net revenue for all of 2019.

JPMorgan Chase (JPM), America’s biggest bank, issued the most PPP loans out of any bank, processing $28.8 billion of loans as of June 20, according to S&P. That could yield the bank more than $800 million in fees. Bank of America (BAC) was the second biggest issuer at $25.2 billion.

Smaller banks — those with assets under $250 million — also stand to get a significant windfall.

“It could be enormously profitable for us, maybe the most profitable thing we’ve done,” according to Rick Wayne, president and CEO of Northeast Bank, a community bank with nine branches in Maine that also handles commercial loans nationwide. The bank stands to collect $9.8 million in fees from PPP loans, according to S&P.

Fees range from 1% to 5%, depending on the loan.

While the optics of profiting from the misfortune that is the pandemic recession may look bad, proponents of the program say America’s banks have been a lifeline for businesses during a devastating downturn.

The Covid-19 pandemic forced America’s companies to shutter and lay off millions of workers during the height of the lockdown. As the economy reopens, many businesses still need help to survive the significant decline in revenues.

Federal Reserve Vice Chairman Randal Quarles called banks “a source of strength during this crisis” in a statement on the Fed’s stress test results two weeks ago.

Unlike during the 2007-2009 financial crisis, banks are in better shape to weather the current storm, the Fed said.