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

0 stars 0 forks source link

Mitigation Confirmed for Mitigation of M-14 Issue mitigated #39

Open code423n4 opened 1 year ago

code423n4 commented 1 year ago

C4 issue

M-14: any duration can be passed by node operator

Comments

Anyone can call createMinipool() with nodeID, duration, delegationFee parameters. The original implementation did not have sanity checks for duration, delegationFee parameters and this could lead to various issues.

Mitigation

PR #38 Double checked the Avalanche documentation about the requirements for duration, delegationFee. Imgur The mitigation added new sanity checks as below. Imgur

Tests

There were several unreasonable test cases in the original code base (e.g. 0 duration) and these are fixed now. All passing.

Note

There is another issue found in the mitigation for H-04 and it is slightly related to this one.

Conclusion

LGTM

c4-judge commented 1 year ago

GalloDaSballo marked the issue as satisfactory