Skip to content
Request an audit

‹ All findings

In PCLBaseSwapInside::_compoundRewards(), if the sellPortion is smaller than rewardSwapThreshold, some of the rewards will move to keepPortion

Crit/HighClip Finance Strategy Upgrade·by the Three Sigma team·DeFi infrastructure·15th March 20243S-Clip-H01

Description

Rewards allocated to compounding shares are only swapped to tokens 0 and 1 if the sellPortion exceeds the rewardSwapThreshold.

However, the allocated sell portion is not accounted for anywhere, which means that if the rewards are not sold due to being smaller than the threshold, a portion of them will go to the keepPortion the next time _compoundRewards() is called.

In the worst scenario, sell portion may always be smaller than the threshold if _compoundRewards() is called frequently enough and no rewards will be allocated to compounding shares.

Recommendation

Add a variable tracking the sell portion to make sure rewards never transition to the keep portion.

Status

Addressed in #2464036.