The addMarket
function in the LiveMarkets library doesn't explicitly handle duplicate market IDs, instead it rely on EnumerableSet's implicit duplicate prevention.
While duplicates are prevented, the function returns a boolean rather than reverting on duplicate attempts
Let us say market ID 2 already exists
Someone tries to add market 2 again
from EnumerableSet, it returns false but does not stop
The code continues running, assuming market was added.
There is no way this function will revert
This could result to silent Failures where market additions could fail without explicit notification.
Manuel review
STOP The market ID if already exists
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.