Fee models for the Bisq 2 MuSig protocol #2922
Replies: 10 comments 25 replies
-
LightningA lightning node is actually not that cumbersome to install, at least for someone who has a full btc node running already, plenty of guides and pre-made scripts. The biggest issue I see is that to receive payments, you need to have inbound channels, and those can be hard to come by if your node exists only to receive payments and has to source inbound liquidity by itself. Besides, all implementations support connecting through tor only, as long as you setup the relevant option, which will make the node much slower as a router, but receiving payments will not be penalized, as long as you provide to always be online. Bisq1 modelI started thinking about using an xpub before noticing you already had listed that option. ReputationMy personal conviction is that, without decay/increasing target, the returns for the DAO would become insufficient in the medium term, and with decay/increasing target in mind, even more "normal" users would be scared by the protocol than the no-decay version, and this would happen unless the free-tier is increased to an amount large enough that would in turn even further decrease the DAO returns. As you observed though, this is all to be seen, as you cannot exactly guess the reaction of the users ahead of time, with so many variables being involved. CombinationThe probability of a market split could become higher than one would think, because the requirements of the Reputation model are not just for the seller, as in BE, but for both. So the probability that a trade will not happen in one platform is actually doubled, as any one of the two peers could have reason to not choose that one version of the trade model but rather the other one. ConclusionI would prefer to have the existing model in place, even if with some modifications as you listed, but I think an evaluation of the old BM model vs its suggested evolution should be considered in relation to what BMs themselves prefer. |
Beta Was this translation helpful? Give feedback.
-
I understand that Bisq 2 works without the need for BSQ. This avoids the drawbacks caused by users having to be in consensus with the DAO. That being said I still think it would be good for traders on Bisq 2 to be able to use BSQ to pay trade fees. Many traders will have purchased BSQ with the expectation they can use them in the future to reduce their trade fees. I am not technical enough to know what is feasible so I will try and describe what my preference would be for the fee model for the MuSig protocol. I would go for the following option 'similar fee model as in Bisq 1' Would it be possible in this option for traders wanting to pay trade fees in BSQ to do the following:
This way the fee transaction is removed from the transaction itself if someone chooses to use BSQ, AND traders wanting to get a ~50% discount for paying with BSQ can still do so. if someone is not bothered about using BSQ to save fees they can just go down the route of using bitcoin to pay fees. They might also pay a little more for the on-chain transaction but this is their decision. In cases where both the maker and taker choose to use BSQ their will be nothing on-chain to say the transaction was a BSQ transaction. We can even give the makers of BSQ offers a 50 BSQ a 'Better Privacy' badge or the like to let takers who are more privacy conscious know what offers will not be viable as Bisq trades on-chain IF they use BSQ to pay the trade fee. I might be applying the maker / taker fee model incorrectly to the new protocol, in which case I propose the offer maker could pay both the maker and takers trade fees with their BSQ balance. In this instance the offer would get 'Better Privacy' & 'Fee free' badge to display alongside the offer. Thus making their offers more attractive to takers. We could also go down the route of having only the makers pay fees to simply things and reduce the number of fee transactions. |
Beta Was this translation helpful? Give feedback.
-
I made in the initial post a mistake to refer to the initial model of one deposit tx instead to the latest update [1] where there are 2 deposit tx for each trader, thus the privacy implications if case of a mixed fee model would not effect the other trader. |
Beta Was this translation helpful? Give feedback.
-
Based on the idea for a RepUp shop system we could apply that also to the normal fee model. There can be different ticket types for different use cases (MuSig trade fee, top up reputation, fee for other protocols, network usage fee,...). Note, that traders who have BSQ and are willing to run Bisq 1 could be their own ticket service, short-cutting the payment and avoiding privacy and trust issues. It is not required to run the infrastructure in that case but only to run Bisq 1. The app would offer the UX for applying the conceptual parts of the process. Details about that, can be discussed at a later stage. Emitter service for ticketsRequirement for the serviceFor security reasons the service need to be a bonded node similar like the oracle node. Traders perspectiveThe trader can pay in whatever currency and payment method the service accepts.
The trader choose what amount they want to purchase and the service responds how much BSQ-credit that ticket will contain. The fee for the service and the costs for conversion and miner fees are included in that rate. Different payment methods will have different rates. Verification:ProofOfBurnDataWhen burning BSQ the ticket service use a prefix and it's profile ID for the opReturn data (preimage in the UI). The oracle nodes publish all burn txs with the opReturn data to the network once the tx is confirmed. TicketDataWhen a trader buys a ticket the service need to check that it has still enough unconsumed balance (burned BSQ not already used). We use the oracle node as we need to avoid that the service can remove that data by themself which would reset their balance. The data contains (not covering here the oracle data):
Anyone in the network including the trader can verify that the service had sufficient BSQ burned to cover that ticket. The oracle would also not publish that data if that would not be the case. TradeFeeTicketDataWhen the trader requests a ticket for a trade fee from the service, the amount for the trade-fee-ticket will be deducted from the service's balance and the TradeFeeTicketData is sent to the trader and exchanged with the trade peer in the trade process. Note, that this data is not publicly visible but only know to the 2 traders and the service. The data contains:
For verification we look up the TicketData by the UID and check if that is valid. We do not need to verify if the TicketData has not been over-used as the service keeps track of that balance and has no incentive to cheat. With their signature they confirm that the balance was covered. Privacy implicationsThe service learns about the number of trades and depending on the privacy of the ticket payment the trader might leak a linkage to the deposit tx. Outside observers cannot derive that. The turnover of the service will be publicly visible due the published TicketData. Pruning of used TicketData.To avoid ever growing network data we can prune used up TicketData once the backing ProofOfBurnData is consumed as well. LeftoversA small problem will be with remaining balances at ProofOfBurnData and at TicketData. I think that is a minor issue and solutions can be explored later. |
Beta Was this translation helpful? Give feedback.
-
There might be the opportunity to use the information if a user has invested in higher ticket values for a kind of reputation. E.g. it signals long-game commitment for future trades and is a metric for security. Thus we should benefit from it. As well it creates incentive to do such investments which are good for the DAO. |
Beta Was this translation helpful? Give feedback.
-
Just wanted to add a general privacy consideration for shop owners ("ticket shops"? or "ticket machines"? I am not strong on madeup names to give branding when there already are proper names in english for the same thing 😃 ) |
Beta Was this translation helpful? Give feedback.
-
Here a suggestion how the use-case for the trader using their own BSQ instead the ticket service could look like. The trader has already BSQ or purchased it on Bisq 1. The model has similarities to the ticket service but also some differences. ProofOfBurnDataWhen burning BSQ the trader uses a prefix, a nonce (large random integer number) and their pub key hash for the pre-image used for the opReturn data.
The nonce is used for privacy protection (see later). TradeFeeTicketDataAt a trade the trader creates the TradeFeeTicketData which will be exchanged with the trade peer in the trade process. The data contains (not covering here the oracle data):
The The With knowing the nonce and the pub key the peer can look up for the matching burn tx. We define the rule that a burn tx can be the parent of max 1000 TradeFeeTicketData items. To avoid that all 1000 iterations need to be executed we added the rule that the trader need to start the index with 0 and increment with each trade. Thus the peer can expect that only lower indices than the one he got have been used in previous trades. To avoid edge cases with parallel trades we can add a lenience tolerance (lets say 10), thus we iterate up to index+10 and tolerate found items. To verify that the trader has not cheated on that rule a random set of higher indices are tested to be non-existent (no TradeFeeTicketData exist with such an ID). Lets say we test 20 random numbers higher than index+10. If the peer detects such a rule violation the trade fails and the case can be reported to the mediator and lead to a ban from the network. Privacy implicationsOnly the trader and his trade peers with whom he use the same burn tx learn about the nonce and the pub key (also oracle as see later). Thus, those group of traders could learn about the number of trades and the trade volume, but nobody else. Of course all that is on the technical level and not visible to users, so as long the peer does not manipulating the code, those privacy leaks remain invisible. For a motivated spy it does not provide too much value, as it only reveals how many trades have happened, which volume as well as the link to the burn tx. PruningWe want to prune TradeFeeTicketData which have been consumed the underlying burn tx balance. As the data is hidden for public nodes including the oracle that can only be triggered by the trader. This data contains:
With the nonce and pub key as well as the signature the oracle can verify the ownership of the burn tx. LeftoversOne way to deal with leftovers would be to allow multiple TradeFeeTicketData and aggregate the leftover and the missing amount from a new burn tx for the trade fee verification. |
Beta Was this translation helpful? Give feedback.
-
I've read the entire thread, thanks to the one who shared it as I was missing it. While reading the first post, I got the impression that the combined model was the way to go, and then found that it was proposed in that same post. I liked that new users could use BTC to pay the trading fee and then gradually move to building their reputation, just like in BE. I wanted to add that I personally like the idea of a trading subscription model paid in BSQ. Let's say traders burn 10 USD per week or 30 USD per month to trade all they want. This would incentivize power traders to trade as much as possible, which would increase volume, reduce spreads, and make Bisq more useful. The cost of making another trade would only be mining fees and the opportunity cost for time and security deposits. It may not be attractive for spontaneous traders as they would have to pay too much per trade, so a per-trade model would still be required. From a marketing perspective, this could be revolutionary, but also it must be the most private way of paying trading fees as it won't require to reveal how much volume a user is trading. If Bisq revenue decreases because this model becomes too popular, the amounts required to trade could be increased. I would only consider monthly or bi-monthly max time periods for the subscription at the beginning. |
Beta Was this translation helpful? Give feedback.
-
Just to make clear which of the different models discussed here are considered so far the most likely to get used: Ticket shop concept:#2922 (comment) |
Beta Was this translation helpful? Give feedback.
-
Trade fees in the Bisq2 MuSig protocolOne of the open concept not addressed in the Bisq2 MuSig trade protocol is how the trade fees are being paied. OverviewIn current Bisq1, the trade fees are distributed to the burning men by sending them to an fixed address per contributor. This is a privacy nightmare for the contributors and an easy way for an observer to learn that the transaction is actually a bisq transaction. Also, this approach creates a lot of small UTXOs (as transaction fees tend to have small amounts). In a high fee environment this might lead to substantial losses. One fix for the privacy issue in Bisq1 would be to use silent payment as proposed in BIP-0352. Basically the sender gets a public key (much like an XPUB) from the recipient, then he derives a random address from it and sends the funds to that address. The receiver must observe the blockchain and test all UTXOs if he has the private key for them. Only he can do it as the private key is needed for that operation. That way all trade fees would go to different addresses and an observer cannot learn anything from the addresses used. In bisq1 the maker does a reservation transaction when he posts the offer. This discourages spam. For the trade fees in Bisq2 Musig protocol there are different options we can consider. Lightning payment from within BisqThe trade fees shall be send as Lightning payments. This would require the burning men to run a lightning node. Since you can run a lightning node via Tor, I think this is acceptable for burning men as they should be technical savvy. The distribution scheme could be similar to what it is right now, just using Lightning instead of onchain addresses. Maker and Taker will check that the other party actually made a payment before sending the onchain funds for the trade transaction. This solution would obviously need LN technology to be included. Even tough this would not need a complete LN wallet, as the payments can be automated, but still the following functionality must be provided:
In the Lightning network, privacy for the sender is very good. The receiver can run the node on Tor, that will give contributor a much better privacy than right now in Bisq1. Small payments are handled well in LN. But each bisq user will need a new channel. So it really pays only off, if the user is making many trades. Obviously, the big downside is the technology stack which needs to be added to Bisq for doing LN transactions. its very questionable if that is worth it. However, since Bisq does want to go into the Lightning direction anyway, this could be seen as a first step towards a technology we anyway need. So this is really a question of how much effort we want to put into this. LN with external walletWe could use an external lightning wallet for Bisq users. Bisq would still need to do some operations, like showing an invoice and verifying if the payment has been done. This would use an existing lightning wallet of the user. Integrating with it could be done via a link, which opens the wallet and transfers the invoice if the wallet is installed on the same computer as Bisq. if the external wallet in on a mobile, Bisq could show the invoice as QR code. Since this relie on an existing wallet, the user will probably not need to open a chanel specifically for the Bisq trade, he could use his existing channel(s). Obviously this is the easiest to implement and inflicts probably no additional on chain transactions/fees and has very good privacy. For the contributors they would need to run a LN node as mentioned in the last chapter. paying fees onchain with silent paymentsThe simplest on-chain solution for trade fees is probably to add a UTXO to the single transaction, which will serve as the trade fee payment. To not jeopardize the privacy, we would need to implement an address recovery according to silent payment BIP-0352 as mentioned before. This would need to onboard some pretty recent technology. Its unclear to me if there are supporting libraries and if they are mature. LN payment for listing the offer.This is in essence the same as the LN payment above, but with one change. The maker must send the LN payment at the moment when we publishes his offer, so effectively it's not a trade fee it's a listing fee. Bisq users will get only offers displayed, where the LN payment has been verified. This would prevent anybody from spamming the offer book. using Burned BSQBurning BSQ to effectively buy one or more tickets, is an idea which may be used for other things as well. unidirectional payment channelsThis concept is a predecessor to the Lightning payment channels but much simpler. A full description can be found in 'Mastering Bitcoin'. This would establish a channel with one other address. The user could pay several trade fees with it, but the needs to allocate a certain amount of BTC and that will stay reversed until he cancels the channel. This make the unidirectional channels pretty unlikely to be used. Only advantage is of course that it is simpler to implement. |
Beta Was this translation helpful? Give feedback.
-
As the discussion about the fee model in #2439 became more extended I thought its better to create its own discussion entry for it.
Goals
Considered fee models.
Using Lightning network for fee payment
Obviously using LN would be a very cost effective and fast way to pay small amount of fees. The problems though are that we would need the infrastructure both on the trader side and receiver side (Burningmen). Follow up problems are how to verify a fee payment and how to dynamically provide the invoices. I am not that familiar with LN, so I will focus on the more obvious hurdles which make it IMO already a show stopper.
Pro
Con
Conclusion
IMO the requirement for a LN infrastructure is too much of a burden at that stage. Later once a LN wallet is integrated for a LN based trade protocol thus hurdle would be resolved and that model could be re-evaluated.
Using a similar fee model as in Bisq 1
A similar model as used in Bisq 1 could be used with some adoptions to not degrade the benefits of the new MuSig protocol.
The fee payment transaction which serves also for reserving the UTXO for the deposit tx in Bisq 1 must be avoided as otherwise we lose the benefit of the 1 tx protocol.
The BM data for receiver distribution can be provided by the oracle, e.g. by publishing at each block the distribution table of the BM. As that is deterministic, multiple oracle nodes would publish the same data and there are no synchronization problems beside the timing of the publishing. This synchronization issue can be resolved by some lenience in the traders verification to exchange not only the most recent distribution table but also the previous one and tolerate if the peer has not the most recent as long there is a match with the last one (could be extended to more than 2 if needed).
The fee payment can be paid in BTC only as there is no BSQ wallet in Bisq 2 at that stage. Thus all the trade fees go to the BM, not only the BTC part as in Bisq 1.
We can improve the BM model to separate the fee payment part with the delayed payout tx (DPT) part to allow to let any BSQ stakeholder become a BM, in contrast to the current model where only DAO contributors can participate as well as remove the 11% cap. Those restrictions are for security reasons in place but are only required for the DPT use case. With such a change the number of BM can grow and the competition for burning can increase which should result in lower costs for the DAO.
The output for the fee payment can be added to the deposit transaction in the protocol. Though here we have a major problem that it destroys the privacy benefits provided by MuSig (which makes fingerprinting of trade transaction unfeasible) as it would be very easy to mark all transactions which lead to a BM address (public data) as Bisq trade transactions. This does not only degrade users privacy but also provides information about the trade volume (Bisq 2 will not use trade statistics).
There could be a model where the user run Bisq 1 with their BSQ wallet to pay the trade fee in BSQ by themself. But this would require some dev work to support that interaction and require the user to run both Bisq 1 and Bisq 2 in parallel and degrades generally the UX. The only benefit would be that it would avoid above mentioned issues but at a grave cost of dev effort and UX.
Another potential improvement could be that BM use xPub keys to generate receiver addresses. How to exactly manage that and how to make it verifiable and what are the security and privacy implications would require more analysis.
Assuming that such an improvement is feasible, it still would degrade the privacy of the deposit tx as it's structure become more easy detectable.
Pro
Con
Conclusion
IMO this model is only acceptable if the usage of xPub keys is feasible for BM.
Using a reputation based revenue model similar as in Bisq Easy
As already discussed in #2439 (comment) we can explore the option to use the reputation model as revenue source as well as an add-on to security. I will summarize here gain the main idea.
There would be no direct trade fee in MuSig but the max. allowed trade amount would be not only determined by the users signed account age witness (assuming we have a solution to import that from Bisq 1) and the risk of the payment method used, but additionally by the traders reputation. Other as in Bisq Easy reputation of both buyer and seller would be considered and only if both traders reputation is sufficient they can trade a give amount.
To not cause high barrier of entry a free tier is supported, so users without or low reputation can trade up to TBD USD (lets use 200 USD as a starting value, but the numbers need to be evaluated in more details later).
This model is also used now in Bisq Easy v2.1.1 in which we match the max. trade amount to the sellers reputation.
Assuming we use the same algorithm and reputation framework as in Bisq Easy, we can derive the max. allowed trade amount by a simple formula like:
Reputation score / TBD = max. trade amount
Lets use 10 as divisor value (need to be evaluated in more details later). Thus a score of 100 000 (e.g. 1000 BSQ burned) would allow a trade amount if 10 000 USD.
We have to keep in mind that Bisq 1 fee is about 0.8% in total. Lets take 0.5% for both sides for simplicity, thus a trade of 10k USD would cost 50 USD for each trader. With 20 such trades the user has spent 1000 USD.
As said the numbers need to be discussed later more in details, but to me it seems that is not totally out of balance.
We have to consider that high reputation allow users to trade with better price premiums and that there will be some level of competition. Beside that the reputation will have dual use for Bisq Easy and MuSig (and potentially other protocols later).
One question is if a never decaying score would become a problem long term when most traders have sufficient reputation and have no incentive to burn anymore. The competition might be a certain factor that still there might be growth, but its questionable if that is enough. Another aspect is that if Bisq would stall to a static user base it would not be a good sign overall, and Bisq should try to attract new users.
To counter that problem (if it is one) we could add a decay function.
In Bisq Easy we have even a time based boost to double reputation over the first year.
One option to dynamically adjust to that issue would be to make the decay factor dynamic on the metrics of the overall profitability of the DAO (or other related, feasible to measure metrics). The amount of burned BSQ / DAO cycle could be used and a revenue target could be vote on in the DAO (like we adjust fees via DAO voting). If the burned BSQ is below the target the decay gets more aggressive, otherwise it gets more relaxed. That way we could manage the incentives for existing traders who have burned sufficiently that they continue burning over time.
There might be better options and more simple ones... A fix static decay might work as well if correctly tuned.
An additional benefit and incentive would be if we correlate the reputation with the require security deposit. It is a reasonable assumption that users with high reputation are less likely violating the protocol thus a lower deposit is justified. Though we have to be aware that reputation has different security properties. We cannot know how many trades a user is doing in parallel thus dividing the skin in the game but that number. Security deposit is per trade and has not that problem. Thus a certain level of min. deposit need to remain, but I would estimate a reduction from 15% to 5% for a 100k score reputation would be justified.
This would benefit pro traders to whom the locked up capital in deposits is a burden and can be reduced by investing more in reputation.
Furthermore MuSig traders who are initially not interested in Bisq Easy might become more motivated to act as sellers in BE when they have anyway already reputation and they could benefit for free from potentially higher price premiums in BE.
This would serve as another additional incentive.
For the DAO such a model would be beneficial as there is no costs on the BM as middlemen to convert Bitcoin fee payments to burned BSQ. The BM would lose the revenue form fee payments from Bisq 2 (it will take a while until Bisq 1 is totally faded out). They can adopt to that by starting to burn less as it will likely take 6-12 months until the majority of fee payments have dropped (if XMR will get supported initially is an open question). So I think concerns that BM face loss of investment is not justified as there is plenty of time to adopt burn behavior.
Though for the DAO there might be potential loss in the transition period as BM will likely burn less to reduce their risks. It also might impact the BSQ market if more contributors sell BSQ instead of burning and as long the model is not in operation there will be no significant increase in demand, so the BSQ price might get negatively impacted. But those dynamics are very hard to predict as they are all interrelated - e.g. less good trade opportunities might change mind of BM again to burn more again...).
To reduce the role of BM would be overall beneficial to the DAO profitability as well as for decentralization (BM are a smaller group than DAO stakeholders).
One need also to consider that the aggregated miner costs for small fee payments, the costs for consolidation and potentially coin joins for BM adds costs to BM which are delegated to the DAO. A model where users can pay in form of larger batches as in the case when they burn BSQ is more cost efficient.
To avoid that traders need to use Bisq 1 for buying and burning BSQ we could add a "shop" like system which allows traders to top up their reputation directly with Bitcoin (or LN, XMR, or any currency/payment method the shop supports).
Lets call that system RepUp (short for reputation-top-up).
Anyone can run a RepUp service. It's a Bisq 2 node combined with a Bisq 1 node (similar as oracle setup) and require to be a bonded role.
The Tor addresses of all services get published in the Bisq 2 P2P network similar as other bonded role nodes.
They offer an API to request the list of accepted currencies and their rates (how much reputation for x amount of the chosen currency).
A trader who does not want to burn BSQ by themself can select one of the available services and send the amount they want to burn in the accepted currency to the service and will get displayed the amount of reputation score they will gain from that payment. The conversion rate will be different by currency and services and includes the service fee for the service.
As the trader need to pay upfront there need to be some security mechanism (like reputation) to avoid that malicious service run away for traders funds. Beside the BSQ bond we should find a way to show past transactions in a privacy preserving way (to be investigated).
The payment is followed by a message consisting of the profile ID of the trader which will be used by the service for the burn BSQ transaction.
The service once received the payment will start the burn BSQ transaction with the provided profile ID (calling a Bisq 1 REST API). That transaction once confirmed in the blockchain is picked up the oracle node and published to the network in the same way as in case the trader burns BSQ by themself.
For Bisq contributors this might be an attractive alternative to being a BM for trade fees. They could use their earned BSQ to burn on behalf of traders and make some profit for offering the service. Other then in the BM model that is more a predictable risk/profit model. For increased security we could even consider that only DAO contributors are permitted to be a RepUp service.
The effort for that lays from my estimation mainly in the shop-layer side as other parts are already used in similar manners. The role is just another variant of existing roles. The Oracle model has a similar setup of Bisq 2 to Bisq 1 interactions. I guess BitPay server might be a good candidate to explore for such a use case. I have no experience with shop systems or BitPay server, but I guess the dev effort for that should not more then 2-4 weeks.
This was a long read.... lets consolidate the core points.
Summary
Pro
Con
Conclusion
I think the main benefit of that model is the decoupling from the trade protocol and the flexibility as well that it merges with Bisq Easy (and potentially other protocols). The main burden to deal with BSQ can be mitigated by the RepUp service.
The core downside is the risks due that change of the economic model. Though its similar like in Bisq Easy and there it surpassed at least my expectations. More BSQ than expected got burned and many users repeatedly burn, which shows that it works for them. It was clear that Bisq Easy will not generate considerable revenue.
The economic risks for Bisq can be mitigated by dynamic factors, adding a decay fucntion and open communication that things need to get adjusted over time until it works well for both sides.
Combinations of both
We could also consider to combine the latter 2 models to reduce risks and give user more flexibility, similar as with having the option to pay the fee in BSQ in Bisq 1.
We could take into account the degradation of privacy for users who prefer the traditional fee payment (both sides), thus it would not require changes in the BM model with xPubKeys as users with higher privacy preference can simply choose the reputation model.
For the reputation model it would reduce the risks on the economic side as well as on the acceptance side and give more flexibility to traders to choose which model fits best for their profile.
If combined we could also at least initially drop the requirement for he RepUp service, as users who prefer convenience can opt in to the traditional fee model (with degraded privacy).
The main downside is that it adds more dev effort to support both models and that it partition the market as the traditional fee model degrades privacy for both sides (though that could be maybe handled by UX, e.g. let users choose to accept both models).
Pro
Con
Conclusion
The combination of both models seems to me the winning strategy. Once LN is integrated we could also consider to allow LN as another fee model. The overall theme of Bisq 2 to leave the user the choice for different options with different trade-offs applies here as well and it feels natural to support multiple fee models. The offer domain has already a
FeeOption
class for allowing different models (was designed with BTC, BSQ fee in mind).Maybe there are other alternative ideas. If you have any, please share. For those who are more experienced with LN and know the details of Bisq's tech base sufficiently to judge the feasibility of the LN option, please share your opinion. Maybe my negative conclusion is drawn from my limited LN experience.
Beta Was this translation helpful? Give feedback.
All reactions