<!-- canonical: https://0xsimao.com/findings/felix-success-leftover-present-adapter -->

# In case of success, some leftover funds could still be present in the adapter

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

Finding I-2 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:**

The `CurveGaugeDistributor::distributeRewardsToGauge()` sends the funds to curve to deposit rewards, but does not check if there is any leftover balance after doing so. Currently curve pulls all tokens so this should not happen, but other adapters could have leftover funds.

**Recommended Mitigation:**

Check if there are leftover funds after success and send them to the `InterestRouter` or add a helper to send any `feUSD` in the adapter to the `InterestRouter`.

**0xSimao:**

Fixed in [#ba81f93](https://github.com/felixprotocol/felix-contracts/commit/ba81f93dbadf3b32872f9436a7c34f450294092c).
