The Standard

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

LiquidationPool::getStakeTotal() calculation looks wrong

Summary

The Total Stake computed from LiquidationPool::getStakeTotal() looks like a wrong calculation.

Vulnerability Details

getStakeTotal loops over the positions for holders and computes the stake total. In this process of computation, the call is delegated to stake function,
which returns either TST position or EUROs position based on the below condition.

return _position.TST > _position.EUROs ? _position.EUROs : _position.TST;

As such, the stake computation is a combined sum of TST and EURO positions across holders mixed up. They are two different assets and treating them
interchangeably does not seem correct.

Impact

Incorrect total stake

Tools Used

Manual Review

Recommendations

Revisit the getStakeTotal logic to accurately compute the stake.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

informational/invalid

Support

FAQs

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