Skip to content
Request an audit

‹ All findings

DoSed StrategyRouter:withdrawFromStrategies() if strategyTokenBalancesUsd[i] is too small in the swapping phase

MediumClip Finance Strategies·Three Sigma · DeFi infrastructure · 10th November, 20233S-Clip Finance-M02

Description

StrategyRouter:withdrawFromStrategies() withdraws from the idle strategy of the withdraw token and then tries to withdraw from idle strategies and later strategies with other tokens.

It tries to swap from idle strategies and strategies if there is still not enough usd, skipping the swap if idleStrategyTokenBalancesUsd or strategyTokenBalancesUsd are 0.

However, when the balance is very small, it will likely be swapped into a 0 amount due to slippage, making it revert. This can be exploited by griefers by sending 1 amount to an idle strategy so it reverts.

Recommendation

Define a threshold to swap, similarly to the allocation threshold.

Status

Addressed in #687172d