Adding token with the symbol that already exists will overwrite the address of the existing one, which leads to all token's assets loss
Before adding a new token, the function should check if a token with the same symbol exists, otherwise it will overwrite the address of existing token leading to all token assets loss for everyone.
Foundry test
deploying a token
sending 1 ether tokens to Alice
deploying another token with the same symbol
assigning it to the previous token variable
checking Alice balance to be 1 ether
TEST FAILS - Alice has 0 balance
add check for existing symbol in the mapping
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.