Skip to content

0x21 Finance - Introduction

0x21 Finance provides modular programmable Bitcoin vault infrastructure for integration into existing DeFi protocols across chains or to build novel BTCfi applications directly.

Why

Current integration of Bitcoin into DeFi protocols is mostly done via wrapped BTC representations on various chains (e.g. wBTC, cbBTC, lBTC, tBTC). 0x21 provides an alternative to these fungible representations by allowing users to create application-specific personal vaults that can be unlocked under well-defined conditions. Prime use cases are staking and collateral for lending, stablecoins, perp DEXes, where collateral, under normal conditions, stays in the ownership of the user, but might change ownership in the event of a liquidation. In many jurisdictions wrapping of BTC might itself be considered a taxable event, but with 0x21 vaults wrapping becomes unnecessary, and only the liquidation itself should be regarded as a taxable event.

How

Each vault is controlled by a vault-specific threshold key powered by the Internet Computer. At the current stage, 0x21 supports two types of vaults:

(1) Timelocked Vaults: These can be unlocked programmatically during their lifetime, and reclaimed by the user without cooperation of the 0x21 system.

(2) Perpetual Vaults: These can only be unlocked programmatically.

Programmatic unlocking is implemented via unlocking modules. Vaults define their unlocking module during creation, and get registered with their unlocking modules. Unlocking modules define under which conditions a vault gets unlocked. To make this concrete, we've implemented the Ethereum Unlock Module. This module syncs registered vaults with a VaultRegistry contract on Ethereum. Vaults registered with the Ethereum Unlock Module need to define an authorized Ethereum address, typically a smart contract, that is authorized to unlock the vault. This address can unlock the vault by calling the unlockVault function with an optional Bitcoin address as payload on the VaultRegistry contract. This function call emits an event that is captured by the Ethereum Unlock Module which triggers the unlocking of the vault and the withdrawal to the provided Bitcoin address. Just as the main 0x21 vault backend, each unlock module is implemented as a canister running on the Internet Computer and may involve satellite contracts on remote chains for integration with protocols on remote chains as discussed in the Ethereum Unlock Module example. Given the existence of an unlock module for a given chain, integrating 0x21 vaults only involves writing contracts or integrations on the remote chain, no development work on the Internet Computer itself.

Current State

We have implemented an early test environment with deployments on hosted test networks (Bitcoin regtest, Anvil, IC replica) for simplicity. The test environment includes two unlock modules:

  1. Mock Unlock Module: Allows a specified IC principal to unlock a vault.
  2. Ethereum Unlock Module: Allows Ethereum smart contracts to unlock vaults.

Based on the Ethereum Unlock Modules, we've implemented two simple example applications that you can try:

  1. Staking Demo: Allows users to stake Bitcoin to earn a Bitcoin Staking Token (BST) on Ethereum.
  2. Swap Demo: Allows users to create (and take) orders to swap BTC for ETH.

Interested?

Please reach out if you're interested in building with 0x21. We are looking forward to get in touch!

Built with VitePress