Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 992 Bytes

064.md

File metadata and controls

29 lines (15 loc) · 992 Bytes

moneyversed

medium

Missing input validation for tokenId in _getLoanMarketId function

Summary

The _getLoanMarketId function does not validate if the provided tokenId is valid or not. This could lead to incorrect market ID retrieval.

Vulnerability Detail

In the LenderManager.sol contract, the _getLoanMarketId function lacks input validation for the tokenId parameter, potentially leading to incorrect market ID retrieval.

Impact

Incorrect market ID retrieval could compromise the platform's integrity and lead to issues in loan management.

Code Snippet

https://github.com/sherlock-audit/2023-03-teller/blob/main/teller-protocol-v2/packages/contracts/contracts/LenderManager.sol#L52

Tool used

Manual Review

Recommendation

Add input validation for the tokenId parameter in the _getLoanMarketId function to ensure that only valid token IDs are used for market ID retrieval. This will help maintain the platform's integrity and prevent issues in loan management.