<!-- canonical: https://0xsimao.com/findings/felix-reward-zero-bytes4-improved -->

# The check rewardSelector != ZERO BYTES4 && rewardDestination.isContract() could be improved

Low/Info · 0xSimao · CDP stablecoin · 14th March 2025

Finding I-5 of the Felix Price Feeds security review.

- Protocol: https://www.usefelix.xyz/
- Report: /reports/felix
- Source: https://github.com/0xSimao/audits/blob/main/0xSimao/2025-03-14-felix.pdf

---

**Description:**

When the destination reward is a contract and the selector is not 0, the function is called on the contract. However, there seems to be no logical scenario to have a reward selector different than 0 and the reward destinaton not being a contract. In case this happens by mistake, rewards could be sent to the destination contract without calling the function, which could be problematic.

**Recommended Mitigation:**

It would be better to either revert in this case or perform the contract check when setting the reward selector.

**0xSimao:**

Fixed in [#0d6233e](https://github.com/felixprotocol/felix-contracts/commit/0d6233ec9ad2a6c98e6b88f36537344c2699ff14).

---

Related findings:

- [BaseRouter, _bundleInternal(...) Action.Flashloan does not check if the selector matches xBundle(...)](https://0xsimao.com/findings/fuji-finance-bundle-internal-flashloan-matches): Fuji Finance
- [Missing key zero value check](https://0xsimao.com/findings/codeup-missing-key-zero-value): CODEUP
- [Unnecessary currentEpoch zero check in StandardGovernor and ThresholdGovernor](https://0xsimao.com/findings/m-0-current-epoch-zero-threshold): M^0 Minter Gateway
- [MapleLoan, skim() has no zero address transfer check.](https://0xsimao.com/findings/maple-finance-iii-skim-zero-address-transfer): Maple Finance
