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

CNS-850: unbond stake entry bug #1199

Merged
merged 20 commits into from
Feb 28, 2024

Conversation

oren-lava
Copy link
Collaborator

In this PR I fix a small bug in which there's a code flow that allowed a provider to fully unbond its stake, but the stake entry is not removed (and there is no unstake entry)

@oren-lava oren-lava self-assigned this Feb 7, 2024
@Yaroms
Copy link
Collaborator

Yaroms commented Feb 8, 2024

Instead of checking for 0, add a param, min_stake (ulava coin), if the stake is less than that, unstake the provider

x/dualstaking/keeper/delegate.go Outdated Show resolved Hide resolved
x/dualstaking/keeper/hooks_test.go Show resolved Hide resolved
x/pairing/keeper/staking.go Outdated Show resolved Hide resolved
x/dualstaking/keeper/delegate.go Outdated Show resolved Hide resolved
x/pairing/keeper/staking.go Outdated Show resolved Hide resolved
@Yaroms Yaroms merged commit 992edc2 into main Feb 28, 2024
8 checks passed
@Yaroms Yaroms deleted the CNS-850-audit-inflating-memory-with-empty-stake-entries branch February 28, 2024 13:01
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 this pull request may close these issues.

None yet

3 participants