The _depositViaBroker
function can be used to deposit tokens to a stream while paying a broker a fee. The issue is that this fee can be 0 if the broker sets their rate at 0, or if the deposit is very small. Some tokens revert on 0 value transfers, which would fail this transaction.
The _depositViaBroker
function calculates a broker fee.
This brokerFeeAmount
can be 0 if the broker fee rate is 0%, or if the deposit amount is small enough that the fee percentage calculates to 0. In this case, the contract tries to transfer 0 tokens.
Issue is that certain tokens don't allow 0 value transfers, like the LEND token on mainnet. If such tokens are used, this contract will fail since it tries to do 0 value transfers.
Transactions can revert when using tokens which don't support 0 value transfers.
Manual
Consider skipping the transferFrom
call if the value is calculated to be 0.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.