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

Mitigation Confirmed for MR-Mitigation of M-20: Issue mitigated #60

Open
code423n4 opened this issue Feb 15, 2023 · 1 comment
Open
Labels
edited-by-warden mitigation-confirmed MR-M-20 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@code423n4
Copy link
Contributor

code423n4 commented Feb 15, 2023

This is a straightforward mitigated change. Nevertheless, I have added the following assertions to further confirm that maxMint() and maxDeposit() could only return correct values, i.e 0, when the contract is paused:

	function testMaxMint() public {
		address liqStaker = getActor("liqStaker");
		assertEq(ggAVAX.maxMint(liqStaker), type(uint256).max);

		vm.prank(address(ocyticus));
		dao.pauseContract("TokenggAVAX");

+		assertFalse(ggAVAX.maxMint(liqStaker) == 1);		
		assertEq(ggAVAX.maxMint(liqStaker), 0);
	}

	function testMaxDeposit() public {
		address liqStaker = getActor("liqStaker");
		assertEq(ggAVAX.maxDeposit(liqStaker), type(uint256).max);

		vm.prank(address(ocyticus));
		dao.pauseContract("TokenggAVAX");

+		assertFalse(ggAVAX.maxDeposit(liqStaker) == 1);		
		assertEq(ggAVAX.maxDeposit(liqStaker), 0);
	}
code423n4 added a commit that referenced this issue Feb 15, 2023
@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Feb 20, 2023
@c4-judge
Copy link

GalloDaSballo marked the issue as satisfactory

@Simon-Busch Simon-Busch added selected for report This submission will be included/highlighted in the audit report and removed selected for report This submission will be included/highlighted in the audit report labels Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
edited-by-warden mitigation-confirmed MR-M-20 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

3 participants