Submitted by ayden, also found by d3e4 (1, 2), pontifex, trachev, ciphermarco, Madalad, Yanchuan, peanuts, twcctop, cartlex_, mert_eren, 0xWaitress (1, 2), and critical-or-high
Malicious users can transfer USDe token to StakedUSDe protocol directly lead to a denial of service (DoS) for StakedUSDe due to the limit shares check.
User deposit USDe token to StakedUSDe protocol to get share via invoke external deposit function. Lets see how share is calculate:
Since decimalsOffset() == 0 and totalAssets equal the balance of USDe in this protocol
The minimum share is set to 1 ether.
Assuming malicious users transfer 1 ether of USDe into the protocol and receive ZERO shares, how much tokens does the next user need to pay if they want to exceed the minimum share limit of 1 ether? That would be 1 ether times 1 ether, which is a substantial amount.
I add a test case in StakedUSDe.t.sol:
We can see even Alice deposit a substantial number of tokens but still cannot surpass the 1 ether share limit which will lead to a denial of service (DoS) for StakedUSDe due to MinShares checks.
vscode
We can solve this issue by setting a minimum deposit amount.
DoS
FJ-Riveros (Ethena) acknowledged, but disagreed with severity and commented via duplicate issue #32:
0xDjango (judge) commented via duplicate issue #32:
0xDjango (judge) decreased severity to Medium
For this audit, 98 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by 0xmystery received the top score from the judge.
The following wardens also submitted reports: lsaudit, 0xhunter, Team_Rocket, qpzm, erebus, ge6a, hunter_w3b, adam-idarrha, pontifex, SovaSlava, Avci, Arz, Breeje, PASCAL, Udsen, rotcivegaf, 0x11singh99, asui, codynhat, radev_sw, Kaysoft, BeliSesir, deepkin, JCK, ThreeSigma, Madalad, 0xG0P1, Imlazy0ne, Mike_Bello90, tnquanghuy0512, peanuts, supersizer0x, Shubham, 0xAadi, pep7siup, pipidu83, adeolu, Kral01, jasonxiale, cccz, oakcobalt, cryptonue, twcctop, pavankv, Eeyore, cartlex_, kkkmmmsk, arjun16, squeaky_cactus, Rickard, Noro, Proxy, J4X, Al-Qa-qa, ziyou-, chainsnake, HChang26, oxchsyston, Yanchuan, btk, 0xStalin, Bauchibred, Fitro, rokinot, matrix_0wl, Walter, ZanyBonzy, young, Zach_166, Topmark, ast3ros, degensec, almurhasan, nuthan2x, csanuragjain, PENGUN, 0xpiken, zhaojie, ptsanev, marchev, castle_chain, sorrynotsorry, ayden, 0xAlix2, Strausses, foxb868, dirk_y, max10afternoon, DarkTower, rvierdiiev, 0xWaitress, twicek, lanrebayode77, 0x_Scar, Bughunter101, 0xhacksmithh, and critical-or-high.
