First Grin-ETH atomic swap

Not long ago we have done the first (to our knowledge) atomic swap between Grin testnet 3 and ETH Ropsten. You can read more about it here:

If you have any questions/comments about this blog post, please post them in this topic, I am happy to answer them!

11 Likes

What prevent this swap from happening between Grin and Bitcoin?

1 Like

Effort mainly. We had to start somewhere :slight_smile:

3 Likes

Hahaha! That is an excellent reason. :wink:
Also I’m glad to hear the is nothing fundamental holding this back!

Incredible work team!

Grin is shaping up to be the cash backbone of the crypto world :earth_asia:

@jaspervdm
Today I got some time to read your atomic swap :slight_smile: thanks for the good writing on medium.

One question here, why the Multi-signature output and Time-locked refund in Grin side are needed?

In my opinion, Bob firstly create that smart contract in Ethereum to send 2 ETH to Alice’s address with q as the secret and 24 hours timeout refund, say this is TX1, then Alice and Bob create a transaction in Grin with Adaptor Signature, say this is TX2, once Bob submits TX2 to the network, Alice gets q and creates a signature and submits it to the Ethereum smart contract and receives that 2 ETH. Swap done!

Because Alice can publish a double spend of that output (with a higher fee), which has a decent chance of making it in a block before TX2.

double spend with a higher fee! :+1: I forgot this.

double spend with same fee should be same problem here.

By the way, in case you are interested, I also did a Grin-BTC atomic swap not so long ago. I didnt make a public blog post about it but it is in my Grincon0 slides. Procedure is similar but instead of a smart contract there is a P2SH address.

1 Like

OK, will check it also, thanks~

Hello, I find this very interesting from a scaling perspective (among others).

Is there something specific in the Grin system that makes it possible? Or could the same be done in principle between BTC and altBTC or between BTC and ETH?

Also, could one do an atomic swap between Grin and another network (altGrin) running the same protocol? We could imagine having a loosely connected network of networks with such a mechanism. Or is it what they call layer-0 scaling? Sorry if this is all obvious…

Is there something specific in the Grin system that makes it possible? Or could the same be done in principle between BTC and altBTC or between BTC and ETH?

Atomic swaps between other coins like BTC and ETH are definitely possible and have been done before. They are based on HTLC’s. See [1] [2] and more recently [3] [4]. However it is not possible (and unwanted) to use hash pre-images on MW, which is why an additional method had to be used, which was originally proposed by Andrew Poelstra. It uses so called adaptor signatures, which are explained in the blog post.

Also, could one do an atomic swap between Grin and another network (altGrin) running the same protocol?

Yes, this is possible

Thank you very much for the answer and for the links!

The idea of independent networks is quickly dismissed at the top of the Ethereum Sharding FAQs for security reasons. I am not sure I buy that argument. It makes me wonder if for all the talk about scalability there is any real demand…

Bump… has anyone tried doing this on mainnet?

2 Likes

running a small trust less service would be nice on TOR for example to swap $coin for GRIN , I would love to do a PoC of this

@jaspervdm please release some documentation for it or did BinanceX stop funding this project, what would be needed to finish it?

3 Likes