You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
bin2chen
high
withdraw() Logical problem
Summary
in ERC509#withdraw() will call sellPrincipalToken() to sell PT get underlying
but not transferred msg.sender to address(ERC5095) first
Vulnerability Detail
in ERC509#withdraw() will call sellPrincipalToken():
sellPrincipalToken() will sell address(ERC5095)' shares,not msg.sender 's shares or o's shares,need transfer shares to address(ERC5095) first
ps: ERC5095#redeem() Have the same problem.
Impact
If address(ERC5095) has a balance, shares will be lost; if not, the call will fail.
Code Snippet
https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/tokens/ERC5095.sol#L219-L225
https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/tokens/ERC5095.sol#L262-L266
Tool used
Manual Review
Recommendation
Duplicate of #195
The text was updated successfully, but these errors were encountered: