MerosCrypto / asmr

Atomic Swaps for Meros and other cryptocurrencies
MIT License
43 stars 15 forks source link

Add coin ethereum #3

Closed vieyang closed 4 years ago

vieyang commented 4 years ago

That said, any Bitcoin-fork without SegWit, or any similar transaction malleability guarantees, will not work securely with this library (any by definition cannot implement this swap protocol atomically).

Can we add ethereum to auto swap with monero?

kayabaNerve commented 4 years ago

Ethereum is possible, for both Ether and ERC20s. It'd need to be partnered with a smart contract, preferably a singular one deployed long-term on the mainnet. Someone just needs to put in the time.

vieyang commented 4 years ago

wooo, Waiting for atomic swap of eth.

vieyang commented 4 years ago

It should be noted Bitcoin usually has a major problem with transaction IDs.

so, as ethereum, if we don't use a smart contract, there still has a problem with ethereum transaction IDs?

kayabaNerve commented 4 years ago

I don't believe Ethereum has a similar problem, but I haven't looked into the specifics. That said, even if it does, it can still be used on both sides. The reason BTC TX malleability is a problem is because they contain the scripts. Since Ethereum uses an account model, and a SC is used for the scripting, it's not relevant.

vieyang commented 4 years ago

I still have a hard time understanding the problem with Bitcoin transactions, I will try to figure it out.

kayabaNerve commented 4 years ago

It has no effect on Ethereum, to be clear.

That said, here's the short version:

Ethereum isn't affected because you don't need to know every Ethereum TX hash in advance. The account model, instead of UTXO model, removes that requirement.

kayabaNerve commented 4 years ago

https://en.bitcoin.it/wiki/Transaction_malleability is the post on the BTC wiki about it. That warning is meant to state LTC-XMR is possible, yet BCH-XMR isn't.

On a side note, BTC-BCH and LTC-BCH is possible (where BCH takes the place of XMR), but it's inefficient compared to the existing atomic swap protocol and not beneficial. Just a fun fact.

vieyang commented 4 years ago

ok, thank you for your help.