Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing transfer of Illuminate PT to user in case of Element #136

Closed
code423n4 opened this issue Jun 25, 2022 · 2 comments
Closed

Missing transfer of Illuminate PT to user in case of Element #136

code423n4 opened this issue Jun 25, 2022 · 2 comments
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate This issue or pull request already exists invalid This doesn't seem right sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-06-illuminate/blob/912be2a90ded4a557f121fe565d12ec48d0c4684/lender/Lender.sol#L362

Vulnerability details

In the Element case:

Proof of concept

In https://github.com/code-423n4/2022-06-illuminate/blob/912be2a90ded4a557f121fe565d12ec48d0c4684/lender/Lender.sol#L362, yield PTs is purchased to lender.sol (address(this)), yet msg.sender does not have illuminate PTs Minted and distributed.

Impact

msg.sender loses fund since its underlying token is transferred into lender, yet it has no receipt to prove it.

Recommendation

Check the length in the following fashion:

    IERC5095(principalToken(u, m)).mint(msg.sender, returned);
@code423n4 code423n4 added 3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working labels Jun 25, 2022
code423n4 added a commit that referenced this issue Jun 25, 2022
@sourabhmarathe sourabhmarathe added duplicate This issue or pull request already exists sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") labels Jun 29, 2022
@sourabhmarathe
Copy link
Collaborator

sourabhmarathe commented Jun 29, 2022

Duplicate of #391.

@gzeoneth
Copy link
Member

Considered as duplicate of #135 from the same warden.

@gzeoneth gzeoneth added the invalid This doesn't seem right label Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate This issue or pull request already exists invalid This doesn't seem right sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Projects
None yet
Development

No branches or pull requests

3 participants