Flow

Sablier
FoundryDeFi
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

Missing default protocol fee

Summary

If token is used in a stream and there is no entry for it in mapping(IERC20 token => UD60x18 fee) public override protocolFee; it will return 0.

Vulnerability Details

Impact

Protocol will lose some profits

Tools Used

manual review

Recommendations


Use different structure for protocol fee. For example:

struct ProtocolFee {
bool isSet;
UD60x18 fee;
}
mapping (address token => ProtocolFee fee) protocolFee;
function getFee(address token) internal returns(UD60x18 fee) {
if (protocolFee[token].isSet) {
fee = protocolFee[token].fee;
}else {
// default value
fee = ud(10);
}
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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