Vulnerability Details
when whitelisting a collection, a check is done to ensure that the collection is not already in the collections array, however this is done by looping and reading over the collections storage variable itself instead of a memory copy which is a lot more gas intensive
Impact
it could become extremely expensive to whitelist
Tools Used
manual analysis
Recommendations
loop over memory copy or remove collections storage entirely as it is not actually needed to determine if a collection is whitelisted, that is done via the mapping