The liquidateBorrower() function checks crvUSD balance before approval but not after, risking a revert in lendingPool.finalizeLiquidation() if reserves drop mid-transaction. This medium-impact, medium-likelihood issue could disrupt liquidations, leaving debts unresolved and destabilizing the pool.
The function approves crvUSDToken but doesn’t recheck balance before finalizeLiquidation(). Example:
Pool has 1000 crvUSD; liquidation targets 1000 crvUSD debt.
Withdrawal drops balance to 400 crvUSD post-approval.
finalizeLiquidation() needs 1000 crvUSD, reverts, leaving debt intact.
Collateral value is lost without debt offset.
Unresolved debts (e.g., 1000 crvUSD) and lost collateral harm the pool, a medium-impact issue. The medium likelihood reflects concurrent transaction risks, common in active systems, threatening liquidation reliability.
Static Analysis Tools: Slither to detect missing post-approval checks.
Add post-approval balance and allowance checks:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.