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

Nitpick: SAFE and BALANCER_MULTISIG are the same value and are used inconsistently #3

Open
GalloDaSballo opened this issue Oct 23, 2024 · 0 comments
Labels

Comments

@GalloDaSballo
Copy link
Contributor

GalloDaSballo commented Oct 23, 2024

Impact

The casting of address(SAFE)) are unnecessary if you use BALANCER_MULTISIG

https://github.com/onchainification/aura_locker_v2/blob/07294ae3638909ecd768a6a0f831fa513abe91a0/src/AuraLockerModule.sol#L20-L21

    address public constant BALANCER_MULTISIG = 0x10A19e7eE7d7F8a52822f6817de8ea18204F2e4f;
    IGnosisSafe public constant SAFE = IGnosisSafe(payable(BALANCER_MULTISIG));

Which is what's done in onlyGovernance

https://github.com/onchainification/aura_locker_v2/blob/07294ae3638909ecd768a6a0f831fa513abe91a0/src/AuraLockerModule.sol#L67C1-L71C6

    /// @notice Enforce that the function is called by governance only
    modifier onlyGovernance() {
        if (msg.sender != BALANCER_MULTISIG) revert NotGovernance(msg.sender);
        _;
    }

Mitigation

You could alternatively change onlyGovernance to use address(SAFE) and make the code consistent

This has no impact on the bytecode so it's not a big deal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant