You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
The areStakeAndWithdrawAllowed() function in the StakingHbbft contract is currently hardcoded to always return true, effectively disabling any time-based restrictions on staking and withdrawal operations. This deviates from the original design described in the POSDAO Whitepaper, which specified a specific window within each staking epoch for these operations. The commented-out code suggests that there should be time-based restrictions, but these are not currently implemented.
This change has several implications:
It allows staking and withdrawals at any time during the epoch, which may impact the predictability and stability of the validator set.
It removes a potential protection mechanism against rapid stake movements that could be used to manipulate the validator selection process.
It deviates from the expected behaviour described in the whitepaper, potentially causing confusion for users and other contracts that may rely on this behaviour.
Recommendation:
Re-evaluate the need for time-based restrictions on staking and withdrawals. If they are deemed necessary:
● Implement the time-based restrictions as originally designed, ensuring that staking and withdrawals are only allowed during specific periods of each epoch.
● Update the areStakeAndWithdrawAllowed() function to properly check the current time against the allowed window.
If time-based restrictions are not needed:
● Update the contract documentation and whitepaper to reflect this change
in design.
● Consider implementing alternative mechanisms to prevent potential
abuse, such as a delay between unstaking and the ability to withdraw funds.
The text was updated successfully, but these errors were encountered:
Likelihood: High
Description:
The areStakeAndWithdrawAllowed() function in the StakingHbbft contract is currently hardcoded to always return true, effectively disabling any time-based restrictions on staking and withdrawal operations. This deviates from the original design described in the POSDAO Whitepaper, which specified a specific window within each staking epoch for these operations. The commented-out code suggests that there should be time-based restrictions, but these are not currently implemented.
This change has several implications:
Recommendation:
● Implement the time-based restrictions as originally designed, ensuring that staking and withdrawals are only allowed during specific periods of each epoch.
● Update the areStakeAndWithdrawAllowed() function to properly check the current time against the allowed window.
● Update the contract documentation and whitepaper to reflect this change
in design.
● Consider implementing alternative mechanisms to prevent potential
abuse, such as a delay between unstaking and the ability to withdraw funds.
The text was updated successfully, but these errors were encountered: