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

[Validator Staking] Update withdraw_funds to withdraw contract's balance #508

Open
cowboy0015 opened this issue Jul 8, 2024 — with Linear · 0 comments
Open

[Validator Staking] Update withdraw_funds to withdraw contract's balance #508

cowboy0015 opened this issue Jul 8, 2024 — with Linear · 0 comments
Assignees

Comments

Copy link
Member

Description

Funds can be locked at the contract due to various reasons.

Possible cases are

As it can be seen from above audit results, funds can be locked in the contract due slashed or kicked validators, validator versions and validator config. To deal with frozen funds in any unexpected situation, we need to update the withdraw_funds to withdraw the whole contract balance.

Implementation

Add following parameters to the execute_withdraw_fund function.

  • denom: Option
  • recipient: Option

If denom is None, contract's all balance will be gained using AllBalanceResponse and withdraw all balances.

If recipient is None, info.sender will be used as the withdraw address

Acceptance Criteria

  • withdraw_funds that returns the contract's balance
  • unit tests
  • integration test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant