Closed github-actions[bot] closed 1 year ago
A great find, but doesn't state how funds are lost
As the result of previewRedeem
does not seem to result in any loss of funds pre-maturity considering this issue as a low.
https://github.com/Swivel-Finance/illuminate/pull/21 PR properly returns the calculated result, as was outlined in the issue recommendation
cccz
medium
ERC5095.previewRedeem does not return the calculated result
Summary
ERC5095.previewRedeem does not return the calculated result
Vulnerability Detail
Post maturity, ERC5095.previewRedeem calculates the number of underlying tokens to return based on
s
, but here it returns s directly, not the calculated resultImpact
This makes the result returned by previewRedeem incorrect
Code Snippet
https://github.com/sherlock-audit/2023-01-illuminate/blob/main/src/tokens/ERC5095.sol#L138-L152
Tool used
Manual Review
Recommendation
Change to