Closed bonomat closed 1 year ago
to be precise, we currently show "spendable" utxos, which in this context means:
https://docs.rs/bdk/latest/bdk/struct.Balance.html#method.get_spendable
I'm not sure that it's worth the additional UI complexity; how much of a difference will it make if we already take into account our own unconfirmed utxos? If it's about external funding, then the user will likely not notice any difference, especially now when we need to manually hit 'sync' button.
I checked yesterday with new wallet: adding funds on testnet was blazingly fast after using a faucet.
I'm not sure that it's worth the additional UI complexity;
I'd say this is Bitcoin-wallet best practice :)
how much of a difference will it make if we already take into account our own unconfirmed utxos?
A first time user will not have any change addresses and own unconfirmed utxos.
If it's about external funding, then the user will likely not notice any difference, especially now when we need to manually hit 'sync' button.
This was the reason why I opened the ticket. It does take a while.
I checked yesterday with new wallet: adding funds on testnet was blazingly fast after using a faucet.
Sounds like you were lucky... it will take a while if you have to wait for a block for >10minutes.
sure; displaying this in the UI sounds indeed like a good improvement. It is a positive confirmation after all.
I think I got lucky that I used a good faucet that pays higher tx fees; that would have not happened on mainnet :-) I agree that with Poisson distribution user is more likely to wait 10 mins. :D
from other perspective (ie acting on unconfirmed utxos not generated by the wallet) - don't we run the risk of a reorg and the transaction not making it on chain after all, invalidating the CFD?
from other perspective (ie acting on unconfirmed utxos not generated by the wallet) - don't we run the risk of a reorg and the transaction not making it on chain after all, invalidating the CFD?
I think so (is reorg the correct term?). However, we don't invalidate the CFD as it's technically only open once the lock transaction is confirmed.
from other perspective (ie acting on unconfirmed utxos not generated by the wallet) - don't we run the risk of a reorg and the transaction not making it on chain after all, invalidating the CFD?
I think so (is reorg the correct term?). However, we don't invalidate the CFD as it's technically only open once the lock transaction is confirmed.
Thank you for pointing out that "reorg" was not the correct term (I'm still learning 🙃). What I meant was possibility of these utxos being included a block with a higher tx fee leading to our lock tx being rejected afterwards. As you pointed out, there is no risk for the parties, as the CFD is not being created then.
However, my point is that in such case for a casual user it would result in a "failed" CFD that might not even be noticed by them until much later on, knowing that they missed out on establishing one (push notifications would alleviate the pain a bit, but then the user would need to create a new one anyway).
I guess the old decision was made on the grounds that there's nothing to gain from a party doing this on purpose, so we can dismiss these concerns?
I guess the old decision was made on the grounds that there's nothing to gain from a party doing this on purpose, so we can dismiss these concerns?
Yes. In addition, we thought it's in the interest of the taker to open the position and hence he would not do it himself. If he tries to double spend himself then he expects already that his position won't be open. And for the maker, we would never do that 😇
I'd dismiss this until it becomes a concern 😬
This project is unmaintained
Ever since we upgraded bdk to 0.21 we only show confirmed balance in our wallet. It was a conscious decision to show unconfirmed as well so that we can open a position fast.
We could extend our
balance
field to a complex type showing both confirmed and un-confirmed balances. That way we can show it in the frontend better (e.g. something likebalance : 50BTC (*+1000 BTC unconfirmed)
) and continue funding a position with un-confirmed utxos.