Closed sherlock-admin closed 2 years ago
We are disputing because the protocol design shouldnt allow for a state with redeemable iPTs while external PTs have not been redeemed.
Because there will be a time gap between Illuminate's autoRedeem being callable and the protocol's redeem being executable, there is sufficient time for our keepers to ensure that this situation does not occur.
hyh
medium
autoRedeem might be run before all external PT were redeemed
Summary
Redeemer's autoRedeem() will issue the fee to the first caller, creating the incentives to run it sooner than later, even before all versions of external PTs redeem will be successfully run.
Vulnerability Detail
Interests of the Illuminate PT holders and third-party running the autoRedeem might differ as this third party might want to run it fast, while the owners do want to run it only after all external PT types were redeemed.
I.e. a runner can avoid waiting for the all redeems to be completed, while it is against the interests of the owners.
Impact
Illuminate PT holders can obtain less funds, i.e. not optimal amount of the funds, skipping some types of PTs.
This is permanent loss for them as autoRedeem() result cannot be altered after it was run.
Code Snippet
autoRedeem() can be run by anyone and prematurely:
https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Redeemer.sol#L479-L489
Tool used
Manual Review
Recommendation
Consider adding the check for Lender balance to ensure that there are no external PTs left there.
Prohibit autoRedeem before that. The costs of this check are well compensated by the fee third-party receives.