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

M-04 MitigationConfirmed #4

Open
c4-bot-8 opened this issue Sep 12, 2024 · 2 comments
Open

M-04 MitigationConfirmed #4

c4-bot-8 opened this issue Sep 12, 2024 · 2 comments
Labels
confirmed for report This issue is confirmed for report mitigation-confirmed MR-M-04 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@c4-bot-8
Copy link
Contributor

Lines of code

Vulnerability details

M-04: Delayed Slashing Window and Lack of Transparency for Pending Slashes Could Lead to Loss of Funds

Link to issue

Comments

The original implementation lacked getter functions to check if a vault had pending slashes. As a result, new deposits could unknowingly be made into a vault that was about to be slashed, potentially leading to unexpected loss of funds.

Mitigation

Fix link

The mitigation introduces functionality to track pending slashes and a getter function, allowing users to verify whether a vault has pending slashes before making deposits.

    function isVaultQueuedForSlashing(address vault) public view returns (bool) {
        uint256 count = _self().getSlashingsQueuedForVault(vault);
        return count != 0;
    }

Conclusion

This fix mitigates the potential for loss of funds by allowing users to check if a vault has pending slashing, thereby preventing new deposits from unknowingly entering a vault that is at risk of being slashed.

@c4-judge
Copy link

MiloTruck marked the issue as satisfactory

@c4-judge c4-judge added satisfactory satisfies C4 submission criteria; eligible for awards confirmed for report This issue is confirmed for report labels Sep 18, 2024
@c4-judge
Copy link

MiloTruck marked the issue as confirmed for report

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

No branches or pull requests

2 participants