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

MVKsentry - Collateral Validation Logic in matchOffersV3 Function #1017

Open
sherlock-admin2 opened this issue Nov 25, 2024 · 0 comments
Open

Comments

@sherlock-admin2
Copy link

sherlock-admin2 commented Nov 25, 2024

MVKsentry

High

Collateral Validation Logic in matchOffersV3 Function

Summary

In DebitaV3Aggregator.sol the matchOffersV3 function, there's a requirement that checks whether the collateral provided is valid based on certain conditions. This condition erroneously uses !borrowInfo.isNFT (the logical NOT of borrowInfo.isNFT). The correct logic should use borrowInfo.isNFT without the logical NOT operator. This issue affects the acceptance of collateral, potentially allowing invalid or unverified assets and rejecting valid ones, which can lead to security vulnerabilities and operational problems within the protocol.

Root Cause

In DebitaV3Aggregator.sol:299-303 the require line has wrong logic: !borrowInfo.isNFT. The logic should be borrowInfo.isNFT because we are accepting NFTs.

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

  • Unintended Acceptance of Non-NFT Collateral: Non-NFT collateral is accepted even if it is not a valid receipt. This could allow unverified or malicious ERC20 tokens to be used as collateral, posing a risk to the protocol.

  • Rejection of Valid NFT Collateral: NFTs that are not listed as valid receipts are rejected, even though the protocol intends to accept any NFT as collateral. This limits the range of acceptable NFTs and may prevent users from leveraging legitimate assets.

PoC

No response

Mitigation

No response

@sherlock-admin3 sherlock-admin3 changed the title Crazy Tangerine Mongoose - Collateral Validation Logic in matchOffersV3 Function MVKsentry - Collateral Validation Logic in matchOffersV3 Function Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant