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

Remove nonce from Stake #3004

Open
herr-seppia opened this issue Nov 18, 2024 · 0 comments · May be fixed by #3023
Open

Remove nonce from Stake #3004

herr-seppia opened this issue Nov 18, 2024 · 0 comments · May be fixed by #3023
Assignees
Labels
module:contracts Issues related to the genesis contracts

Comments

@herr-seppia
Copy link
Member

Summary

Nonce was primarly used for replay protection against unstake/withdraw operation (to prevent malicious attacker to unstake on behalf of honest users, excluding them from the consensus and paying only the fee)

Due to the fact that now tha TransferContract::withdraw function embeds mechanism for replay protection, the only use case left is to prevent malicious users to stake on behalf of victim. (indeed the nonce is now used only during stake transactions)

However, this scenario doesn't give any benefit to the attacker, that should still put a deposit on behalf of the user, leading to a loosing of money for the attacker itself.

Hence, the nonce is no useful anymore.

Additional context

This removal will allow for empty stakes to be removed (once unstaked and rewards are withdrawn)

@herr-seppia herr-seppia added the module:contracts Issues related to the genesis contracts label Nov 18, 2024
@herr-seppia herr-seppia self-assigned this Nov 18, 2024
@herr-seppia herr-seppia linked a pull request Nov 19, 2024 that will close this issue
@herr-seppia herr-seppia linked a pull request Nov 19, 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
module:contracts Issues related to the genesis contracts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant