[bisq-network/bisq] Create order using the same tx fee specified at funding (#4266)

James Cox notifications at github.com
Mon Jun 22 03:50:31 UTC 2020


## Scenario:

- User's Bisq wallet is empty.
- Fee service reports txFeePerByte=10
- User enters offer to buy 0.01 BTC using BTC option for the fees.  
- Fund your offer screen tells him to deposit 0.006076 BTC (0.006 for deposit, 0.00005 for trade fee, 0.0000260 for miner fees)
- Fee service reports txFeePerByte=26
- User sends 0.0006076 BTC to fund the offer.
- User reviews the funded offer and clicks to proceed.
- The system reports insufficient value: needed 0.0000416 more.
- This is becuase the transaction to create the offer was being executed at 26 sats per byte, whereas the at the funding stage it was 10 sats per byte.


Log excerpt of this scenario is below, full log is in #4278

    Mai-31 20:05:21.430 [JavaFX Application Thread] INFO  b.c.p.f.FeeService: BTC tx fee: txFeePerByte=10 
    Mai-31 20:06:51.709 [JavaFX Application Thread] INFO  o.b.w.Wallet: Completing send tx with 2 outputs totalling 0.00605 BTC and a fee of 0.00 BTC/kB 
    Mai-31 20:06:51.710 [JavaFX Application Thread] WARN  o.b.w.Wallet: Insufficient value in wallet for send: needed 0.005205 BTC more 
    Mai-31 20:06:51.711 [JavaFX Application Thread] INFO  b.c.b.TxFeeEstimationService: We cannot do the fee estimation because there are not enough funds in the wallet. This is expected if the user pays from an external wallet. In that case we use an estimated tx size of 260 bytes. 
    Mai-31 20:06:51.711 [JavaFX Application Thread] INFO  b.c.b.TxFeeEstimationService: Fee estimation resulted in a tx size of 260 bytes and a tx fee of 2600 Sat. 

    Mai-31 20:32:35.931 [JavaFX Application Thread] INFO  b.c.p.f.FeeService: BTC tx fee: txFeePerByte=26 
    Mai-31 20:36:36.346 [BlockingClient network thread for c6ac4jdfyeiakex2.onion:8333] INFO  o.b.w.Wallet: Received a pending transaction 5271d0d8392a2d09ddea75e4445fcd10a70f21cdb6b5c11658d0afd2842661f8 that spends 0.00 BTC from our own wallet, and sends us 0.006076 BTC 
    Mai-31 20:36:36.346 [BlockingClient network thread for c6ac4jdfyeiakex2.onion:8333] INFO  o.b.w.Wallet: commitTx of 5271d0d8392a2d09ddea75e4445fcd10a70f21cdb6b5c11658d0afd2842661f8 
    Mai-31 20:36:36.347 [BlockingClient network thread for c6ac4jdfyeiakex2.onion:8333] INFO  o.b.w.Wallet: ->pending: 5271d0d8392a2d09ddea75e4445fcd10a70f21cdb6b5c11658d0afd2842661f8 
    Mai-31 20:36:36.348 [BlockingClient network thread for c6ac4jdfyeiakex2.onion:8333] INFO  o.b.w.Wallet: Estimated balance is now: 0.006947 BTC 

    Mai-31 20:36:49.589 [JavaFX Application Thread] INFO  o.b.w.Wallet: Completing send tx with 2 outputs totalling 0.00605 BTC and a fee of 0.00 BTC/kB 
    Mai-31 20:36:49.590 [JavaFX Application Thread] WARN  o.b.w.Wallet: Insufficient value in wallet for send: needed 0.0052466 BTC more 
    Mai-31 20:36:49.591 [JavaFX Application Thread] INFO  b.c.b.TxFeeEstimationService: We cannot do the fee estimation because there are not enough funds in the wallet. This is expected if the user pays from an external wallet. In that case we use an estimated tx size of 260 bytes. 
    Mai-31 20:36:49.591 [JavaFX Application Thread] INFO  b.c.b.TxFeeEstimationService: Fee estimation resulted in a tx size of 260 bytes and a tx fee of 6760 Sat. 

    **[DIFFERENCE BETWEEN 0.005205 and 0.0052466 IS 0.00004160 => exactly what's missing below]**:

    Mai-31 20:36:49.588 [JavaFX Application Thread] INFO  b.c.o.CreateOfferService: hCrjCljy-0f34c9da-4e9e-4df7-a765-928665a9471e-134 EUR BUY 88091780 true -0.03 1000000 1000000 0.15 f0de6d7a-31e6-4647-af14-f3ce141640f8 

    Mai-31 20:36:49.589 [JavaFX Application Thread] INFO  o.b.w.Wallet: Completing send tx with 2 outputs totalling 0.00605 BTC and a fee of 0.00 BTC/kB 
    Mai-31 20:36:49.590 [JavaFX Application Thread] WARN  o.b.w.Wallet: Insufficient value in wallet for send: needed 0.0052466 BTC more 

    Mai-31 20:36:49.591 [JavaFX Application Thread] INFO  b.c.b.TxFeeEstimationService: We cannot do the fee estimation because there are not enough funds in the wallet. This is expected if the user pays from an external wallet. In that case we use an estimated tx size of 260 bytes. 
    Mai-31 20:36:49.591 [JavaFX Application Thread] INFO  b.c.b.TxFeeEstimationService: Fee estimation resulted in a tx size of 260 bytes and a tx fee of 6760 Sat. 

    Mai-31 20:37:24.175 [JavaFX Application Thread] INFO  b.c.t.TaskRunner: Run task: ValidateOffer 
    Mai-31 20:37:24.179 [JavaFX Application Thread] INFO  b.c.t.TaskRunner: Run task: CheckNumberOfUnconfirmedTransactions 
    Mai-31 20:37:24.179 [JavaFX Application Thread] INFO  b.c.t.TaskRunner: Run task: CreateMakerFeeTx 

    Mai-31 20:37:24.206 [JavaFX Application Thread] INFO  o.b.w.Wallet: Completing send tx with 2 outputs totalling 0.00605 BTC and a fee of 0.00 BTC/kB 
    Mai-31 20:37:24.206 [JavaFX Application Thread] WARN  o.b.w.Wallet: Insufficient value in wallet for send: needed 0.0000416 BTC more 

    Mai-31 20:37:24.207 [JavaFX Application Thread] WARN  b.c.b.w.TradeWalletService: Balance = 607600; CoinSelector = bisq.core.btc.wallet.BtcCoinSelector at 1d5c198d 
    Mai-31 20:37:24.209 [JavaFX Application Thread] WARN  b.c.b.w.TradeWalletService: createBtcTradingFeeTx failed: tradingFeeTx=  da573b2900c1743ca513f1e58a542cb7d319e64c2993ee1e5fcf0b2508efd09a
         INCOMPLETE: No inputs!
         out  HASH160 PUSHDATA(20)[5c95d9cf9d48683284dff53379acc296eb214883] EQUAL 0.00005 BTC (5000) ScriptPubKey: a9145c95d9cf9d48683284dff53379acc296eb21488387 Address:3A8Zc1XioE2HRzYfbb5P8iemCS72M6vRJV 
         out  DUP HASH160 PUSHDATA(20)[df97c3da231da8549913008f579366c6f44debfd] EQUALVERIFY CHECKSIG 0.006 BTC (600000) ScriptPubKey: 76a914df97c3da231da8549913008f579366c6f44debfd88ac Address:1MPFVbiTSH2yVJ1JswpSSh9JyoNGYBoyHc 
         prps UNKNOWN
    , txOutputs=[TxOut of 0.00005 BTC to 3A8Zc1XioE2HRzYfbb5P8iemCS72M6vRJV script:HASH160 PUSHDATA(20)[5c95d9cf9d48683284dff53379acc296eb214883] EQUAL, TxOut of 0.006 BTC to 1MPFVbiTSH2yVJ1JswpSSh9JyoNGYBoyHc script:DUP HASH160 PUSHDATA(20)[df97c3da231da8549913008f579366c6f44debfd] EQUALVERIFY CHECKSIG] 
    Mai-31 20:37:24.212 [JavaFX Application Thread] ERROR b.c.t.Task: An error occurred at task: CreateMakerFeeTx org.bitcoinj.core.InsufficientMoneyException: Insufficient money,  missing 0.0000416 BTC


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4266#issuecomment-647256814
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200621/9d489e14/attachment-0001.html>


More information about the bisq-github mailing list