bisq-network / bisq

A decentralized bitcoin exchange network
https://bisq.network
GNU Affero General Public License v3.0
4.68k stars 1.26k forks source link

Takers transactions are inconsistent with what is shown to them at take offer time #3733

Open devinbileck opened 4 years ago

devinbileck commented 4 years ago

Description

When Bob takes an offer from Alice, then his actual transactions are inconsistent with what is shown to him at take offer time.

Version

release/v1.2.4 (c2e8806d165ff3bcc20b65dbe27052be2d1fd9f4)

Steps to reproduce

  1. Alice creates an offer to buy BTC as maker
  2. Bob takes the offer to sell BTC as taker, using BTC as trade fees

Expected behaviour

The multisig deposit shown in Bob's transactions is based on the amount to sell + security deposit, and his taker/tx fees are trade + mining fees.

Actual behaviour

The multisig deposit is greater than the amount to sell + security deposit, and the taker/tx fees are less than that was shown during take offer time.

Screenshots

[1] Funds required shown to Bob prior to taking the offer. Amount to sell + security deposit = 0.015 <-- This should be the multisig deposit Trade fee + mining fees = 0.000164‬ <-- This should be the taker + tx fees image

[2] After Bob takes the offer, these are his transactions. Taker + tx fees = 0.000088 <-- This does not match Trade fee + mining fees above Multisig deposit = 0.015076 <-- This does not match Amount to sell + security deposit above image

[3] Observing the trade details. Taker mining fee = 0.000078 <-- This does not match the mining fee shown above in [1] (0.000114) image

Device or machine

devinbileck commented 4 years ago

Maybe I am just misinterpreting these numbers. But I would appreciate someone to review this as well.

beingindot commented 4 years ago

when testing assumed that, since it's going as two btc transactions fees are split. anyways if there was simple note or doc explaining how the split up happens in real it would help for testing.

ripcurlx commented 4 years ago

when testing assumed that, since it's going as two btc transactions fees are split. anyways if there was simple note or doc explaining how the split up happens in real it would help for testing.

Yes, the mining fees are split and added two these two transactions. I think the label Taker and tx fee is misleading if as tx fee/mining fee is added to both transactions. Possibly it would be better just to write Taker fee and leave out the tx fee/mining fee wording as I think it is common knowledge how the mining fee is used.

[3] Observing the trade details. Taker mining fee = 0.000078 <-- This does not match the mining fee shown above in [1] (0.000114)

This is something I also don't understand the calculation of it. https://github.com/bisq-network/bisq/blob/d0bed936bd55e93b7e3fba616da31ac6f9eaf10c/desktop/src/main/java/bisq/desktop/main/overlays/windows/TradeDetailsWindow.java#L220 @chimp1984 Why are we doing a multiply in the UI to calculate the mining fee for taker?

cd2357 commented 4 years ago

This is something I also don't understand the calculation of it.

https://github.com/bisq-network/bisq/blob/d0bed936bd55e93b7e3fba616da31ac6f9eaf10c/desktop/src/main/java/bisq/desktop/main/overlays/windows/TradeDetailsWindow.java#L220

@chimp1984 Why are we doing a multiply in the UI to calculate the mining fee for taker?

Probably multiplying by 3 to get a fee estimate that would account for the 3 on-chain transactions involved in the trade?