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

H-02 MitigationConfirmed #8

Open
code423n4 opened this issue Aug 17, 2023 · 1 comment
Open

H-02 MitigationConfirmed #8

code423n4 opened this issue Aug 17, 2023 · 1 comment
Labels
mitigation-confirmed MR-H-02 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@code423n4
Copy link
Contributor

Lines of code

Vulnerability details

Comments

According to the sponsor comments under the issue code-423n4/2023-06-reserve-findings#2 , there is not a perfect idea to avoid this issue completely without significant code changes.

The migration add a resetStakes() function which can be only called by governance. The idea is that the stRSR is also the votes of the governance. So stakers can mostly withdraw, and since governance thresholds are all percentage, vote to immolate themselves and re-start the staking pool.

The function permission check is correct for requireGovernanceOnly(), and the stakeRate is also checked correctly:

        require(
            stakeRate <= MIN_SAFE_STAKE_RATE || stakeRate >= MAX_SAFE_STAKE_RATE,
            "rate still safe"
        );
code423n4 added a commit that referenced this issue Aug 17, 2023
@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Aug 28, 2023
@c4-judge
Copy link

0xean marked the issue as satisfactory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mitigation-confirmed MR-H-02 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

2 participants