Our own P2P exchange

We hear more and more about exchanges unlisting grin such as it has been announced by Bittrex. Bisq had a fair reason to remove grin but convincing them to bring it back will not be easy. To my knowledge, at the moment of writing this post the only exchange that properly supports and maintains grin is TradeOgre. Myself I encountered lots of trouble withdrawing from gate.io and it was extremely frustrating. We have an archived post and current one with a list of active exchanges.

What is even more disappointing is we keep hearing from those exchanges how they heroically announce listing some memecoins which provide no technical advantage and just follow recent random trends and hype.

I have been thinking about it and I realized few things:

  1. No matter how good MimbleWimble is, if there is no way for people to buy grin, it won’t have a proper chance to compete even with the most ridiculous memecoin which differs only with the logo.
  2. It is understandable for the exchanges that they need to do what is good for their business. It is not charity. They have limited resources as well and they have to prioritize what will bring them profits.
  3. Even if exchanges (decentralized or not) list grin, it will always be a part of another coin’s market, there won’t be a way to directly just get grin for fiat (at least not for a long time). In my experience, I have encountered dozens of people who wanted grin and were extremely annoyed by the fact they had to buy ETH or BTC first.

There are ways of implementing secure (to certain extend, of course) P2P exchanges between the cryptocurrencies and fiat currencies. As mentioned above, Bisq is such an application. For those unfamiliar with the concept, here is an introduction video to Bisq.

In the Monero Reddit community there recently was a discussion about building a decentralized exchange. They do have Haveno which is a fork of Bisq. I have not studied the details of this project, I have never tried it but if it works it is impressive as doing multisignatures to implement escrow with Monero seems something difficult to achieve.

Haveno (pronounced ha‧ve‧no) is a private and decentralized way to exchange Monero for national currencies or other cryptocurrencies. Haveno uses peer-to-peer networking and multi-signature escrow to facilitate trading without a trusted third party custodian. Disputes can be resolved using non-custodial arbitration. Everything is built around Monero and Tor.

On the other hand, for MimbleWimble thanks to Schnorr signatures it is a lot easier to implement multisignatures and scriptless scripts. We already have a research thread about atomic swaps with BTC.

It is not a feature proposal, our devs are doing amazing work and are already extremely busy. This is the reason why I decided to write it in the uncategorized section of the forum as I am not proposing any particular roadmap.

My goal here is to start to talk about our own decentralized exchange. MimbleWimble has a technical advantage, the fact that making multisignatures is easier should be taken advantage of. One of many other advantages of grin is its community, I met so many extremely smart and knowledgeable people who share a vision. I believe such community could be a good foundation for a P2P network.

Please leave your thoughts and comments. I am curious what you think and where this discussion will lead us.

18 Likes

This has been discussed before, and I think it has been done many times. I feel that what is needed is a simple exchange for Grin. I am from Indonesia. My country has many exchanges for direct exchange of Rupiah (Fiat) into USDT or USDC. Sometimes Rupiah is converted first to crypto BIDR (on Binance) or IDRT. Then converted again to the form USDT or USDC. USDT or USDC can be sent via any of your preferred and available networks (ETH, Tron, Binance, etc.) and we usually choose the cheapest one in the withdrawal fee.

The solution is to make an exchange like that. You can collect donations in the form of Grin or set aside Grin development funds. There is no problem with the central exchange, after all, there are only Grin and Fiat exchanges, which can then be used by the user for transactions anywhere and with anyone.

I also agree that the GRIN / BTC pair will only complicate the exchange at a cost that is not cheap and less useful. GRIN should be paired with FIAT or FIAT Crypto only.

But what has been happening all this time seems very difficult to convince you developers and we Grin users or consumers are very troubled.

1 Like

Re Bisq. It doesn’t sound like they need much convincing. There was some discussion re Bisq in the Grin community telegram group from Dec last year. A member reached out to the Bisq founder- See his response below. Sounds like they’re still keen on Grin. If someone was to investigate this further and submit a funding request to provide support to Bisq devs in reintegrating Grin, then we could probably make it happen.

@vegycslol & @phyro you seem most passionate about Grin’s transaction flow and exchange/ payment integration. So perhaps it’s something you could get involved with?

2 Likes

The following is how my preferred exchange integration would look like:

  • don’t use tor, only manual slatepacks (nitx are the same on all exchanges, the same should hold for itx and my guess is that not all exchanges can/want to use tor. Also it’s confusing if there are multiple ways to deposit/withdraw)
  • deposit is RSR, withdrawal SRS (symmetrical flow for both parties, exchanges finalize which should be way better than user)
  • safe-cancel implementation (to avoid play attacks)
  • rust’s wallet api needs fixes for RSR, SRS and to add repost api so that exchanges can automatically repost and avoid manual reposting, don’t know much about grin++, only that it doesn’t support RSR

This is ofc controversial and i’m not saying it needs to be done this way, that’s just what makes the most sense to me

4 Likes

I’m unfortunately not familiar with Bisq or similar, so someone else with this knowledge (or passion to learn) will need to take this one.

2 Likes

Interesting. Thanks for sharing. I am not aware of such discussions of building a P2P exchange for our use, could you provide some links?

Now as for a centralized exchange, because that is what I think you are suggesting, it is not as easy as you say. Even if the principle idea is simple, the legal problems it involves are extremely complicated. Perhaps in Indonesia, from what you say, it might be less difficult. World is a big place, every country has own policies and not everyone is in Indonesia. You can ask @mcm-mike how much paperwork and legal problems it involves to do anything related to crypto in Germany.

I feel for grin devs… There is just so much work to do and project is very ambitious. Personally I believe that projects like our own P2P exchange would need to be externally developed with their own funding, roadmap etc. Can be done in close collaboration with Grin Council but must not rely on resources (time or funding) provided by them because as I see it, there is enough man power to maintain what we have and keep the essential features flowing in.

Anything else (P2P exchange, more wallets, web wallets etc) I think should be community-developed.

1 Like

I mean not a specific discussion about p2p exchange, but some posts discuss it.

The security deposit… Is a deposit (so you get it back assuming you are honest) and fees should be way smaller in case of grin.

For smaller exchanges deposit could be proportionally small just to get people started. I think there is no need to discuss specifics of the design, just saying it doesn’t have to be exactly like Bisq.

1 Like

I think this is a great idea. If grin aims to be privacy-focused and free of cencorship, a p2p exchange is well suited to these ideas.

I have downloaded bisq, it is coded in java and uses javafx as gui framework. It setups a tor service to work.

Grin is listed but there is no offer :). For other currencies the market depth is low.
I guess a grin p2p exchange would be more active, because of lack of exchanges.

2 Likes

Normal users won’t provide enough liquidity. This is a general problem even with regular exchanges. Every exchange that is popular must have Market makers. If you don’t have these, it can’t be used because the spread is too big and the prices don’t reflect the actual market value elsewhere. But it could serve as an OTC thing

Simple example (without arbitration) as I see it. I am Maker and you are Taker.

We agree I will sell you X grin for Y USD (or any fiat, whatever), we also agree on the means of transferring money. For security, we establish rules that security deposit for both of us is also X (so you need to have at least X grin to use this method and buy X more grin).

  1. We create 2-input 1-output transaction of total value 3X, I put 2X and you put 1X. This transaction is our multi-signature escrow.
  2. We wait 10 blocks until our outputs get combined on the chain into a single block.
  3. We form two transactions using multi-signatures, the first transaction (cancel) sends me 2X and sends you 1X. The second transaction (trade) sends me 1X and sends you 2X. In both cases we get our deposits back, they differ by who gets the traded funds. Transactions are prepared but are not valid until both of us sign any of them.
  4. Now I wait until you send me the Y USD transfer.

There are two possibilities (A), (B) and from each of them two more branch out:

A. You send the transfer and I receive it.
A.1 I sign the (trade) transaction and send you the signature because I’m honest.
A.2 I sign the (cancel) signature because I want to get away with your Y USD.

B. You change your mind and decide to not send it, I still wait pending your action.
B.1 You sign the (trade) transaction and send me signature hoping I sign and broadcast it.
B.2 You sign the (cancel) transaction and send me the signature.

Analysis of each of those scenarios.

A.1 In this scenario I received the USD and the (trade) transaction is signed by me is in your possession, you can also sign and broadcast. We both get deposits back and you get X grin and I get Y USD.
A.2 If you also sign (cancel) signature you lose Y USD, we both get deposits back and I keep my X grin. You should not sign it.

B.1 If I sign the (trade) transaction you get my X grin, we both get deposits back and you keep your Y USD. This is an equivalent of A.2 for your advantage, I should not sign it.
B.2 I assume you changed your mind, I also sign it, we both get security deposits back, I get my X grin back and you keep your USD. The only loss is time and transaction fees.

We could also not do anything… But then I lose traded funds and in addition we both lose the deposits, everyone is a loser.

It’s just a simple example to illustrate, of course it has to be more sophisticated and take into account various scenarios.

Again, wrong. Stop trying to promote this. Just implement the slatepack standard:

  1. Always use SRS with addresses
  2. Try first with tor
  3. If Tor fails, fallback to slatepack message

If you want to promote a different workflow as standard, please use the RFC process.

1 Like

I was actually not talking about the exchange of assets as an action but was rather referring to market makers which are liquidity providers. They’re “makers” but these are people that actually bring the liquidity so that the users have someone to buy from or sell to. I guess something like this could work, but it’s probably much easier to buy Bitcoin with USD and then do a trustless atomic swap to exchange the assets. I’m not sure how bisq and others work though, perhaps they have a faster way to exchange things :man_shrugging:

He did end his post with “This is ofc controversial and i’m not saying it needs to be done this way, that’s just what makes the most sense to me” though.

1 Like

I used the word Maker not to refer to that argument, its just a standard terminology to explain such protocol. We could call them Alice and Bob if you prefer :upside_down_face:.

I think the matter if there will be “makers” is pure speculation. I don’t think anyone here could provide a definite answer. We could also discuss the matter of existence of extraterrestrial life on planets within habitable zone with oxygen and liquid water…

Jokes aside… Personally, I believe there is demand for such solution, based on how much complaints I see about the exchanges. Those people often never had any crypto and its their first experience. Such people do not have any BTC for an atomic swap. Once they are excited and interested about privacy and scalability we redirect them to some shady website that wants them to send their photos holding a passport and sheet of paper with some number… It seems not right to me.

I am not certain of that, it sounds a bit too confident. It depends in which jurisdiction you live in. Take me for example. Where I live for buying BTC I can be accused of being mixed up in criminal activities and risk having all means of payment blocked until I sign a testimony at the police station.

I can give more examples to make it less case-specific. There are many people who cannot (or don’t want) to pass through KYC to buy those BTCs and eventually end up using P2P exchange. If they would use a P2P exchange and there is a demand, why use BTC P2P exchange with crazy fees to eventually get a cryptocurrency which supports multi-signatures way better and can be transferred cheaply (if appropriate tool exists).

For me the BTC argument is valid but proves exactly opposite point. I do not want to argue about it because it is mostly a matter of personal preference. I agree it is also possible, if easier? That depends on the person.

I think the BTC atomic swaps will work great for people who already have BTC or have easy access to BTC. For others they are still helpful, but in my opinion much less helpful than a good P2P exchange. Especially when it comes to smaller amounts.

2 Likes

What about a Grin ATM to buy Grin using cash like this GitHub - 21isenough/LightningATM: This ATM sends bitcoin over the Lightning Network - pretty fun.

5 Likes

I don’t think that’s wrong. I remember you’ve said that historically the exchanges were bad at finalizing, but if they would use the repost api then i don’t see how that would be the case

Indeed amazing! Not P2P of course but still amazing and deserves its own thread. The readme does not really mention what Lightning network actually is, anyone can recommend any intro from zero? I do not know how relevant this concept is for grin.

The issue with crypto ATMs is that (depending on the country/jurisdiction) it requires you to do a lot of paperwork to run one legally, because of KYC/AML and all that.

Why? I mean, imagine that I have a bar and I want to trade Grin for cash using a Raspberry Pi, I think people are free to do it, it is like a candy machine.

1 Like

Ok something like this https://localbitcoins.com/ by Jeremias Kangas https://twitter.com/LocalBitcoins may work, any of your Core dev kindly check and confirm will it work. I feel its the most simple and easy way.

3 Likes