dlcBTC represents a ground-breaking approach to bridging BTC with the Ethereum ecosystem, leveraging the security and robustness of both networks without adding an intermediary, Layer 2 chain, or bridge technology. This document offers a deep dive into the mechanics and security measures that make dlcBTC a unique and trustworthy solution for using BTC on Ethereum. We describe the roles of various components, including attestors and smart contracts, in ensuring a seamless and secure transaction flow, highlighting the innovative use of pre-signed transactions and atomic swaps to maintain user control and integrity of funds throughout the process.
dlcBTC Mint/Redeem Flow
Here we will describe in detail how a user can mint/redeem dlcBTC tokens, following along with the diagram above.
A Standard dlcBTC Mint/Redeem Process
Step 1: Pre-funding Transaction
The user begins the minting/redeeming process by generating a pre-funding transaction. This is a time-locked and on-chain transaction that secures the user's BTC collateral using the full hashrate of the Bitcoin network. The integration with the broader Bitcoin network ensures that dlcBTC inherits the robustness and protection of the largest and most secure blockchain in the world.
Step 2: Transaction Creation for Attestors
Next, DLC attestors (similar to validators on traditional cross-chain bridges) create two partially signed Bitcoin transactions (PSBTs). The first is the funding transaction, which uses the unspent transaction outputs (UTXOs) from the pre-funding transaction to lock the BTC collateral. Remember, dlcBTC tokens can only be minted when a user physically locks BTC in a DLC lockbox, a special type of multisig wallet. Therefore, the funding transaction acts as a built-in Proof-of-Reserve (PoR).
The second transaction is the payout transaction, designed to make the dlcBTC minting/redeeming process theft-proof. The pre-signature mechanism ensures that even in the event of a hack or security breach, only the original depositor receives the locked BTC. This is contrary to traditional BTC wrapping techniques where hackers can manipulate the wBTC architecture, for example, and divert the collateral to their addresses.
Step 3: Attestor Relays
The attestors play a crucial role in the dlcBTC architecture - they are relays between the Bitcoin and Ethereum networks. They play a pivotal role in ensuring the integrity of transactions by publishing their DLC “Announcement” and identifying which Unspent Transaction Output (UTXO) is a DLC. This action adds an extra layer of transparency and trust to the system, ensuring that all parties involved can verify the legitimacy of the transactions.
Step 4: ERC20 Token Preparation
After confirming that the user has locked BTC in the DLC lockbox, the attestor’s smart contracts interact with Ethereum smart contracts on-chain. During the interaction, the attestors perform a series of checks and commands in the Ethereum blockchain, effectively setting up the system to mint ERC20 dlcBTC tokens. The preparation includes verifying the lockbox details, ensuring the integrity of the smart contract, and initializing the parameters that will govern the minting process.
The attestors' actions here are the bridge between the Bitcoin and Ethereum blockchains, enabling the locked BTC to be minted as ERC20 tokens, which can then be used within the Ethereum ecosystem. This step is crucial for maintaining the integrity and trust of the minting process, ensuring that it is secure, transparent, and verifiable by all parties involved.
Step 5: ERC20 Claim Process
Once the ERC20 dlcBTC tokens are minted, the user initiates the claim process. The process is a critical security step where the user must reveal the secret key they used to lock the collateral. The secret key is a unique identifier that acts as proof of ownership and authorization. It's akin to showing a password or a fingerprint to claim what's rightfully theirs.
By revealing this key to the attestors, the user engages in what's known as an atomic swap, a kind of digital handshake that ensures a secure exchange. The attestors, upon receiving the correct secret key, authorize the transfer of the newly minted ERC20 tokens to the user's wallet. This process ensures that the tokens are only released to the individual who locked up the collateral, maintaining the integrity of the transaction and protecting against fraud.
Step 6: Transaction Conversion
The attestors, upon receiving the secret key from the user, initiate a critical transformation process. They take the pre-funding transaction, which until now has been like a check waiting to be cashed, and convert it into a standard funding transaction.
Now, the locked BTC is ready to achieve its intended purpose — to complete the user's desired action, which, in this case, is the final payout of dlcBTC tokens to the user’s Ethereum wallet. This conversion process is meticulous and secure, ensuring that the original terms of the deal are met and that the Bitcoin is ready to be returned to the user's control in the form of dlcBTC tokens.
Step 7: Token Redemption and BTC Release
After the user achieves their intended action with dlcBTC tokens, they can convert them back to BTC by burning their dlcBTC token. The attestors observe the burn event on-chain and publish their DLC attestations. Once a threshold of attestations are published, the DLC unlocks. This mechanism ensures a consensus-based validation, adding another layer of security and trust to the redemption process.
Step 8: The Execution Phase
Once the dlcBTC tokens are burned and the attestors' verifications reach a consensus, the Bitcoin is set to be unlocked from the DLC. At this point, the user, utilizing their wallet software, initiates the final step. This action commands the transfer of BTC from the DLC lockbox to the user's wallet, completing the cycle of minting and redeeming within the dlcBTC architecture.
Conclusion
The dlcBTC architecture heralds a new era in the seamless integration of Bitcoin with Ethereum, marking a significant milestone in the evolution of DeFi technology. Through a meticulously designed process, dlcBTC ensures secure, transparent, and efficient transactions, bridging two of the most prominent blockchains without intermediaries. The innovative use of attestors, pre-signed transactions, Ethereum validators, and atomic swaps highlights dlcBTC's unique ability to secure native BTC. We're excited to pioneer this groundbreaking Bitcoin to Ethereum bridge, an achievement that sets a new benchmark in the blockchain space. This is not just an advancement; it's a revolution that opens up unprecedented possibilities for BTC interoperability and functionality.