Qtum, a blockchain platform that merges the power of Bitcoin’s blockchain with the Ethereum Digital Machine to construct decentralized functions, has accomplished its first atomic swap with Bitcoin on mainnet.
This can be a large, first step for atomic swaps, a characteristic that enables for on-chain exchanges, or transactions, between cryptocurrencies on two separate blockchains with out the necessity to depend on a 3rd occasion. For Bitcoin, this can be a large step ahead in permitting interoperability between different blockchains and itself in a trustless method.
Atomic swaps are usually not a wholly new characteristic, as Bitcoin Journal has reported on a Lightning Network ERC-20 swap with bitcoin just some months in the past.
In keeping with Qtum’s blog post, the primary answer that makes atomic cross-chain swaps potential is Hash Time-Locked Contracts, or HTLC. In a quick abstract, HTLC primarily locks up the funds in a transaction for sufficient time in order that each blockchains are capable of verify the switch of funds on their very own (by way of block confirmations) and provides each events time to assert their funds. If sufficient time passes the place one aspect has not claimed their funds, the whole lot is returned again to the unique events.
All the strategy of the atomic swap is described within the weblog put up as follows:
- Alice initiates a transaction on Qtum which accommodates a time-locked contract and transfers QTUM to Bob.
- Bob audits the transaction.
- If the transaction is authorised, Bob participates in an analogous transaction on Bitcoin which pays BTC to Alice.
- Alice audits the transaction.
- If the transaction is authorised, Alice redeems BTC from it.
- Bob extracts a secret from the redeeming transaction.
- Bob redeems QTUM from the preliminary transaction.
- If the time specified within the time lock is reached and Bob has not redeemed the token, Alice can refund the token.
Within the final 12 months, Qtum has made significant leaps forward in creating its blockchain for higher adoption and interoperability as properly. Atomic swaps are simply the subsequent step.They’re additionally a crucial, next-step characteristic for interoperability with the Lightning Community.
Why Are Atomic Swaps Vital?
Atomic swaps remedy an enormous drawback in cryptocurrency, which is the lack to immediately change two several types of currencies with one another with out having to depend on a trusted third occasion like an change or firm.
In a gift instance, let’s say Alice needs to purchase a digital collectible from Bob, and there’s no strategy to commerce in individual. If Alice needs to ship cash to Bob for a collectible, Bob might simply obtain the funds and never ship the collectible in return. Additionally, the other might occur, the place Bob sends the collectible first and Alice by no means sends the cash in change.
The issue within the current instance is the issue of belief. When belief is factored into the danger of exchanging issues on-line, it turns into far more dangerous. Atomic swaps are an answer to this drawback, as described above, as a result of they permit funds to be exchanged between events with out having to depend on something however arithmetic to make sure the method has been accomplished easily.