Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to connect Bitcoin to ethernet block chain

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the relevant knowledge of "how to connect Bitcoin to the ethernet block chain". The editor shows you the operation process through an actual case, and the operation method is simple, fast and practical. I hope this article "how to connect Bitcoin to ethernet block chain" can help you solve the problem.

Trust trusteeship

This is the simplest and perhaps the easiest to understand solution from a technical point of view. In this approach, a licensed custodian will act as a trusted third party. The custodian will provide a bitcoin address for users to send their bitcoins, and then they will send the appropriate number of BTCT tokens back to the user. When users want to convert their BTCT into bitcoin, they simply send a request to the trustee, who in turn sends the bitcoin directly to the user's address. The custodian may charge a fee for each deposit or withdrawal to fund its operation.

While the trustee does need to be trusted, a big advantage of this solution is that users can always verify that the trustee has the same amount of bitcoin in the managed wallet. If the custodian acts dishonestly, the user can take legal action against the custodian using fully transparent public records. This is different from the USDT solution, where users need to trust audit decisions and cannot take independent legal action if an audit is performed. In addition, in the USDT system, the audit will not be real-time, that is, people will have to wait for the custodian to prepare the report.

Use smart contracts without trust

Although the above solution may work well in practice, it requires a centralized entity as a trusted third party. This conflicts with the idea of decentralization and may even bring some risks. For example, the custodian may break the law and leave users' money, or communication between the parties may be interrupted or delayed by inefficient regulatory management. In this section, we provide a new solution that uses smart contracts to make the issuance and redemption of BTCT completely untrusted.

The solution leverages BTCRelay, a Bitcoin lightweight client that runs in an Ethernet Square-based smart contract. BTCRelay allows Ethernet Square smart contracts to validate bitcoin transactions, allowing ethernet online entities to check whether payments on the bitcoin network are actually taking place.

In this solution, a third party will prepare the initial capital to facilitate the issuance and redemption of BTCT. Before the user deposits Bitcoin, the initial fund will be the required deposit, that is, if any adverse event occurs, the user can get this deposit as a refund. For simplicity, as an example, Kyber Network can play the role of a third party and provide margin for ETH and ERC20 tokens in bitcoin contracts. Kyber will then provide a bitcoin address where users can deposit bitcoin to create BTCT tokens. After confirming the user's deposit, Kyber creates the appropriate number of BTCT tokens for the user in the BitcoinToken contract. If Kyber does not issue a new BTCT token, the user can submit the merkle deposit certificate to the BitcoinToken smart contract, which then communicates with BTCRelay to verify that the user does deposit bitcoin in Kyber. If a game violation is detected, the BitcoinToken contract will lose part of the Kyber deposit and use it to pay the user. Other users can also start redeeming BTCT tokens to get their bitcoins. Because the value of the margin always exceeds the current amount of bitcoin held by the custodian, the user will receive a deposit on bitcoin. The scenario mentioned above is shown in the following figure.

Let's consider a situation where a user wants to convert bitcoin into BTCT. What they need to do is call the "burn function" of the bitcoin address where they want to receive bitcoin in the BitcoinToken contract. Kyber will listen for the destroyed event and send the appropriate amount of bitcoin to the user's bitcoin address. If the user does not see the payment sent by Kyber, they can challenge Kyber by calling the BitcoinToken smart contract (we may need the user to provide some small deposits to prevent abuse of this feature). If Kyber fails to provide valid proof of payment (if there is no payment, Kyber will not be able to do so), Kyber's deposits will be partially confiscated so that users will get more ETH and ERC20 tokens and can sell their bitcoins later. Other users, once they find that Kyber has failed to pay, can ask to exchange their BTCT.

This approach provides several good properties on top of the trusted hosting method.

1. No trust. Users do not need to trust Kyber Network or any other third party. If anything happens, they can submit proof and Kyber Network will be punished. The amount of the fine will be paid to the user who reports the foul, and the user gets more than the original value of bitcoin in the ETH/ERC20 token from the deposit. Please note that the deposit will be large enough that all users can use the bonus to receive bitcoin.

two。 Cost-effectiveness. When things are good, users don't need to submit too much data. In fact, they don't need to do anything on Ethernet Square to publish BTCT. They only need to send a transaction to Ethernet Square to redeem their BTCT.

3. Publicly verifiable. Everything is transparent and publicly available to users. Users can verify locked deposits before deciding to publish BTCT.

The downside, however, is that as adoption grows, the solution requires more money.

The total deposit of ETH and ERC20 tokens must be at least equal to the total amount of BTCT issued plus an additional margin of safety (10% Mur20%) to explain price fluctuations. For example, for BTCT's X dollars, we need 1.2 times the initial capital. Another major disadvantage is the potential security risk when untrusted custodians use billions as collateral. In addition, the fact that it is not completely decentralized may mean that the entity can be monopolized by a centralized organization.

Remove BTCRelay to get Evm compatible tokens

In the above solution, it is emphasized that BTCRelay requires development and maintenance work, and will be very expensive for other transmissions of Classic,Litecoin and ZCash in Ethernet Square. In addition, handling bitcoin transactions on Ethernet Square may introduce some complexities. In this section, we propose another solution that does not involve BTCRelay and simplify the process more effectively. To achieve this, we must require another chain to support EVM-based smart contracts. Fortunately, Rootstock will be developed and they are compatible with EVM, and they have used a federated side chain to transfer bitcoin from the bitcoin blockchain to Rootstock. This solution also applies to other cryptocurrencies, such as Ethernet Fong Classics and other Ethernet Fong-based currencies. In this section, when referring to Bitcoin below, we will discuss Bitcoin unless otherwise noted.

As with the previous solution, the custodian still needs to deposit his margin on the etheric chain, whether in ETH or other ERC20 tokens, or both. In addition, the custodian must provide a small security deposit, such as about 5% of the amount currently held in bitcoin. The deposit on Rootstock will be deposited in Bitcoin and will be punished if the custodian behaves improperly in the Rootstock chain.

After the user deposits X Bitcoin in DepositContract on Rootstock, the custodian will sign a message "X Bitcoin is stored in Y on Ethernet Square at Block Z" and submit it to DepositContract on Rootstock. The custodian will then issue the same number of BTCT tokens on the BitcoinToken contract on Ethernet Square. Unless the custodian is questioned for failing to pay, only the custodian has the right to remove bitcoin from Rootstock's DepositContract contract. If the custodian does not provide a signed message, the user can question the Rootstock and get the deposited bitcoin and get some bonus from the deposit of the custodian on the Rootstock. If the custodian fails to issue a new BTCT token on Ethernet Square after signing the message, users can use the signed message to issue their BTCT token on Ethernet Square on their own and have the custodian be punished for failing to perform their duties.

When users request to redeem their BTCT tokens on Ethernet Square, they call the burn function on the BitcoinToken contract and provide their Rootstock address to receive their bitcoin.

The custodian will sign the data saying "convert X bitcoin to solve the Y of Rootstock" and submit the message of the bitcoin contract on Ethernet Square. The custodian then transfers the X bitcoin to the user's address on Rootstock to complete the exchange. Similar to the distribution process, the custodian may be penalized if he or she fails to submit a signed message on Ethernet Square or transfers bitcoin on the rootstock.

1. Benefits

No BTCRelay or other transit links are required, which can be expensive and tedious maintenance.

Because you don't have to handle bitcoin transactions on Ethernet Square, it's much easier to implement.

two。 Shortcoming

A smart contract compatible with EVM is required (therefore Rootstock is required to support bitcoin)

Become a note for DApp development.

Java Bitcoin Development course, for beginners, covers the core concepts of Bitcoin, such as blockchain storage, decentralized consensus mechanisms, keys and scripts, transactions and UTXO, etc., as well as how to integrate Bitcoin support functions into Java code, such as creating addresses, managing wallets, constructing naked transactions, etc., is a rare bitcoin development course for Java engineers.

Php Bitcoin Development course, for beginners, covers the core concepts of Bitcoin, such as blockchain storage, decentralized consensus mechanisms, keys and scripts, transactions and UTXO, etc., as well as how to integrate Bitcoin support functions into Php code, such as creating addresses, managing wallets, constructing naked transactions, etc., is a rare bitcoin development course for Php engineers.

Tendermint block chain development detailed understanding, this course is suitable for engineers who want to use tendermint for block chain development, the course content includes the core concepts of tendermint application development model, such as ABCI interface, Merkel tree, multi-version state library, etc., as well as rich practical code such as token issuance, it is the best choice for go language engineers to get started with block chain development.

This is the end of the introduction to "how Bitcoin is connected to the ethernet block chain". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report