Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

clems4ever - isoUSDLoaned used instead of isoUSDLoanAndInterest in openLoan of Vault_Synths.sol #68

Closed
github-actions bot opened this issue Dec 11, 2022 · 2 comments

Comments

@github-actions
Copy link

github-actions bot commented Dec 11, 2022

clems4ever

medium

isoUSDLoaned used instead of isoUSDLoanAndInterest in openLoan of Vault_Synths.sol

Summary

The total amount of borrowed USD is wrongly computed in Vault_Synths.sol compared to other vaults.

Issue: https://github.com/sherlock-audit/2022-11-isomorph/blob/main/contracts/Isomorph/contracts/Vault_Synths.sol#L120

Working example: https://github.com/sherlock-audit/2022-11-isomorph/blob/main/contracts/Isomorph/contracts/Vault_Lyra.sol#L129

Vulnerability Detail

Wrong value requiring users to deposit more collateral than expected.

Impact

Wrong value requiring users to deposit more collateral than expected.

Code Snippet

https://github.com/sherlock-audit/2022-11-isomorph/blob/main/contracts/Isomorph/contracts/Vault_Synths.sol#L120

POC: https://github.com/sherlock-audit/2022-11-isomorph-clems4ever/commit/7b03f793bc597fead797c95a9cf23b7682d34e1c#diff-663352a62e4155212f816fa3f0777ac9479e578c39964815ae2f6d90611137a4R120

Tool used

Manual Review

Recommendation

Use the correct variable.

Duplicate of #85

@kree-dotcom
Copy link

kree-dotcom commented Dec 12, 2022

Sponsor confirmed, will fix. I believe this issue was also raised by CodingNameKiki as I recall them asking me about it? I will link their issue here as duplicate if I can find it, covered in issue #85 also.

@IAm0x52
Copy link
Collaborator

IAm0x52 commented Dec 12, 2022

Duplicate of #85

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants