Open code423n4 opened 2 years ago
@LilYeti: We will not be taking any collaterals with transfer fees / have a strong vetting process for whitelisting. Severity 0 due to this.
There is no mention in the accompanying documentation about fee-on-transfer tokens not being supported. Low severity sustained.
Handle
WatchPug
Vulnerability details
There are ERC20 tokens that charge fee for every
transfer()
ortransferFrom()
.In the current implementation,
BorrowerOperations.sol#_transferCollateralsIntoActivePool()
assumes that the received amount is the same as the transfer amount, and uses it as collateral.https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/BorrowerOperations.sol#L731-L748
Recommended
balanceOf
to get the actual transferred amount;