The following table sets forth the composition of our Litigation-Related loans held for investment portfolio by type of loan at the dates indicated:
| | | | | | | | | | | | |
| | June 30, 2022 | | | December 31, 2021 | |
| | Amount | | Percent | | | Amount | | Percent | |
|
| | (Dollars in thousands) |
Litigation-Related Loans | | | | | | | | | | | | |
Commercial Litigation-Related: | | | | | | | | | | | | |
Working capital lines of credit | | $ | 195,224 | | 49.1 | % | | $ | 210,148 | | 54.4 | % |
Case cost lines of credit | | | 134,974 | | 34.0 | | | | 127,859 | | 33.1 | |
Term loans | | | 64,654 | | 16.3 | | | | 45,415 | | 11.8 | |
Total Commercial Litigation-Related | | | 394,852 | | 99.4 | | | | 383,422 | | 99.3 | |
Consumer Litigation-Related: | | | | | | | | | | | | |
Post-settlement consumer loans | | | 2,366 | | 0.6 | | | | 2,451 | | 0.7 | |
Structured settlement loans | | | 75 | | 0.0 | | | | 116 | | 0.0 | |
Total Consumer Litigation-Related | | | 2,441 | | 0.6 | | | | 2,567 | | 0.7 | |
Total Litigation-Related Loans | | $ | 397,293 | | 100.0 | % | | $ | 385,989 | | 100.0 | % |
At June 30, 2022, our Litigation-Related loans, which include commercial loans to law firms and consumer lending to plaintiffs/claimants and attorneys, totaled $397.3 million, or 46.2% of our total loan portfolio, compared to $386.0 million, or 49.2% of our total loan portfolio at December 31, 2021. We remain focused on prudently growing our Litigation-Related loan portfolio.
Securities. Securities available-for-sale decreased $25.7 million, or 17.3%, to $122.7 million at June 30, 2022 from $148.4 million at December 31, 2021, driven by unrealized losses of $14.4 million and paydowns of $12.9 million, offset by purchases of $1.7 million. Commencing in the first quarter of 2022, we invested a portion of our excess liquidity in held-to-maturity securities, totaling $76.3 million at June 30, 2022.
Funding. Total deposits increased $127.1 million, or 12.4%, to $1.2 billion at June 30, 2022 from $1.0 billion at December 31, 2021. We continue to focus on the acquisition and expansion of core deposit relationships, which we define as all deposits except certificates of deposit. Core deposits totaled $1.1 billion at June 30, 2022, or 98.4% of total deposits at that date, compared to $1.0 billion or 98.1% of total deposits at December 31, 2021. Of which, litigation and payment processing deposits represent 64% and 15%, respectively, of total deposits. Demand deposits (noninterest bearing) increased $103.8 million, or 25.4%, to $513.1 million, representing 44.4% of total deposits.
In addition to our core deposits as a source of funding, the Company continues to prudently manage its balance sheet through deposit sweep programs, maintaining off-balance sheet funds totaling $496.8 million at June 30, 2022.
At June 30, 2022, we had the ability to borrow a total of $157.1 million from the Federal Home Loan Bank of New York. We also had an available line of credit with the Federal Reserve Bank of New York discount window of $39.6 million. At June 30, 2022, we also had $67.5 million in aggregate unsecured lines of credit with unaffiliated correspondent banks. No amounts were outstanding on any of the aforementioned lines of credit at June 30, 2022.
Equity. Total stockholders’ equity increased $1.8 million to $145.5 million at June 30, 2022, from $143.7 million at December 31, 2021, primarily due to net income of $11.7 million and amortization of share based compensation of $1.1 million, partially offset by other comprehensive losses of $10.4 million due to the decline in fair value of available-for-sale securities reflective of the recent increases in short-term market interest rates and a common stock dividend of $727 thousand.
Asset Quality. Nonperforming assets, totaling $4 thousand, consisted of two nonaccrual consumer loans as of June 30, 2022. As of June 30, 2022, the allowance for loan losses was $10.3 million, or 1.20% of total loans, as compared to $9.1 million, or 1.16% of total loans at December 31, 2021. The increase in the allowance as a percentage of loans was related to qualitative factors due to the current economic and inflationary environment. At June 30, 2022, special mention