Submitted by MrPotatoMagic
Non-whitelisted users can redeem collateral tokens and burn their UStb even when whitelist mode has been enabled on UStb contract. This breaks the main invariant mentioned in the README.
The below code block is from the \_beforeTokenTransfer() function(), which is called at the beginning of the ERC20 _burn() internal function. When the transferState is WHITELISTENABLED, it should only allow whitelisted users to burn their UStb as mentioned under the main invariants in the README. But since the from address is not checked to have the `WHITELISTEDROLE` as well, the call goes through.
Add hasRole(WHITELISTED_ROLE, from) in the check.
iethena (Ethena Labs) disputed and commented:
EV_om (judge) commented:
For this audit, 5 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by KupiaSec received the top score from the judge.
The following wardens also submitted reports: MrPotatoMagic, K42, Topmark, and SpicyMeatball.
