Lending Workflow Overview
Lending Workflow Overview
Side defines a liquidity pool-based lending protocol that provides loans to BTC holders and generates returns for loan providers. The loan assets are pooled in smart contracts on the Side Chain and offered to borrowers without involving any third party holding the collateral during the loan period. At a high level, the protocol proceeds as follows:
Loan Assignment
To initiate the loan process, the borrower submits a request to the Lending Contract, including a specified Maturity Time. Upon receipt, the Lending Contract assigns a dedicated Collateral Vault for the borrower, which will be used to lock the BTC collateral.
The Lending Contract then computes the applicable interest rate and liquidation price, derived from real-time BTC market data. It subsequently reserves the corresponding loan amount from the available liquidity pool for the borrower.
To claim the loan, the borrower must deposit BTC into the assigned Collateral Vault and submit two pre-signed CETs to the Lending Contract. The first CET enables liquidation in the event that the BTC collateral falls below the defined liquidation threshold. The second CET is executed in the case of loan default, i.e., if the borrower fails to repay by the maturity date.
In parallel, the DCM pre-signs a third CET. This CET is executed only upon verified loan repayment and facilitates the release of the collateral back to the borrower.
Once the CETs are verified and the collateral funding transaction is confirmed on Bitcoin, the borrower receives the loan on the Side Chain.
Repayment
To avoid default liquidation, the borrower must repay the loan before the Maturity Time. Upon repayment, a repayment transaction is sent to the Lending Contract covering both principal and interest.
Event Signers attest to the repayment and publish a signature on the Side Chain. Using this attestation, anyone can reveal the corresponding CET adaptor signature and broadcast it on the Bitcoin network to release the collateral back to the borrower.
Liquidations
Collateral may be liquidated in two cases: if the BTC price drops below the liquidation threshold or if the borrower fails to repay by the Maturity Time.
In both scenarios, Event Signers publish attestations that unlock pre-signed CETs, allowing the DCM to take custody of the collateral.
The DCM then sells the BTC at market value, repays the loan to the pool, and returns any surplus to the borrower.
Final Timeout
A final_timeout protects the Borrower in the event that the Lending Contract or Side Chain becomes unresponsive.
In the following sections, we will provide more details of each step involved in the lending process as outlined above.
Last updated