Un-whitelisted collections are not removed from the _collections[]
array, leading to higher gas fees for withdrawTokens()
transactions. This can also lead to a permanent DoS if the array size becomes too big, as there is no way of shrinking the array size.
The _whiteListCollection()
is called by the whiteList()
and withdrawTokens()
functions. It adds a collection to the _collections[]
array if it is being whitelisted for the first time. However, it does not remove a collection from the array when the collection is un-whitelisted. Since this function is called every time a new collection is whitelisted through whiteList()
and withdrawTokens()
, it can DoS these functions or make them increasingly expensive to call.
At deployment, on the L2 bridge, the white_list_enabled
bool is set to false
:
This means that any collection's NFT can be bridged from L2 to L1. An attacker can take advantage of this and fill up the _collections[]
array by bridging multiple collections' NFT from L2 to L1. This will DoS the withdrawTokens()
function on the L1 bridge. Hence any honest user won't be able to withdraw their NFTs on L1 bridge and they will be lost forever.
Protocol DoS + Loss of NFTs
Manual Review
_whiteListCollection()
can be altered as follows :
Likelyhood: High, once the whitelist option is disabled, collections will grow. Impact: High, withdraw won’t be possible because of Out-Of-Gas.
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.