20,000 USDC
View results
Submission Details
Severity: high

Token Address Equivalency Validation in setPool()

Summary

The setPool() function in the contract does not validate that the p.collateralToken and the p.loanToken addresses provided are not the same token.

Vulnerability Details

The correct functioning of the contract is affected if these tokens are of the same address

Impact

Current tests in the repo show failing tests if the provided token addresses are in fact equivalent

Tools Used

Manual Review

Recommendations

Validate the Contract Addresses are not the same

Whilst this can be guarded on the frontend inputs, validation should be at the smart contract level to ensure immutable validation

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.