The users decide how much Collateral to send and how many assets to borrow
Proof of Concept
In the Functions: Borrowing part exactly with borrowAsset() and addCollateral() there is no calculation or checks for LTV so the users just pass any amount and it will apply
Lines of code
https://github.com/code-423n4/2022-08-frax/blob/main/src/contracts/FraxlendPairCore.sol#L739-L758 https://github.com/code-423n4/2022-08-frax/blob/main/src/contracts/FraxlendPairCore.sol#L786-L789
Vulnerability details
Impact
The users decide how much
Collateral
to send and how manyassets
to borrowProof of Concept
In the
Functions: Borrowing
part exactly withborrowAsset()
andaddCollateral()
there is no calculation or checks forLTV
so the users just pass any amount and it will applyRecommended Mitigation Steps
Add more checks for LTV