Submitted by 0xRajeev
The Treasury deposit() function credits amount to the user address in parameter instead of the msgSender() function that is actually making the deposit with the rationale (as explained in the Natspec comment) being that this may be called via contract or L1-L2 bot.
However, the deposit whitelist should ideally be enforced on the _user address. If msgSender() is blacklisted, user address can still deposit() from another whitelisted msgSender() address while retaining the user address that is used for leader boards and NFTs.
The impact of this is that even if the user misbehaves in interactions with the system (e.g. trolls, spams) and their corresponding msgSender() is removed from the whitelist. The user can continue to deposit into the system via another whitelisted msgSender() without any impact to leader boards or NFTs.
Recommend using whitelist on user address instead of msgSender().
Splidge (Reality Cards) disputed and disagreed with severity:
dmvt (Judge) commented:
