Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The available balance button #3502

Open
AjaxPop opened this issue Mar 31, 2024 · 15 comments
Open

The available balance button #3502

AjaxPop opened this issue Mar 31, 2024 · 15 comments

Comments

@AjaxPop
Copy link
Contributor

AjaxPop commented Mar 31, 2024

Feature Request

Screenshot from 2024-03-31 08-09-19

Describe the Feature Request
The use available balance button allows users to send the full available amount in their account to a specified address.

Describe Preferred Solution
When you click on the button, it will automatically fill in the full available amount in the amount text field.

Related Code
The feature is already available on Bitcoin Core.

@AjaxPop AjaxPop changed the title Use available balance button The available balance button Mar 31, 2024
@georgeartem
Copy link

georgeartem commented Apr 1, 2024 via email

@patricklodder
Copy link
Member

This feature seems like it would be a vulnerability waiting to be massively exploited.

Please elaborate.

@georgeartem
Copy link

georgeartem commented Apr 1, 2024 via email

@patricklodder
Copy link
Member

The end result is a zero day exploit on your hands.

With "elaborate", I meant: how is a button that selects all spendable inputs a vulnerability, i.e. what additional risk does the button add? Especially since right now, there already is a button in coin control that lets you select all inputs, so this isn't new functionality in that sense. Additionally: how does this proposed button heighten the risk?

Rationale for this not increasing remote exploit risk: if I can RCE on your Qt wallet, calling the existing GetBalance() + SendMoney() is a shorter execution path than triggering a button on a form, filling out the form items, and triggering the send button.

Both paths are however secured by wallet passphrase. So if this were a proposal to circumvent or weaken that, I would agree with your sentiment; I don't see a reason for this concept to do that - please correct me if I'm wrong here.

@georgeartem
Copy link

georgeartem commented Apr 2, 2024 via email

@georgeartem
Copy link

georgeartem commented Apr 2, 2024 via email

@patricklodder
Copy link
Member

The additional risk is that it would wipe out the entire wallet in one click if exploited.

How does the attacker get around the wallet passphrase?

@georgeartem
Copy link

georgeartem commented Apr 2, 2024 via email

@georgeartem
Copy link

georgeartem commented Apr 2, 2024 via email

@georgeartem
Copy link

georgeartem commented Apr 2, 2024 via email

@patricklodder
Copy link
Member

This is the current flow that the button would replace:

empty-wallet.mp4

Adding or not adding the proposed feature does not significantly impact the security, in my opinion, because it's easy to do today. If you add a wallet passphrase today, you have the same vulnerabilities as you describe. I don't agree that obstructing the user will lead to better security. Instead, I think that complicated UX leads to mistakes, whereas simplifying UX allows people to think about the important parts, like "hey how do I secure this?".

@georgeartem
Copy link

Ok

@Anish-M-code
Copy link
Contributor

Anish-M-code commented Apr 6, 2024

@patricklodder @AjaxPop I would like to try to implement this feature , but i have few doubts , is this feature request accepted because i didn't see any label attached to this issue , Secondly is this feature request intended for 1.15 or 1.21 version ?

@patricklodder
Copy link
Member

patricklodder commented Apr 6, 2024

is this feature request accepted because i didn't see any label attached to this issue

There's no gatekeeping on requests, feel free to implement.

Secondly is this feature request intended for 1.15 or 1.21 version ?

1.21 already has this, so this is a backport for 1.15

i didn't see any label attached to this issue

Adding, sorry for being lazy

@patricklodder
Copy link
Member

This may help to get started with the backport: the Bitcoin Core pull requests this was done in initially is bitcoin/bitcoin#11316. You will want to look if there have been any subsequent fixes on the introduced code, let me know if you need help analyzing.

Anish-M-code added a commit to Anish-M-code/dogecoin that referenced this issue Apr 7, 2024
Backport Available Balance Button from Bitcoin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants