The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: high
Valid

User may not receive rewards in liquidation pool

Summary

when a user deletes a position while having a pending stake simultaneously, his new position won't get rewards after consolidating the pending stake.

Vulnerability Details

if the user withdraws all staked tokens, decreasePosition removes the user from the holder's list, then if the user has a pending stake, after consolidating pending stakes, the pending stake is added to the position but he's not in the holder's list so won't get rewards for the position through distributeFees and distributeAssets.

Impact

the user gets removed from the distribution fees and rewards list

Tools Used

Manual Review

Recommendations

use addUniqueHolder function in consolidatePendingStake function

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

pendingstake-dos

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

pendingstake-high

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.