Submitted by 0xAsen, also found by Arz, Inspecktor, merlin, Delvir0, BenRai, and 0xStalin
The function burn is made so the admin can burn rUSDY tokens from any account (this is stated in the comments). However, the admin cant burn tokens if the account from which theyre trying to burn tokens is blocklisted/sanctioned/not on the allow-list.
Lets check the burn function which calls the internal _burnShares function:
We can see that it calls _beforeTokenTransfer(_account, address(0), _sharesAmount).
Here is the code of _beforeTokenTransfer:
In our case, the form would be the account from which were burning tokens, so itll enter in the 2nd if: if (from != address(0)). But given that the account is blocked/sanctioned/not on the allow-list, the transaction will revert and the tokens wont be burned.
Given that there are separate roles for burning and managing the block/sanctions/allowed lists (BURNER_ROLE and LIST_CONFIGURER_ROLE), it is very possible that such a scenario would occur.
In that case, the Burner would have to ask the List Configurer to update the lists, so the Burner can burn the tokens, and then the List Configurer should update the lists again. However, in that case, youre risking that the blocked user manages to transfer their funds while performing these operations.
Organize the logic of the function better. For example, you can make the 2nd if to be:
if (from != address(0) && to != address(0)). That way, well not enter the if when burning tokens, and well be able to burn tokens from blocked accounts.
Invalid Validation
tom2o17 (Ondo) disputed and commented via duplicate issue #120:
kirk-baird (judge) commented via duplicate issue #120:
tom2o17 (Ondo) commented via duplicate issue #120:
kirk-baird (judge) commented via duplicate issue #120:
ali2251 (Ondo) acknowledged
For this audit, 34 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by adriro received the top score from the judge.
The following wardens also submitted reports: gkrastenov, Arz, castle_chain, 0xmystery, matrix_0wl, Raihan, Breeje, klau5, nirlin, MohammedRizwan, Udsen, dev0cloo, Aymen0909, peanuts, catellatech, Lalanda, SovaSlava, wahedtalash77, kutugu, ladboy233, ohm, 0xpanicError, codegpt, BenRai, ast3ros, sandy, bin2chen, 0x6980, Stormreckson, pipidu83, hals, 0xanmol, and 0xStalin.
