Bitcoin Contracts

Discreet Log Contracts (DLCs) are a contract protocol in Bitcoin where two or more parties agree to exchange money depending on the outcome of a certain event as determined by an oracle. A DLC stores bitcoin collateral of the borrower, and it is designed in a way that it’s impossible to steal funds from it.

This is the design for the Bitcoin Contract which will store user’s bitcoin collateral.

Bitcoin collateral can either be sent back to the original sender, or sent to ThorChain for a swap with USDC which will be sent back to liquidity contracts. Both transactions require signatures from both the client and operators. Client signs the liquidation transaction, and operators sign the collateral claim transaction. Now, either client can come up with the secret whose hash is equal to h, and claim collateral back, or operators can liquidate collateral. Operators can unilaterally liquidate collateral, but economically it won’t make sense. To do so, they’ll have to reveal a secret “secretLiq”. All liquidated funds are swapped for USDC, and locked for 3 days. Borrower can extract “secretLiq” and use it to claim liquidated USDC on the Ethereum L1 within 3 days, using Chainlink pricefeeds, the contract can check if LTV is healthy and liquidation was unnecessary. If liquidation is deemed unnecessary, the borrower not only receives their collateral back, but a heavy chunk of operators' slashed stake redirected to them. Operators get heavily penalised for unnecessary liquidation.

Once a user is ready to pay the loan back, they can send their funds back to an intermediary contract as shown above. This contract locks the funds for 24 hours, and can release funds after 24 hours back to the original sender if no activity takes place. Operators can claim funds from this intermediary contract by revealing a secret. Once this secret is revealed, clients can sign the collateral claim transaction, and use the secret to release their bitcoin collateral.

Last updated