The Standard

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

User could potentially front-run to exit `LiquidationPool` during a bad debt occurrence

Summary

A staker might front-run to exit the LiquidationPool when a vault incurs bad debt, meaning the value of collateral can't cover all the minted tokens.

Vulnerability Details

Bad debt could occur if the market moves rapidly and the liquidators fails to liquidate the vault promptly or react in time. In this scenario, the vault's collateral amount can't cover all minted EUROs. It's clear that LiquidationPool stakers would cover this loss. However, the current protocol design allows stakers to front-run and exit the LiquidationPool by calling decreasePosition() if they predict that a vault's liquidation will result in bad debt.

Impact

These front-running stakers can avoid losses while staking and still earn liquidation fees under normal conditions. Normal stakers would bear all the losses.

Tools Used

Manual Review

Recommendations

Consider implementing a delay withdrawal mechanism. This mechanism would prevent stakers from immediately withdrawing their position. Instead, they would need to initiate a withdrawal and wait for a period before they could claim it.

Updates

Lead Judging Commences

hrishibhat Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

Bad-debt

hrishibhat Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

frontrun-feedist-low

Support

FAQs

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

Give us feedback!