15,000 USDC
View results
Submission Details
Severity: medium
Valid

Incompatible with ERC20 tokens with fee on transfer

Summary

The depositCollateral function will receive less tokens than the specified amount when tokenCollateralAddress is fee-on-transfer tokens. This system allows users to easily fork the codebase, replace WETH & WBTC with any desired basket of assets, and ensure that the code functions seamlessly. Therefore, we should consider supproting fee-on-transfer tokens.

Vulnerability Details

Impact

Tools Used

None

Recommendations

To determine the received amount, calculate the difference in token balance (using balanceOf) before and after the transferFrom.

Support

FAQs

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