The original ERC20 Solmate library has been corrupted by a malicious elf with address 0x815F577F1c1bcE213c012f166744937C889DAF17.
Now the transferFrom()
doesn't ask for approval and instead allows to transfer any santaToken from any account to this address without prior approval.
This is easy to prove with a test, first we add the elf address
The malicious elf is able to steal all the SantaTokens from each account.
Foundry
Always check imported libraries. We trust Open Zeppelin or Solmate, but we shouldn't trust the developers. In this case, the easiest way is to simply remove the Solmate import and import the already installed ERC20 Open Zeppelin which has the correct transferFrom()
with the necessary prior approval of the token owner.
Some sneaky elf has changed this library to a corrupted one where his wallet address skips all the approval checks for SantaToken! Shenanigans here - https://github.com/PatrickAlphaC/solmate-bad/blob/c3877e5571461c61293503f45fc00959fff4ebba/src/tokens/ERC20.sol#L88
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.