Admin can addRandomizer contract to non-existent collection #349
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-872
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/NextGenCore.sol#L170-L174
Vulnerability details
Impact
Admin can add randomizer contract to non-existent collection. In the future, when a user creates a collection, the integrated randomizer contract could potentially enable unfair actions.
Proof of Concept
NextGenCore::addRandomizer doesn't check is collection exist or not. only check is for randomizer contract isTrue or not.
Tools Used
Foundry, manual review
Recommended Mitigation Steps
make more decentralised
Assessed type
Rug-Pull
The text was updated successfully, but these errors were encountered: