sherlock-audit / 2024-02-rubicon-finance-judging

5 stars 3 forks source link

DJINN - Missing address validation for `RubiconFeeController.feeRecipient` can lead to fees being misdirected or lost #37

Closed sherlock-admin2 closed 7 months ago

sherlock-admin2 commented 7 months ago

DJINN

medium

Missing address validation for RubiconFeeController.feeRecipient can lead to fees being misdirected or lost

Summary

There are no mechanisms to check if the provided address for feeRecipient is valid or not.

This issue addresses concerns the Rubicon team has as mentioned in the contest QnA as stated here

A potential concern and non-intended outcome is that if the admin sets invalid parameters, ...

Vulnerability Detail

The admin of the fee controller can provide an invalid address for feeRecipient in the initialize() and setFeeRecipient() functions. This value is used in the getFeeOutputs() function here.

Impact

Code Snippet

Tool used

Manual Review

Recommendation

It is generally recommended to validate user inputs as they are prone to errors. Furthermore, it is recommended to check if the provided address is address(0)

sherlock-admin commented 7 months ago

1 comment(s) were left on this issue during the judging contest.

0xAadi commented:

Invalid: OOS