2

I am new to blockchain and I have read some articles about coins, smart contract, tokens, etc. What I don't understand is that how I can send coin cross different networks. For example, I have a Bitcoin and I'd like to change it to Eth. Is there a way for me to exchange this two cryptocurrency?

If yes, how does the two different networks work together to complete this transaction.

If not, do I have to transfer Bitcoin to my bank account then purchase Eth later?

1 Answer 1

1

There are a few different ways to do this, one way would be like you described, selling Bitcoin and transferring the money to your bank account, and then purchasing Ethereum.

On a Decentralized Exchange, you would need to use a method called Atomic swaps, which use something known as Hashed Time-Locked Contracts.

These contracts involve the creation of a "pre-image", this pre-image is hashed using a hashing function to create a "hashlock". Users will have to agree upon a price, amount to swap, a time limit/deadline, and lock their tokens, once the pre-image is shared with the recipient to prove the sender is the owner of the funds both parties can withdraw the tokens. You can read more about them here, here and here.

If a user wants to swap a token for the same token on a different network there are a couple more ways they can do this, the first way is through a mint/burn structure. This involves burning x tokens on chain A, in order to mint x tokens on chain B. The second flow is very similar but instead of burning and minting, the tokens are simply locked and unlocked inside smart contracts. One example of a protocol that creates cross-chain tokens is called LayerZero.

Another way would be to use a Centralized Exchange, which is most likely just a mix of matching your buy/sell order with another buy/sell order and updating balances internally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.