Discrete Logarithm Contracts (DLC) are an advanced smart contract technology based on Bitcoin Layer 1 that enables Bitcoin to interact with off-chain data securely and efficiently. This innovative approach allows the creation of financial contracts that depend on external events, which is essential for implementing complex DeFi functions directly on the Bitcoin blockchain.

 

DLCs ​​ensure the verifiability and enforceability of contract outcomes by using adapter signatures, provided that specific conditions provided by an oracle are met. In Shell Finance, this powerful technology forms the core of the lending protocol’s liquidation module.

 

What is DLC?

 

DLC is a cryptographic technology that uses adapter signatures to create programmable financial contracts on Bitcoin. The core function of DLC is to allow Bitcoin to securely utilize off-chain data provided by oracles, which are trusted entities that provide external information such as market prices, weather data, or sports scores. This integration enables Bitcoin to perform complex operations that usually require more flexible execution environments such as Ethereum.

 

Application of DLC in Shell Finance

 

In Shell Finance, DLC is used as the core technology of the loan agreement liquidation mechanism. This application ensures that the management of mortgage loans is transparent and secure, using off-chain data to determine the status of each loan position. Here is how DLC is used in practice:

 

  1. Loan Origination:When a user initiates a loan by pledging Bitcoin inscription assets (such as Ordinals, Runes, Atomicals, and Stamps), Shell Finance calculates the loan amount based on the collateral value and the current market price provided by the oracle. Then a DLC contract is set up to initialize a secret value for future liquidation scenarios.

  2. Loan Adjustments: During the life of a loan, users can adjust their collateral or debt amount. Each adjustment recalculates the collateralization ratio using real-time data from oracles, ensuring the loan is always properly collateralized. The DLC is updated accordingly to reflect any changes.

 

  1. Liquidation: The most critical application of DLC in Shell Finance is in the liquidation process. DLC allows for automatic liquidation of positions if the collateral value falls below the required minimum collateral ratio (MCR). The specific operations are as follows:

    1. The price update provided by the oracle shows that the collateral value has fallen below the liquidation threshold.

    2. This triggers the disclosure of the secret value within the DLC, enabling the protocol to perform liquidation.

    3. The assets were then auctioned off in a Dutch auction, with the proceeds used to repay the debt, and any excess added to Shell Finance's insurance fund.

Actual operation

 

In a real-world scenario, assume that a user has pledged 100 $ORDI to borrow $BTCX. The following steps outline the DLC-driven liquidation process:

  1. Monitoring: The oracle continuously monitors the market price of $ORDI.

  2. Triggering liquidation: If the price drops below 225,000 SATS/ORDI, the oracle signals the protocol.

  3. Execute liquidation: The secret value is revealed and the DLC signature required for liquidation is completed.

  4. Auction: The collateral is auctioned and the proceeds are used to repay the debt and any liquidation penalties.

 

By combining DLC ​​with oracle technology, Shell Finance ensures a trustless and automated liquidation process, improving the security and efficiency of its lending operations. This innovative application of Bitcoin's Layer 1 function sets a new standard for DeFi protocols, bringing complex financial services directly to the Bitcoin network.