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

[Code]: Not suitable to use default weight when state in StakeToSBTPlugin.move #114

Closed
pause125 opened this issue Sep 9, 2022 · 1 comment · Fixed by #117
Closed

[Code]: Not suitable to use default weight when state in StakeToSBTPlugin.move #114

pause125 opened this issue Sep 9, 2022 · 1 comment · Fixed by #117
Labels
enhancement New feature or request

Comments

@pause125
Copy link
Collaborator

pause125 commented Sep 9, 2022

In StakeToSBTPlugin::stake, default weight is used when lock_time is not matched with any config. Is that designed?

I think the default weight may not be suitable here, the may be two situations:

  1. It may cover mistakes and not in line with user expectations, especially when user stake a large amount of token with a long lock_time by mistake or bug of the DAO. User may never get they token back.
  2. User can hack the system to get SBT by stake in very short lock_time , 1 second for example.

I think ABORT is ok when the input lock_time is not matched with any config.

@pause125 pause125 added the enhancement New feature or request label Sep 9, 2022
@welbon
Copy link
Contributor

welbon commented Sep 12, 2022

The PR for this enhancement has been created in #117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants