The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

LiquidationPool will likely not work normally

Summary

LiquidationPool will likely not work normally. This is because a lot of functions inside LiquidationPool loop through all position holders, which will revert with oog eventually.

Vulnerability Details

When use stakes in the LiquidationPool, then he is added to the holders array. And when distributeAssets is called(for example), then it loops through all holders. Same situation is in the distributeFees function, which does it even 2 times.

Functions that calculate total TST and stake also use such approach.

The problem is that eventually, when big amount of holders will come to the pool, then those functions will revert wih out of gas error and pool will not work normally and liquidations will fail.

Impact

Liquidations will not be possible

Tools Used

VsCode

Recommendations

Think about another approach without looping ot you need to have limit of holders.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

informational/invalid

Support

FAQs

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