# Mimblewimble CoinSwap proposal

**URL:** <https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322>\
**Category:** Development and Technical Discussion\
**Created:** [January 28, 2021, 11:18pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322 "2021-01-28T23:18:43Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [May 2, 2022, 4:39pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/70 "2022-05-02T16:39:40Z")

</div>

> [@oryhp](#):
>
> all other partial excess and nonce values are cancelled out because node N uses the sum of their negations

Node n is the first to make a kernel so I don’t know what you mean here…

---

<div class="post-metadata">

**Author:** ![oryhp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/oryhp/32/2923_2.png) [@oryhp](https://forum.grin.mw/u/oryhp)\
**Post date:** [May 2, 2022, 4:47pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/71 "2022-05-02T16:47:33Z")

</div>

> [@tromp](#):
>
> Node n is the first to make a kernel so I don’t know what you mean here…

Note that my reply was to my suggestion that mixnodes could make a single joint kernel:

> I just realized there’s an even more obvious solution and I believe a better one. Mixnodes add their partial excess when going forward and they sign the total excess and adjust the offset when going backwards. Why is this better? Because we have a single kernel with the same guarantee as with M kernels (no undo attack if 1 is honest)

Unfortunately, what I suggested back then seems to have the problem with key cancellation that I’m mentioning now. If every node creates its own kernel, there is no such issue.

---

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [May 2, 2022, 6:53pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/72 "2022-05-02T18:53:40Z")

</div>

> [@oryhp](#):
>
> Mixnodes add their partial excess when going forward and they sign the total excess and adjust the offset when going backwards.

> [@oryhp](#):
>
> seems to have the problem with key cancellation

I don’t see how keys could be cancelled, since each mixnode’s partial sig is needed to relate the inputs and outputs.

---

<div class="post-metadata">

**Author:** ![oryhp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/oryhp/32/2923_2.png) [@oryhp](https://forum.grin.mw/u/oryhp)\
**Post date:** [May 2, 2022, 8:16pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/73 "2022-05-02T20:16:25Z")

</div>

Ugh, I think I have made a mistake in my calculations and you’re right that the equation would not verify if the last node cancelled a key or many. If it cancelled a key of node 2, the private key that node 2 proved through the partial sig would need to have been contributed to the offset by node 2, but it has not been added there and ends up missing in this case (I think). I need to think about this a bit more…

---

<div class="post-metadata">

**Author:** ![God](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/god/32/3245_2.png) [@God](https://forum.grin.mw/u/God)\
**Post date:** [January 22, 2023, 4:09pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/75 "2023-01-22T16:09:40Z")

</div>

Thank you very much for working on this. Where are the updates posted?

---

<div class="post-metadata">

**Author:** ![Grumpy](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/grumpy/32/6264_2.png) [@Grumpy](https://forum.grin.mw/u/Grumpy)\
**Post date:** [January 26, 2023, 12:52am UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/76 "2023-01-26T00:52:50Z")

</div>

🤣 Sounds like the best side on the Wendy’s menu.

---

<div class="post-metadata">

**Author:** ![i2pZ7812HTZV69](https://avatars.discourse-cdn.com/v4/letter/i/839c29/32.png) [@i2pZ7812HTZV69](https://forum.grin.mw/u/i2pZ7812HTZV69)\
**Post date:** [October 2, 2023, 6:32pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/77 "2023-10-02T18:32:39Z")

</div>

“Widespread use of the protocol would leave the transaction graph mostly obscured.”  
For that it need to be mandatory default private at the base protocol layer.  
PERIOD!!!

---

<div class="post-metadata">

**Author:** ![ardocrat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/ardocrat/32/5164_2.png) [@ardocrat](https://forum.grin.mw/u/ardocrat)\
**Post date:** [October 4, 2023, 10:05pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/79 "2023-10-04T22:05:05Z")

</div>

> [@i2pZ7812HTZV69](#):
>
> “Widespread use of the protocol would leave the transaction graph mostly obscured.”

But what about server? If it will be single endpoint it can be a problem, another case if it will act like p2p server, so everyone can launch copy and sync it.

---

<div class="post-metadata">

**Author:** ![i2pZ7812HTZV69](https://avatars.discourse-cdn.com/v4/letter/i/839c29/32.png) [@i2pZ7812HTZV69](https://forum.grin.mw/u/i2pZ7812HTZV69)\
**Post date:** [October 4, 2023, 11:34pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/80 "2023-10-04T23:34:05Z")

</div>

@ardocrat do u suggest it be p2p to make sure “everyone can launch copy and sync it.”

---

<div class="post-metadata">

**Author:** ![ardocrat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/ardocrat/32/5164_2.png) [@ardocrat](https://forum.grin.mw/u/ardocrat)\
**Post date:** [October 4, 2023, 11:58pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/81 "2023-10-04T23:58:21Z")

</div>

> [@i2pZ7812HTZV69](#):
>
> do u suggest it be p2p

Yes, I see it as next development stage while we have no serverless payjoin implementation.

Possibly we can use these crates, I found them very useful: [GitHub - cyphernet-dao/rust-netservices: P2P network service crates (alternative to rust-microservices)](https://github.com/cyphernet-dao/rust-netservices).

Dr. Maxim Orlovsky is developing smart-contracts based on MimbleWimble tech for Bitcoin (called RGB), but there is no single word about MW and CA concept by Polestra surprisingly…

---

<div class="post-metadata">

**Author:** ![oryhp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/oryhp/32/2923_2.png) [@oryhp](https://forum.grin.mw/u/oryhp)\
**Post date:** [October 6, 2023, 4:11pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/82 "2023-10-06T16:11:24Z")

</div>

> [@ardocrat](#):
>
> Dr. Maxim Orlovsky is developing smart-contracts based on MimbleWimble tech

As far as I know, it’s not based on Mimblewimble, but rather on an idea from Peter Todd called single use seals.

---

<div class="post-metadata">

**Author:** ![ardocrat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/ardocrat/32/5164_2.png) [@ardocrat](https://forum.grin.mw/u/ardocrat)\
**Post date:** [October 6, 2023, 8:36pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/83 "2023-10-06T20:36:29Z")

</div>

They wrote it with typo 🙂

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/grin/original/2X/8/8e57166a85c6ed014eb0d48b553b7043c14fba00.png)

> **[What is RGB?](https://www.rgbfaq.com/faq/what-is-rgb)**

Forked `grin_secp256k1zkp` so:  
_“Amounts are confidential with Pedersen commitments and Bulletproofs, combining best from Liquid & Grin/Mimblewimble”_

Later: [Skip bulletproofs construction. Remove grin secp256k1zkp dependency. by dr-orlovsky · Pull Request #135 · RGB-WG/rgb-core · GitHub](https://github.com/RGB-WG/rgb-core/pull/135)

Also this:  
_“Mimblewimble-style Pedersen commitment aggregation & history cut-through better privacy concept for the future”_

---

<div class="post-metadata">

**Author:** ![oryhp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/oryhp/32/2923_2.png) [@oryhp](https://forum.grin.mw/u/oryhp)\
**Post date:** [October 6, 2023, 8:59pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/84 "2023-10-06T20:59:21Z")

</div>

I’m confused. I thought RBG was based on single use seals which has nothing to do with Mimblewimble. Bulletproofs themselves have nothing to do with MW, they’re just a way of proving `v` in a Pedersen commitment which happens to be used in confidential transactions including MW. I still don’t think RBG has much to do with MW tbh, but maybe I’m misunderstanding things.

---

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [October 7, 2023, 7:11am UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/85 "2023-10-07T07:11:31Z")

</div>

> [@ardocrat](#):
>
> Mimblewimble-style Pedersen commitment aggregation & history cut-through better privacy concept for the future”

That’s only a discussion item (under section “Other”) on the Agenda of a 2020-09-30 RGB developer call. Hardly evidence that “Maxim Orlovsky is developing smart-contracts based on MimbleWimble tech”.

Monero and Zcash also use Pedersen commitments and rangeproofs. And probably also mentioned Mimblewimble in one of their developer calls. That doesn’t make them “based on MimbleWimble tech” either…

---

<div class="post-metadata">

**Author:** ![trab](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@trab](https://forum.grin.mw/u/trab)\
**Post date:** [October 8, 2023, 4:16pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/86 "2023-10-08T16:16:27Z")

</div>

What is the threat level if a user does **not** use CoinSwap? There is obviously a lower amount of privacy. But what exactly is the threat? What can be deduced about this? And is it acceptable for the average citizen that doesn’t have a target on their back?

And also is there a threat of _using_ CoinSwap? The need to have a whole alternative fee market to incentivize coinswap server operators? What if the coordinating server goes down? What if it’s a small pool of coins, it becomes pointless and a waste of money?

---

<div class="post-metadata">

**Author:** ![oryhp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/oryhp/32/2923_2.png) [@oryhp](https://forum.grin.mw/u/oryhp)\
**Post date:** [October 8, 2023, 4:24pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/87 "2023-10-08T16:24:31Z")

</div>

Maxim confirmed they don’t use mimblewimble:

> Single-use-seals is the way preventing double spend and it has nothing to do with mimblewimble. But RGB uses confidential transactions - namely pedersen commitments + bulletproofs - to hide amounts in the client-side validated data - and this is different.

Regarding coinswap usage, it’s up to the user to decide if they want to coinswap or not. The decision can be seen as similar to a coinjoin on Bitcoin with the difference that the user doesn’t need to interact or know who is going to participate because you simply send your own coinswap to the server and never see any other information until the transaction is constructed.

---

<div class="post-metadata">

**Author:** ![hectorchu](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@hectorchu](https://forum.grin.mw/u/hectorchu)\
**Post date:** [September 10, 2024, 10:58am UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/88 "2024-09-10T10:58:47Z")

</div>

CoinSwap was implemented for Litecoin MWEB and is now available through the latest Electrum MWEB release. We have 3 CoinSwap nodes as of today and hope that more will be added later.

---

<div class="post-metadata">

**Author:** ![bruges](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@bruges](https://forum.grin.mw/u/bruges)\
**Post date:** [September 10, 2024, 11:08am UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/89 "2024-09-10T11:08:07Z")

</div>

Source? Where to read more info?

---

<div class="post-metadata">

**Author:** ![hectorchu](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@hectorchu](https://forum.grin.mw/u/hectorchu)\
**Post date:** [September 10, 2024, 11:20am UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/90 "2024-09-10T11:20:22Z")

</div>

The coinswap server source is at [GitHub - ltcmweb/coinswapd: CoinSwap server for MWEB](https://github.com/ltcmweb/coinswapd). It’s more or less a straight implementation of the proposal outlined by Tromp so I didn’t feel it was necessary to add a README or docs. You can check the source or ask me if you have any doubts.

---

<div class="post-metadata">

**Author:** ![trab](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@trab](https://forum.grin.mw/u/trab)\
**Post date:** [September 11, 2024, 6:24pm UTC](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322/91 "2024-09-11T18:24:53Z")

</div>

> [@hectorchu](#):
>
> It’s more or less a straight implementation of the proposal outlined by Tromp

In that case, is there anything stopping people from running these for Grin?

Also, is coinswap the same thing as payjoin? Meaning, it [gives the added benefit of getting rid of dust](https://forum.grin.mw/t/utxo-dust-any-solutions/11104/7)?

[Previous page](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322.md?page=3)

[Next page](https://forum.grin.mw/t/mimblewimble-coinswap-proposal/8322.md?page=5)
