The setUnusedDepositLimit function allows the owner to set a limit on how many unused tokens can remain in the pool outside of a strategy.
The setUnusedDepositLimit function allows the owner to set a limit on how many unused tokens can remain in the pool outside of a strategy.
After setting this, it means that no additional tokens beyond the specified limit can remain in the pool. However, the issue is that this limit can be easily bypassed by transferring assets directly to the pool or by using the donateTokens function.
This means that the function is ineffective and essentially useless.
The limit can be bypassed, essentially making it useless
Manual review
This can be mitigated by ensuring the donate
function takes into account the deposit limit, and by avoiding the use of token.balanceOf
Instead, a variable should be used to track the unused assets whenever they are deposited.
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.