Shell Finance: Why are we building a trustless lending protocol on Bitcoin Layer 1?

Shell Finance
2024-04-02 12:40:14
Collection
Shell Finance is the first permissionless lending protocol built on the Bitcoin layer. It is also the first DeFi project on the Runes protocol, supporting protocol assets such as Ordinals, BRC-20, Atomicals, Runes, and Stamps, providing instant liquidity unlock and delivering substantial native DeFi yields for users.

A Billion Dollar Opportunity: BiFi = DeFi + NFTFi

In blockchain networks, the core of each layer of applications is built to capture the liquidity value from the previous layer as much as possible.
Ethereum, as a public blockchain platform with smart contract functionality, established the ERC-20 token standard based on smart contracts since its inception in 2015:

  • Innovators are not only satisfied with simple asset trading; to capture the liquidity value of native tokens like $ETH and the rapidly emerging ERC-20 tokens, a large number of excellent DeFi projects such as DEX, Stablecoin, and Lending have emerged.
  • Similarly, the ERC-721 market, which has accumulated a large amount of funds, has also given rise to numerous NFTFi projects such as Lending and Fractional.

As a peer-to-peer electronic currency system, the Bitcoin network was originally designed for the convenient transfer of $BTC among users, with innovative applications like the Lightning Network based on this single cryptocurrency asset. This situation changed with the emergence of Ordinals-related assets:

  • The popularity of inscriptions provides a great opportunity to activate the liquidity value of the vast funds in the Bitcoin network. The emergence of inscription protocols and assets has attracted a large amount of off-chain funds and Bitcoin holders.
  • The inscription market will also not be satisfied with simple asset trading; a large number of BeFi (Bitcoin Finance) projects are needed to provide users with quality leverage and lending scenarios.


The inscription market includes fungible token standards (BRC-20, ARC-20, SRC-20, etc.) as well as Ordinals NFTs, Bitmaps, and other non-fungible token standards. Because the underlying logic of these token standards derives from Ordinals, their trading paradigms and liquidity characteristics are very similar, with a highly overlapping user base. Therefore, when we discuss BiFi (Bitcoin Finance), the market scope it covers includes the entire inscription market, which has rapidly grown into a multi-billion dollar market.
Due to the uniqueness of the Bitcoin network, existing infrastructure and applications on other layer networks cannot be quickly migrated. Therefore, the BeFi infrastructure (including DEX, Stablecoin, Lending, etc.) in the Bitcoin ecosystem is still severely lacking. The emergence of Shell Finance is expected to fill the gap in trustless stablecoin and lending markets, becoming an important piece of the new BTC ecosystem.

BiFi: Continuation of Bitcoin Standard

To better capture the value of assets in the upper network, the design of protocols and applications should align with user habits in the upper network.
Ethereum, by its design as a smart contract platform, has a highly diverse user base, with the differences between new and old users leading to the coexistence of two major user groups: coin-based and USDT-based. Even so, the vast majority of NFT projects still use ETH as the base currency. Due to this community culture and user habits, NFTFi projects almost always continue to adopt ETH-based pricing thinking to lower the barrier to user acquisition.
In contrast, the Bitcoin network is a single-asset network, and the user base is highly uniform. In other words, in the world created by Bitcoin, value is measured solely by Bitcoin itself. Because of this coin-based pricing inertia, even now, with the booming inscription market, the pricing method for inscriptions still adopts BTC-based (Satoshi-based) standards. Therefore, the pricing logic of inscription BeFi projects needs to respect this highly overlapping user habit. This is also the fundamental reason why Shell Finance chooses $BTCx, a synthetic asset anchored to BTC value, as its pricing standard. Additionally, from an engineering implementation perspective, using BTC-based pricing allows the entire business process to operate entirely according to the transfer method of the native token without introducing new system complexities.

Integrating the Advantages of Peer-to-Peer and Peer-to-Pool Lending

In the cryptocurrency lending market, the two most common matching methods are:

  • Peer-to-Peer: In peer-to-peer lending, bilateral participants, borrowers, and lenders directly pair with each other. When the demand parameters align, the lending relationship can occur.
  • Peer-to-Pool: In peer-to-pool lending, it allows users to lend and borrow assets without needing to trust a third party. Lending platforms provide the cost of borrowing funds to borrowers while offering interest incentives to lenders based on liquidity and market conditions.

Clearly, Peer-to-Peer lending protocols are relatively inefficient. Both borrowers and lenders need time and effort to find suitable counterparties and offers. Additionally, the liquidity of the bilateral lending market is fragmented, making it difficult to precisely match user needs. In the Bitcoin network, due to the stateless nature of the UTXO model, there is no concept of accounts and balances on-chain, making it impossible to implement programmable state data like Ethereum smart contracts. Peer-to-Pool lending, which can be easily implemented on Ethereum, cannot be simply applied to the Bitcoin network.
How to achieve the efficient characteristics similar to Peer-to-Pool based on the UTXO model is a problem that Shell Finance aimed to solve from the beginning. The core of solving this problem lies in introducing vaults as the unit for each lending transaction, allowing the protocol to connect the borrower and lender markets, thus constructing a unique Peer-to-Protocol lending structure:

Through this design, in the borrower market, the protocol establishes independent lending relationships with each lending position to meet diverse borrowing needs; at the same time, it actively maintains the price balance between $BTC and $BTCx through the protocol and liquidity pool, absorbing liquidity from the lender market. Simulating the efficient characteristics of lending pools based on the UTXO model greatly enhances the matching efficiency of the bilateral market and the utilization efficiency of funds.

Overestimated On-Chain Costs of BTC

The operational costs on the Bitcoin mainnet are often overestimated, which may be a misunderstanding caused by the high value of Bitcoin itself and the lack of on-chain applications. However, the reality is that due to the characteristics of the UTXO model, all calculations and verifications occur off-chain; the transaction itself is both the result and the proof. Therefore, the data carried by UTXO is quite limited, and the on-chain operational costs are actually not high.
Here we illustrate this with a simple comparison: Suppose the current price of Bitcoin is about $65,000, and the network's Gas Price is 50 sats/vB. Taking the operation of collateralizing $ORDI to borrow $BTCx in Shell Finance as an example, the amount of data to be on-chain is about 600 Bytes. According to the formula:

We can estimate that the cost of this operation is about $20; similarly, the cost of repaying the $BTCx loan and redeeming $ORDI is about $21.
As shown in the table, for operations using ARC-20 and Ordinals NFTs as collateral, because the on-chain data volume is smaller (about 400 Bytes per transaction), the gas costs are lower, with each operation costing only $12 to $14:

In contrast, for lending protocols on Ethereum, taking AAVE as an example (with Ethereum priced at about $3,800 and Gas Price at about 70 Gwei):

  • The cost of lending $USDT through AAVE 0xb4cb51a…ba94629 is about 0.028 ETH, equivalent to $109.17;
  • The cost of repaying $DAI debt 0xb0833aec…54d84fc is about 0.016 ETH, equivalent to $63.85.

It is evident that even at such a high Bitcoin price, the operational costs for regular users in Shell Finance are significantly lower than those of similar products on Ethereum, saving nearly 75% to 80% in gas expenses.

What Product Are We Building?

Shell Finance is a trustless lending protocol built on the Bitcoin layer 1 network, utilizing PSBT and DLC technologies to achieve trustless lending and liquidation processes. The protocol consists of two important modules: one is its synthetic stablecoin asset $BTCx, anchored to the value of $BTC; the other is the lending protocol that supports various inscription assets (including Ordinals, Runes, Atomicals, Stamps, etc.) as collateral to lend $BTCx. It provides the following core functionalities:

  • 0% interest loans: Shell Finance charges a one-time fee of 1% for borrowing BTCx, instead of highly fluctuating interest rates.
  • Peer to Protocol: Enhancing market matching and fund utilization efficiency in the lending market through Peer-to-Protocol strategies.
  • Trustless: Shell Finance leverages PSBT and DLC script contracts to enable secure trading of inscribed assets directly on Bitcoin Layer 1.


Clearly, users can obtain more liquidity through collateralized lending, converting illiquid inscribed assets into more liquid synthetic Bitcoin asset $BTCx at low cost, truly achieving financial leverage. When users borrow $BTCx, whether they exchange it for $BTC to continue trading or provide liquidity for the BTCx/BTC trading pair, they can generate more returns.

How Do We Build the Product?

We know that the Bitcoin network does not have a Turing-complete virtual runtime environment like EVM, making it impossible to handle complex business logic through smart contracts. Currently, most projects in the market choose to transfer to more developer-friendly layer 2 or other networks, but the trust prerequisites and security risks introduced by cross-chain transfers have become their unavoidable Achilles' heel.
Based on the principle of minimal trust, Shell Finance utilizes PSBT technology to conveniently collect multi-signatures when handling business scenarios involving borrowers, liquidators, and protocols, ensuring the safety of user and protocol funds while achieving atomic asset swaps. Additionally, since smart contracts cannot be deployed on the Bitcoin network to manage users' collateral funds, when lending, options, and futures protocols need to liquidate user positions based on oracle prices, it inevitably requires the protocol to retain operational rights over user assets, which undoubtedly increases unnecessary trust costs. Shell Finance addresses this issue by introducing the cautious log contract (DLC) architecture to implement a trustless liquidation mechanism on Bitcoin layer 1.
Taking a common business scenario in Shell Finance as an example:
Assume Alice uses 100 $ORDI as collateral and borrows $BTCx worth 0.15 $BTC, based on a minimum collateral ratio of 150%, it can be calculated that: the borrowing position will change to a liquidation state only when the oracle quotes $ORDI below 225,000 sats/ordi. We hope that liquidators can liquidate this position without permission while ensuring that no one can operate on the user's collateral assets until the price reaches the liquidation price. To meet this requirement, DLC is introduced to solve the problem.

In the above scenario, when Alice establishes the lending relationship, she will request the price oracle to generate a secret value pair and complete the initialization of the DLC. The DLC is used to establish an agreement with the protocol regarding the price of $ORDI:

  • If the price is below 225,000 SATS/ORDI, the protocol can liquidate Alice's collateral assets according to the pre-agreed DLC contract.
  • If the price is greater than or equal to 225,000 SATS/ORDI, nothing happens, and the ownership of the assets remains unchanged.

Once the DLC is established, both Alice and the protocol need to create a commitment transaction for the agreed results, but the signatures exchanged between the two parties cannot be directly used to unlock the funds locked in this DLC; they must wait for the oracle to reveal a secret value. Thus, we only need the oracle to promise to disclose the secret value when the price is below 225,000 SATS/ORDI. Consequently, the protocol can complete Alice's signature with this secret value after a liquidator wins the liquidation auction, along with its own signature, making the above transaction a valid transaction, broadcasting it to the network, and triggering the liquidation effect.
Essentially, DLC allows users and protocols to use the Bitcoin blockchain to make agreements, with both parties locking funds in a multi-signature address to construct the DLC script. These funds can only be used and redistributed according to certain rules when the oracle publishes specified information at a designated time. In Shell Finance, the protocol utilizes DLC to implement a liquidation mechanism involving external price oracles without requiring users to trust any entity. This also allows all core businesses of Shell Finance to be realized directly on Bitcoin layer 1, enabling users to maintain full control over their assets and avoid centralization risks. Your keys, your coins.

About Shell Finance

Shell Finance is the first trustless lending protocol built on Bitcoin layer 1, utilizing PSBT and DLC technologies to achieve trustless lending and liquidation processes. It is also the first DeFi project on the Runes protocol, supporting assets from Ordinals, BRC-20, Atomicals, Runes, Stamps, etc., unlocking liquidity instantly and providing users with considerable native DeFi returns. Currently, the project is in its early stages, and core NFTs are being actively distributed.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators