The party advancing money to a borrower at the closing table in exchange for a note evidencing the borrowers debt and obligation to repay. Retail, Wholesale, and Correspondent Lenders: Lenders who perform all the loan origination functions themselves are called 'retail lenders/' Lenders who have certain functions performed for them by mortgage brokers or correspondents are called 'wholesale lenders.' Many large lenders have both retail and wholesale divisions. Wholesale lenders will have different departments to deal with correspondent lenders and mortgage brokers. The division of functions is shown in the table on the next page. Correspondent lenders are typically small and depend on wholesale lenders to protect them against pipeline risk. A correspondent lender locks a price for a borrower at the same time as the correspondent locks with a wholesale lender. Mortgage Banks Versus Portfolio Lenders: Mortgage banks sell all the loans they make in the secondary market because they don't have the long-term funding sources necessary to hold mortgages permanently. They fund loans by borrowing from banks or by selling short-term notes, repaying when the loans are sold. Mortgage banks now dominate the U.S. market. Of the 10 largest lenders in 2002, nine were mortgage banks and only one was a portfolio lender. However, most of the large mortgage banks are affiliated with large commercial banks. Portfolio lenders include commercial banks, savings banks, savings and loan associations, and credit unions. They are sometimes referred to as 'depository institutions' because they offer deposit accounts to the public. Deposits provide a relatively stable funding source that allows these institutions to hold loans permanently in their portfolios. Mortgage banks often offer better terms on fixed-rate mortgages than portfolio lenders, while the reverse is more likely for adjustable rate mortgages. It would be a mistake to place too much reliance on this rule, however, because the variability within each group is very wide.