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-02 MitigationConfirmed #2

Open
code423n4 opened this issue Jun 16, 2023 · 1 comment
Open

M-02 MitigationConfirmed #2

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

Comments

@code423n4
Copy link
Contributor

Lines of code

Vulnerability details

The mitigation adds a new function, getTotalBalance(), to get all the lp tokens staked in the CVX and others left in the staker:

    function getTotalBalance() public view returns(uint256 balance) {
      unchecked {
        balance = stakedBalance() + clpToken.balanceOf(address(this));
      }
    }

And every stakedBalance() function call in the AMO2.sol has been replaced by getTotalBalance(). This removes all calculation errors and makes sense.

@c4-judge
Copy link

kirk-baird marked the issue as satisfactory

@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mitigation-confirmed MR-M-02 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

2 participants