joinmarket-clientserver icon indicating copy to clipboard operation
joinmarket-clientserver copied to clipboard

Question about coinjoin fee distribution to the makers and takers

Open AngeloMetal opened this issue 1 year ago • 7 comments

This is more of a question than an issue, so forgive me for submitting it here, but I honestly don't know where else it fits.

As per my understanding of the JoinMarket protocol, takers are the users who select one of the orders made by a maker, which is described in here.

As far as I understand, the coinjoin fee is paid exclusively by the taker. Nothing is being paid by the maker. As per the current orderbook, there are lots of makers who are willing to do coinjoins for free (as they don't pay anything in the mining fee, and get to have their coins joined).

My question is: isn't it unfair to have the taker pay all the makers' (collaborators') transaction fee? Wouldn't it be more appropriate to have several takers/users do a coinjoin together, each of which pays their own input(s)? Or simply, have the makers pay their own inputs when they're chosen. It's just the only unattractive part of JoinMarket, the cost of coinjoin; especially currently, with median fee 10 sat/vb, have me paying a monstrous-in-size transaction --the inputs of 10 collaborators-- is just not good.

AngeloMetal avatar Jun 30 '23 14:06 AngeloMetal

As per my understanding of the JoinMarket protocol, takers are the users who select one of the orders made by a maker, which is described in here.

Correct.

As far as I understand, the coinjoin fee is paid exclusively by the taker. Nothing is being paid by the maker.

Also correct.

As per the current orderbook, there are lots of makers who are willing to do coinjoins for free (as they don't pay anything in the mining fee, and get to have their coins joined).

Ideally for a gain, not just for free. But there are also makers that care more about privacy than making money, and they generally don't ask the taker anything (i.e., they set their fees to ~0).

My question is: isn't it unfair to have the taker pay all the makers' (collaborators') transaction fee?

The taker pays for a service. He can CoinJoin at any time in a matter of minutes, he can choose everything in the transactions (number of counterparties, amount, feerate, etc.), and gets the most privacy (as the coordinator, he's the only one to know the input-output linkages). On the other hand, the maker has to wait minutes/hours/days/who knows, he has no control over the transaction except for his own inputs and outputs, and he's revealing the linkage to the taker.

Wouldn't it be more appropriate to have several takers/users do a coinjoin together, each of which pays their own input(s)?

This is an interesting idea. It seems quite involved to build from a technical POV, and it would create a new problem of coordination. As a taker, you would then have to wait for other takers to join you, instead of being able to initiate a CoinJoin at any time. And how do you agree on the amount? These and others are exactly the kind of problems solved by the makers thanks to an economic incentive.

Or simply, have the makers pay their own inputs when they're chosen.

I'm not sure how this would work. If the makers were forced to pay the miner fees, which are often bigger than the fee they get as payment, what would be their incentive to be makers in the first place? They would pay almost (not always, but on average seems to me kinda) the same as the taker, but without any of his benefits.

It's just the only unattractive part of JoinMarket, the cost of coinjoin; especially currently, with median fee 10 sat/vb, have me paying a monstrous-in-size transaction --the inputs of 10 collaborators-- is just not good.

As I see it, it's mostly the cost of using the blockchain and being your own coordinator. You can create any CoinJoin transaction you want, at any time, without any third parties. In general, JoinMarket is not best suited for a (very) small amount of bitcoin, and it definitely can get expensive in a high fee environment (tho this is shared amongst all the CoinJoin implementations.)

Ultimately, if you are not in a rush, you can be a maker yourself, and get the free CoinJoins. Alternating between the two roles is also generally the best from a privacy perspective.

PulpCattel avatar Jun 30 '23 16:06 PulpCattel

As a taker, you would then have to wait for other takers to join you, instead of being able to initiate a CoinJoin at any time. And how do you agree on the amount?

I can think of it as "coinjoin rooms". Each taker can enter one such room, and wait for an undefined time to have other takers join him. Takers can create as many of these rooms as they want, each of which specifies different criteria (i.e., room with 1 BTC coinjoin etc.)

Ultimately, if you are not in a rush, you can be a maker yourself, and get the free CoinJoins. Alternating between the two roles is also generally the best from a privacy perspective.

This is practically not an option. Unless you have lots of money to compete with the JoinMarket whales, you'll most likely never going to make it.

I had just done a Wasabi coinjoin in the past, and I remember paying very little in comparison with JoinMarket, having my coins joined in a much bigger coinjoin, and I just don't understand why that happened, and why it can't be implemented in a decentralized manner a-la JoinMarket.

AngeloMetal avatar Jul 01 '23 07:07 AngeloMetal

I can think of it as "coinjoin rooms". Each taker can enter one such room, and wait for an undefined time to have other takers join him.

Basically "dynamic" CoinJoin pools? But waiting an undefined period of time is not what the user (taker/maker doesn't seem to apply anymore in this scenario) wants, he wants to do a CoinJoin right now, with a certain amount (which is a core feature of JoinMarket and unique to it) and all.

This is practically not an option. Unless you have lots of money to compete with the JoinMarket whales, you'll most likely never going to make it.

Have you tried? It of course depends on what "going to make it" means for you. If you mean, to make money, or do it quickly, then most likely you are right (think of it as a Lightning router, you need a certain amount of capital), but if you mean to get free CoinJoins over time, then it's absolutely possible to make it over weeks and months.

I had just done a Wasabi coinjoin in the past, and I remember paying very little in comparison with JoinMarket, having my coins joined in a much bigger coinjoin, and I just don't understand why that happened

Wasabi uses a central coordinator that does everything for you. From my personal experience, all things considered, I doubt Wasabi is all that much cheaper than JoinMarket, but has definitely nice features (like huge CoinJoins with hundreds of users). I would say, if being your own coordinator is not particularly important to you, using Wasabi (with your own node) could definitely be a viable option. It's also overall easier to use and prettier, mostly thanks to a centralized (business) model.

why it can't be implemented in a decentralized manner a-la JoinMarket.

I don't know how it could/should be implemented, but the history of CoinJoin is full of different models and protocols. The decentralized manner "a-la JoinMarket" is a market model. The pool model you propose would be an entirely different system with its own tradeoffs and engineering complexity. Maybe someone will build it one day.

PulpCattel avatar Jul 01 '23 10:07 PulpCattel

Basically "dynamic" CoinJoin pools? But waiting an undefined period of time is not what the user (taker/maker doesn't seem to apply anymore in this scenario) wants, he wants to do a CoinJoin right now, with a certain amount (which is a core feature of JoinMarket and unique to it) and all.

Sure, but why not having it as optional? Wouldn't it be better for the users to choose which one is more suitable for them? For example, I don't have a problem on waiting a day for the room to fill with a total of 50 input / 1 BTC worth, each of which is paid by its owner.

From my personal experience, all things considered, I doubt Wasabi is all that much cheaper than JoinMarket, but has definitely nice features (like huge CoinJoins with hundreds of users).

From my experience, you don't pay for other people's inputs.

AngeloMetal avatar Jul 01 '23 10:07 AngeloMetal

Sure, but why not having it as optional? Wouldn't it be better for the users to choose which one is more suitable for them?

It seems to me just a matter of building another software, why having it in JoinMarket if it has nothing to do with it? There are many CoinJoin models out there, I don't think it make too much sense to have everything here. And I'm totally ignoring the pro and cons and if it's worth at all to build such software.

For example, I don't have a problem on waiting a day for the room to fill with a total of 50 input / 1 BTC worth, each of which is paid by its owner.

I suspect you are greatly underestimating the complexity behind amount coordination and coordination in general, and how hard it would be to find peers for CoinJoins. But anyway, it doesn't make too much sense to discuss the details of such imaginary protocol here. It doesn't seem particularly JoinMarket related.

From my experience, you don't pay for other people's inputs.

But you pay a 0.3% fee by default (of 1 BTC it's relatively a lot) + the miner fees of your inputs/outputs in every transaction. The new Wasabi software also doesn't allow coin-control at all, which can make things worse. And you can't choose the amount, so you might have to do extra transactions to get what you want. Plus possibly other things. As always, try it yourself and judge what works best for you.

PulpCattel avatar Jul 01 '23 11:07 PulpCattel

The new Wasabi software also doesn't allow coin-control at all, which can make things worse.

Not true. https://blog.wasabiwallet.io/coin-control-is-back/

kristapsk avatar Jul 01 '23 12:07 kristapsk

Not true.

That is only for sending, right? You can't select the inputs to the CoinJoin.

PulpCattel avatar Jul 01 '23 13:07 PulpCattel