code-423n4 / 2023-02-gogopool-mitigation-contest-findings

0 stars 0 forks source link

Mitigation Confirmed for MR-Mitigation of M-14: Issue mitigated #57

Open code423n4 opened 1 year ago

code423n4 commented 1 year ago

I have verified that the mitigation steps are working correctly by deliberately inputting a less than 2 weeks duration to make sure that createMinipool() would revert with a DurationOutOfBounds() error:

    function testCreateAndGetMany() public {
        address nodeID;
        uint256 avaxAssignmentRequest = 1000 ether;

        for (uint256 i = 0; i < 10; i++) {
            nodeID = randAddress();
            vm.startPrank(nodeOp);
            ggp.approve(address(staking), 100 ether);
            staking.stakeGGP(100 ether);
-           minipoolMgr.createMinipool{value: 1000 ether}(nodeID, 14 days, 0.02 ether, avaxAssignmentRequest);
+           minipoolMgr.createMinipool{value: 1000 ether}(nodeID, 13 days, 0.02 ether, avaxAssignmentRequest);
            vm.stopPrank();
        }
        index = minipoolMgr.getIndexOf(nodeID);
        assertEq(index, 9);
    }

As seen below, it will revert with a DurationOutOfBounds() error:

image

c4-judge commented 1 year ago

GalloDaSballo marked the issue as satisfactory