When a stream is created, the contract retrieves the token number of decimals using the decimals()
function, which is part of the ERC20Metadata standard.
https://github.com/Cyfrin/2024-10-sablier/blob/main/src/SablierFlow.sol#L579
The issue is that not all ERC20 tokens provide such an interface meaning the call will not work and will revert.
Some tokens may not be compatible with the protocol
Manual review
Perform a try/catch
when retrieving the number of decimals. If the call fails, assume the token has 18 decimals.
The protocol can also allow to manually set the token decimal number as a fallback.
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.