ThrusterFactory.setYieldCut should claim fees for all pools before
The yield cut (protocol fee) for a pool is only applied when a liquidity provider updates their position, so if the yield cut is changed, fees for the period before the change are not minted using the old rate. This can cause yield to be collected with the wrong proportion.
Originally disclosed on Code4rena
Submitted by rvierdiiev
Thruster have introduced ability to change yield cut for their uniswap v2 like pools.
The yield is charged only, when some LP manages their position.
This means that in case if yield cut will be changed for a pool, then protocol fee should be minted for previous period using old yield cut, otherwise the yield cut will be incorrect, especially this is important for pools where liquidity is not added/removed often.
Impact
Yield can be collected with wrong proportion.
Tools Used
VsCode
Recommended Mitigation Steps
I guess protocol just needs to acknowledge the issue as it will be not possible (not worthy) to implement such mechanism.
jooleseth (Thruster) acknowledged and commented:
We acknowledge that this situation is possible, but the effects and consequences of this are very minimal in reality as LPs update often and LPs are made aware of changes to fees with sufficient time.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the yield cut is applied lazily only when a liquidity provider updates their position, so changing the yield cut does not retroactively apply the old rate to the period before the change.
Impact
Yield can be collected with wrong proportion, but the protocol team states the effects are minimal because LPs update often and are made aware of fee changes.
What the attacker needed
Yield cut is changed; LP does not update position frequently
The fix
The protocol should claim fees for all pools before changing the yield cut, but the team acknowledged the issue and decided not to implement a fix.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A yield cut is a fee the protocol takes from the interest earned by people who provide liquidity. The fee is only taken when someone updates their position, so if the fee rate changes, the old rate might not be applied to the time before the change. This means the protocol could collect the wrong amount of fees.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.