Development work to add GRIN to Monzero.org/dex/

Hi all,

I’m the developer of Monzero (XMZ), a CryptoNote-based privacy coin. Over the past few months we’ve built a non-custodial atomic-swap DEX into our desktop and Android wallets, and we’d like to add native Grin. Before we write any code, we want to ask the community. We’d rather do this openly and with your input than just show up with a listing.

What the DEX is

  • Atomic swaps only. There’s no custody, no wrapped tokens, no bridge and no order-matching server holding funds. Each trade either completes on both chains or refunds.
  • Live pairs: XMZ paired with BTC, ETH, BNB and SOL, each tested with a real-funds mainnet swap before opening. The Bitcoin side runs on light wallets for both parties, with no full node needed.
  • Offers are signed by the maker and spread through public relays and peer-to-peer gossip. Anyone can run a relay, and a relay can’t forge or change an offer.
  • Limits: the DEX is still young, so per-trade and per-day limits are kept small. We publish a community pentest kit and take security reports instead of claiming a paid audit.

Why Grin

Grin and XMZ have a lot in common: privacy by default, fair launch and proof-of-work. We think private coins should be able to trade with each other without going through a centralised exchange. We’re only interested in native Grin, never a wrapped or pegged version.

How we think it could work (please correct us)

XMZ, like Monero, has no scripts or timelocks. Our swaps therefore follow the same model as the Monero-BTC atomic-swap protocol. The other chain carries the lock, refund and punish logic. The two sides are linked by an adaptor signature and a cross-group DLEQ proof, which connects the ed25519 key on the XMZ side to a secp256k1 key on the other side.

As far as we can tell, Grin could fill that “other chain” role without scripts:

  1. Lock: the GRIN goes into a 2-of-2 shared output, built together over Slatepack.
  2. Redeem: the spend uses an adaptor signature on the kernel. When it’s published on-chain, the secret the XMZ side needs is revealed.
  3. Cancel and refund: both parties pre-sign a refund that only becomes valid later. The candidates are absolute timelocks (height-locked kernels) and relative timelocks (NRD kernels).
  4. Punish: if a party disappears after the cancel, a relative-timelocked punish path would use NRD kernels.

What we’d like to ask

  1. Does the community object to Grin being offered on a DEX run by another project? We’d rather know now.
  2. Is the design sound? In particular:
    • Are adaptor signatures on Grin kernel signatures a reasonable approach, and is there existing work we should reuse rather than rebuild?
    • Are NRD kernels the right tool for the cancel, refund and punish timing, and are there known pitfalls in how they’re relayed or accepted by the mempool?
    • Are there problems with building multi-round transactions between two parties who don’t trust each other, especially with Slatepack, if one side drops halfway through?
  3. Wallet and node access: we’d like to avoid making users run a full Grin node. Is it acceptable to talk to a public node’s Foreign API, and how much can we safely check from that alone?
  4. Collaboration: if any Grin developers want to review the protocol spec or help with the Grin side, we’d welcome it. The spec and code will be public, and Grin-side changes would be offered back under whatever terms suit you.

We’re not asking for funding, a listing fee or any kind of promotion. We just want to do this properly and avoid shipping something that could put Grin users’ funds at risk.

Thanks for reading. We’re happy to answer questions here.

— Monzero developer
Website: https://monzero.org · Security reports: security@monzero.org

2 Likes

Have you asked the same question to other crypto communities before integrating them into your DEX?

what is the use of XMZ here? you made a Monero fork and using it as the liquidity token of your DEX which is not an EVM-style DEX (powered by smart contracts & token of the EVM chain) but just pure atomic swaps, then what does your fork of Monero contribute? why can’t we do Monero<->Grin atomic swaps instead (which is possible exactly the way you described it)? why invent a fork of Monero and propose it as if it is what makes the DEX possible?

I am not proposing this, we are a fork of monero the choice of coin I wanted to base a cryptocurrency on because of the privacy, the dex is seperate. I wanted to make it easy for people to trade without having to hand your coins to a CEX or deposit it somewhere thats not in your control. Thats what I added.

1 Like

I read some (not all) of the insanely lengthy security discussions you’re involved in on bitcointalk. Have you addressed those issues?

ahhh i give up with those guys :smiley: they were complaining about the windows binary, the code stems from moneros code so the randomX strings set it off mostly. The code is free for people to view on github, they should just of looked at the code there. The checksums etc are free for people too view and verify with each build.

As for addressing those issues, no and frankly Its the back of my list of things to do I will leave the trust upto the users to do their own research if they want to use it. I can’t use microsofts store to sign the application which is very annoying I tried and asked them directly why but didn’t give the specific area in question. People are more than welcome to build it themselves too. I do not cater for Windows only users unfortunately, open source is something I really enjoy and windows is not so friendly towards that. Not so much as Arch for example, Its user preference.
If they dont like it then they dont have to use it :smiley: . But remain certain that anytime trades happen towards users I do not see that as a developer trades and keys etc are all done on the users side and they have full control.

1 Like

as for the swaps question this is what is being worked on right now

2 Likes

So this is similar to Particl/BasicSwap? Sounds good to me, but I only speak for myself, a lowly trader with modest technical skills.

I give it a thumbs up, sir! Might even try it out when its live.

1 Like

The people in this forum do not speak for grin coin. Grin coin has no authority figures. You are free to build whatever you like, you do not need permission, especially from us. If you want possible funding for your project this may be a good place to ask, but as far as if it’s ok or not, I give you full permission to go ahead and build out your swap - seems cool to me.

To answer some of your questions:
1.No we don’t object to a dex, we really need one actually, we keep getting scammed by CEX websites
2. Design might be sound, not sure tbh. It’s definitely possible I think
3. Yes, last I checked we have a public node or two up you could use. It is acceptable to use a public node,
4. Ya, there might be some devs and vibe coders kicking around here that would be able to check over your code.

@Monzero Looks interesting. I see no real reason to object since Grin is free to be used by anyone.
I have to agree with @bruges and @eravsar that I would prefer a swap that is backed by a well proven and well secured chain such as Monero. It just feels more secure

First issue I see is that I thought to remember NRD kernels were only active on Testnet, not on Mainnet yet.
Secondly, NRD kernels are using a relative time-lock, not an absolute time-lock to my understanding.
@tromp Do you know if those have been activated or if there is any ideas on a timeline for activating them?

1 Like