Slurp can be frontrun with fee increase
The slurp function fetches the current fee from the clerk, which can be changed. A malicious clerk could frontrun a slurp transaction with a fee increase to steal the vault yield that should go to the user.
Submitted by cmichel, also found by gzeon
The TurboSafe.slurp function fetches the current fee from the clerk(). This fee can be changed. The slurp transaction can be frontrun with a fee increase (specifically targeted for the vault or the asset) by the clerk and steal the vault yield that should go to the user.
Maybe the user would not want to slurp at the new fee rate and would rather wait as they expect the fees to decrease again in the future. Or they would rather create a new vault if the default fees are lower.
Recommended Mitigation Steps
Right now there’s no good protection against this as the master can call slurp at any time. (They could even increase the fees to 100%, slurp, reset the fees.) This mechanic would need to be addressed first if mitigation and better user protection are desired.
Joeysantoro (Tribe Turbo) disputed and commented:
Slurping is public, and fee increases will be behind governance timelocks. Users are sufficiently protected. Any more complete solution to this would dramatically increase the computational complexity of the architecture.
Alex the Entreprenerd (judge) commented:
I have to agree with the Warden here that this type of Admin Privilege is present in the system and can be used to raise fees up to 100%.
I believe protocol users could get stronger security guarantees by having a MAX_FEE hardcoded variable to ensure fees can never go above a certain threshold.
I recommend the sponsor to publicly disclose this potential risk to protocol users, and given that I believe that the timelock will provide a good base security guarantee to which I’d recommend adding a MAX_FEE.
Because the finding is contingent on malicious governance I believe medium severity to be appropriate.
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 fee is read at execution time and can be changed by the clerk without a hard cap, allowing a frontrunning fee increase.
Impact
A malicious clerk could frontrun a slurp with a fee increase to steal yield, though the report notes fee increases are behind governance timelocks and the judge rated it medium because it requires malicious governance.
What the attacker needed
Malicious clerk; governance timelock bypass or malicious governance
The fix
The report recommends adding a hardcoded maximum fee to limit how high fees can go, and the judge suggests a MAX_FEE variable.
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 vault lets users earn yield, and a 'slurp' function collects that yield but takes a fee. The fee can be changed by an admin (the clerk). If the admin raises the fee just before a user's slurp, the user gets less and the admin takes more. This is like a shopkeeper changing the price right as you pay.
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.