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

Add option to withdraw all funds from chequebook to wallet #499

Closed
crtahlin opened this issue May 11, 2024 · 4 comments · Fixed by #519
Closed

Add option to withdraw all funds from chequebook to wallet #499

crtahlin opened this issue May 11, 2024 · 4 comments · Fixed by #519
Labels

Comments

@crtahlin
Copy link

crtahlin commented May 11, 2024

Add option to withdraw all funds from chequebook to wallet, for example:

swarm-cli cheque withdraw --all

Would withdraw all the funds from the chequebook to the wallet. This would be used used when shutting down a bee node.

The could also be an option to withdraw just available funds (not the owed amounts), e.g.:

swarm-cli cheque withdraw --all-available
@bee-runner bee-runner bot added the issue label May 11, 2024
@ldeffenb
Copy link

Wait, are you saying that it is possible to withdraw the owed amounts and not just up to the available funds? So, you can have a node that issues a bunch of cheques, then withdraw the full amount and if/when those cheques are cashed, they will bounce?

@crtahlin
Copy link
Author

Actually, my node(s) did not have any owed amounts, so I just presumed that any withdrawal is possible, even all the funds. If not, then off course just one option is needed. Or maybe in any case just one option is needed, but off course then it also makes sense to add the limit is manual amount is entered (if it does not exist currently), to allow withdrawal only up to what is not owed.

@crtahlin
Copy link
Author

It does say here: https://docs.ethswarm.org/docs/bee/working-with-bee/cashing-out/

"Holding on to a swap-cheque is risky; it is possible that the owner of the chequebook has issued cheques worth more xBZZ than is contained in their chequebook contract."

But I guess they would be using some kind of malicious Bee nodes to get to that state, a proper Bee should probably not allow that (?).

@ldeffenb
Copy link

But I guess they would be using some kind of malicious Bee nodes to get to that state, a proper Bee should probably not allow that (?).

That was my understanding. I have certainly not seen any of my nodes overdraw the chequebook, and I have had some nodes take it down to near zero available. They just stop issuing cheques and slow themselves down to the pseudo- "free" settlements until I deposit more to the chequebook.

@Cafe137 Cafe137 linked a pull request Jun 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants