Your collateral will be returned to you automatically upon repayment. In a normal course of action you will receive an amount you posted less any applicable fees. In case when you as a borrower fail to repay the loan in time your collateral will be transferred to the lender to cover the loan amount, and you will receive any excess collateral after the deduction of loan amount and any applicable fees. The same procedure applies to margin call event e.g. the time when the value of your collateral falls below the critical level and becomes insufficient to cover the outstanding loan.