LIQUIDITY AND CAPITAL RESOURCES
Liquidity measures the ability of the Company to meet maturing obligations and its existing commitments, to withstand fluctuations in deposit levels, to fund its operations, and to provide for customers' credit needs. The Company monitors liquidity risk through contingency planning stress testing on a regular basis. The Company seeks to avoid over-concentration of funding sources and to establish and maintain contingent funding facilities that can be drawn upon if normal funding sources become unavailable. One source of liquidity is cash and short-term assets, such as interest-bearing deposits in other banks and federal funds sold, which averaged $73.2 million during the second quarter of 2022 and $73.5 million during the first six months of 2022. The Company's on balance sheet liquidity position can fluctuate based on short-term activity in deposits and loans.
The subsidiary banks have a variety of sources of short-term liquidity available to them, including federal funds purchased from correspondent banks, FHLB advances, wholesale structured repurchase agreements, brokered deposits, lines of credit, borrowing at the Federal Reserve Discount Window, sales of securities AFS, and loan/lease participations or sales. The Company also generates liquidity from the regular principal payments and prepayments made on its loan/lease portfolio, and on the regular monthly payments on its securities portfolio.
At June 30, 2022, the subsidiary banks had 28 lines of credit totaling $485.9 million, of which $15.1 million was secured and $470.8 million was unsecured. At June 30, 2022, the full $485.9 million was available.
At December 31, 2021, the subsidiary banks had 31 lines of credit totaling $517.7 million, of which $61.7 million was secured and $456.0 million was unsecured. At December 31, 2021, the full $517.7 million was available.
The Company has emphasized growing the number and amount of lines of credit in an effort to strengthen this contingent source of liquidity. Additionally, the Company maintains a $50.0 million secured revolving credit note with a variable interest rate and a maturity of June 30, 2023. At June 30, 2022, the full $50.0 million was available.
As of June 30, 2022, the Company had $608.6 million in average correspondent banking deposits spread over 189 relationships. While the Company believes that these funds are relatively stable, there is the potential for large fluctuations that can impact liquidity. Seasonality and the liquidity needs of these correspondent banks can impact balances. Management closely monitors these fluctuations and runs stress scenarios to measure the impact on liquidity and interest rate risk with various levels of correspondent deposit run-off.
Investing activities used cash of $146.8 million during the first six months of 2022, compared to $143.4 million for the same period of 2021. The net decrease in interest-bearing deposits at financial institutions was $38.0 million for the first six months of 2022, compared to a net increase of $844 thousand for the same period of 2021. Proceeds from calls, maturities, and paydowns of securities were $42.3 million for the first six months of 2022, compared to $110.9 million for the same period of 2021. Purchases of securities used cash of $134.7 million for the first six months of 2022, compared to $108.6 million for the same period of 2021. Proceeds from sales of securities were $111.4 million for the first six months of 2022, compared to $23.9 million for the first six months of 2021. The net increase in loans/leases used cash of $314.7 million for the first six months of 2022 compared to $171.0 million for the same period of 2021.
Financing activities provided cash of $148.1 million for the first six months of 2022, compared to $104.9 million for same period of 2021. Net decreases in deposits totaled $178.7 million for the first six months of 2022, compared to net increases in deposits of $89.8 million for the same period of 2021. During the first six months of 2022, the Company's short-term borrowings increased $2.7 million, compared to a decrease in short-term borrowings of $1.6 million for the same period of 2021. There were no long-term FHLB advances during the first six months of 2022 and 2021. There were no maturities and principal payments on FHLB term advances in the first six months of 2022 and 2021. Net increase in overnight advances totaled $385.0 million for the first six months of 2022. In the first six months of 2021, the Company increased overnight FHLB advances by $25.0 million. Prepayment of subordinated notes totaled $5.0 million during the first six months of 2021. Repurchase and cancellation of shares totaled $37.4 million in the first six months of 2022, as compared to $4.8 million in the first six months of 2021.