The _whiteListCollection()
function which is inside whiteList()
is used to whitelist new collections. The problem is that everytime we whitelist one it is being pushed
in the _collections
array but when being removed from the whitelist it is not getting popped which can lead to DoS because of Out of Gas at some point.
This is the _whiteListCollection()
function that is being called inside whiteList()
function in Bridge.sol
As we can see we are iterating through the _collections
array everytime which is a storage variable, so as we keep adding new collections this function will become more and more expensive in terms of gas and at some point it will get DoSed
High because a functionality that is being used in every core function in the protocol can get DoSed and it will break the whole protocol
Manual Review
At the end of the function add a check if the enable
is set to false
and inside it just remove the collection from the _collections
array
LightChaser: Low-19, Gas-10
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.