sherlock-audit / 2024-04-teller-finance-judging

6 stars 6 forks source link

Bad collateral check in `SmartCommitmentsForwarder` #300

Closed sherlock-admin3 closed 2 months ago

sherlock-admin3 commented 2 months ago

Bad collateral check in SmartCommitmentsForwarder

Low/Info issue submitted by KiroBrejka

Summary

Vulnerability Detail

As CommitmentCollateralType is an enum, the collateral token type can't be <= CommitmentCollateralType.ERC1155_ANY_ID as it is right now

Impact

Code Snippet

https://github.com/sherlock-audit/2024-04-teller-finance/blob/main/teller-protocol-v2-audit-2024/packages/contracts/contracts/LenderCommitmentForwarder/SmartCommitmentForwarder.sol#L48-L53

Tool used

Manual Review

Recommendation

Change the <= to !=