XML 160 R116.htm IDEA: XBRL DOCUMENT v3.22.0.1
Commitments and contingencies - Activity in the Repurchase Reserve (Details) - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2021
Dec. 31, 2020
Dec. 31, 2019
Commitments and Contingencies [Roll Forward]      
Balance at beginning of period $ 5,928 $ 3,529 $ 3,273
Provision for loan repurchases or indemnifications (766) 2,607 362
Losses on loans repurchased or indemnified (360) (208) (106)
Balance at end of period $ 4,802 $ 5,928 $ 3,529