The funds we loan to traders for margin trading come from our own operating account.
Client funds cannot be lent for margin trading. See the Financial Security section on our Security Practices page.
The funds we loan to traders are protected from default by the system of Margin Call Level and Margin Liquidation Level.
The basic idea is that we will forcibly liquidate a trader's positions well before the point that the trader couldn't repay the loan from the remaining value of their positions together with their account balances. The system is designed so that it's very unlikely that a trader could get into a situation where they'd have to add funds to their account in order to repay a loan, and hence very unlikely that a trader could default on a loan.
For more information, see Leverage and Margin in the Trading Guide.