There is no limit to how many attesters there can be and attesters can be added through RegistryFactory::addAttester
which are then stored in RegistryFactory::attesters
array. An attester can be removed using the function RegistryFactory::removeAttester
function which loops over the RegistryFactory::attesters
array and compares the attester provided as parameter to the each attester in the array, if they match it pops the attester from array and breaks out of loop but if the attester to be removed is at the end of array and RegistryFactory::attesters
array is large enough that by looping over each value, call can exceed block gas limit, which can render attesters at the end of array, unable to be removed.
Unable to remove attester at the end of RegistryFactory::attesters
array. attester can be malicious
Use a mapping to keep the track of attesters index in the array mapping(address => uint256)
use this while addind attester and associate its address to index at which it is being added. when removing the attester use this mapping to check the index of address in array then pop it directly instead of looping over each entry.
Use better searching algorithm
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.