Open code423n4 opened 3 years ago
Agree with the finding, it may be best to check for uniqueness (for example by using an EnumerableMap) As per the second finding, that's correct as setting storage to 0 will trigger gas refunds (up to 1/5 of the cost of the tx)
Handle
goatbug
Vulnerability details
Impact
Even if the same token is added as a bounty, they will be treated as seperate bounties and require 2 transfers of the same token to claim.
Proof of Concept
Another optimization: Bounties further keep being added to the list and never deleted. Gas could be saved by removing bounties instead of setting their active flag to false.
Tools Used
Recommended Mitigation Steps