Changes in our operating assets and liabilities were principally affected by (i) an increase to R$117.1 million in trade receivables in the year ended December 31, 2021, from R$79.5 million in changes in trade receivables in the year ended December 31, 2020, primarily as a result of the increase in enrolled students and the expansion of our operations; and (ii) a decrease in change of labor and social obligations to a negative R$1.8 million in the year ended December 31, 2021, from R$7.3 million in the year ended December 31, 2020, as a result of the postponement of the due date of tax and social charges obligations by the federal government in the year ended December 31, 2020 during the COVID-19 pandemic which were not extended to the year ended December 31, 2021.
Investing Activities
Our net cash flows provided by (used in) investing activities varied to cash provided by investing activities of R$2,162.1 million in the year ended December 31, 2022, from net cash provided by investing activities of R$100.0 million in the year ended December 31, 2021, primarily as a result of the payments for the acquisition of interests in subsidiaries, net of cash obtained, and the impact from the consolidation of UniCesumar’s results of operations into our own. In addition, we recorded payments for the acquisition of interests in subsidiaries of R$2,291.7 million in the year ended December 31, 2022, an increase of R$2,163.9 million, or 1,693.2%, compared to R$127.8 million in the year ended December 31, 2021.
Our net cash flows provided by (used in) investing activities varied to cash provided by investing activities of R$100.0 million in the year ended December 31, 2021, from net cash used in investing activities of R$610.3 million in the year ended December 31, 2020, primarily due to R$286.1 million in proceeds from the sale of short-term investments to repay indebtedness. In addition, we recorded payments for the acquisition of interests in subsidiaries of R$127.8 million in the year ended December 31, 2021, an increase of R$10.6 million, or 9.0%, compared to R$117.2 million in the year ended December 31, 2020.
Financing Activities
Our net cash flows provided by (used in) financing activities varied from net cash provided by financing activities of R$2,012.2 million in the year ended December 31, 2022 compared to cash used in financing activities of R$175.4 million in the year ended December 31, 2021, primarily due to our issuance on May 15, 2022, of two series of debentures, the first series containing 500 bonds maturing between November 2023 and May 2024, and the second series containing 1,450 bonds maturing between May 2025 and May 2027. See “—Indebtedness” for more information.
Our net cash flows provided by (used in) financing activities varied from net cash used in financing activities of R$175.4 million in the year ended December 31, 2021 compared to cash provided by financing activities of R$617.9 million in the year ended December 31, 2020, primarily due to the R$150.0 million in repayments of the loan agreement we entered into with Banco Santander (Brasil) S.A. in October 2021, and to the fact that we received proceeds from our initial public offering in the year ended December 31, 2020 but not in the year ended December 31, 2021.
Indebtedness
As of December 31, 2022, 2021 and 2020 our total consolidated indebtedness was R$2,450.9 million, R$311.3 million and R$576.0 million, respectively, of which (i) zero, zero and R$151.8 million, respectively, consisted of a loan agreement with Banco Santander (Brasil) S.A.; (ii) R$507.4 million, R$149.8 million and R$274.9 million, respectively, were payables from the acquisition of subsidiaries; and (iii) R$323.3 million, R$161.5 million and R$149.4 million, respectively, were lease liabilities.
Acquisitions of our Subsidiaries, including UniCesumar
On May 20, 2022, we closed our business combination with UniCesumar. The closing purchase price (subject to certain post-closing adjustments) amounted to R$3.21 billion, payable as follows: (i) 65.9% in cash on the closing date; (ii) 17.0% in stock through the issuance of 7,182,385 new common shares (5,144,383 common shares issued and delivered on the closing date and 2,038,002 common shares to be withheld for a specified term as an indemnification guarantee); and (iii) 16.0% in cash, to be paid 12 months after the closing date (subsequently extended to 24 months), as