Funds may be stuck when redeeming
for Illuminate
#384
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2022-06-illuminate/blob/912be2a90ded4a557f121fe565d12ec48d0c4684/redeemer/Redeemer.sol#L120
Vulnerability details
Impact
Funds may be stuck when
redeeming
for Illuminate.Proof of Concept
Assuming the goal of calling
redeem
for Illuminate here is to redeem the Illuminate principal held by the lender or the redeemer, then there is an issue because the wrong balance is checked. So if nomsg.sender
has a positive balance funds will be lost.Now assuming the goal of calling
redeem
for Illuminate here is for users to redeem their Illuminate principal and receive the underlying as suggested by this comment, then the underlying is not sent back to users becauseSafe.transferFrom(IERC20(u), lender, address(this), amount);
send the funds to the redeemer, not the user.Recommended Mitigation Steps
Clarify the purpose of this function and fix the corresponding bug.
The text was updated successfully, but these errors were encountered: