<!-- canonical: https://0xsimao.com/findings/fuji-finance-balance-change-cycle-break -->

# _checkNoBalanceChange(...) cycle should break in BaseRouter

Low/Info · Three Sigma · Lending aggregator · 6th May, 2023

Finding 3S-FUJI-N12 of the Fuji Finance security review.

- Report: /reports/fuji-finance
- Source: https://cdn.sanity.io/files/qoqld077/staging/32181a28eac3175d15fb8924d249bb0d91ca350c.pdf

---

### Description

_checkNoBalanceChange(...) has a for cycle that goes through all tokens. For each token
it checks if they are address(0), this is only true if we have arrived at the end of the list of
tokens, therefore we can break the cycle to save on gas.

### Recomendation

Add a break to the for cycle to save gas.

### Status

Addressed here: [Fujicracy/fuji-v2#627](https://github.com/Fujicracy/fuji-v2/pull/627)

---

Related findings:

- [StrategyRouterLib.sol bug when subtracting from balance](https://0xsimao.com/findings/clip-finance-i-lib-sol-bug-subtracting): Clip Finance Strategies
- [Unnecessary user balance check in _withdrawRequest()](https://0xsimao.com/findings/glacier-unnecessary-balance-withdraw-request): Glacier
- [Balance check in Vault::withdraw() does not take fees into account](https://0xsimao.com/findings/orange-balance-withdraw-fees-account): Orange Bridge
- [Attacker can trigger temporary shutdown due to RedStonePriceFeedBase missing gas check](https://0xsimao.com/findings/felix-temporary-shutdown-price-gas): Felix Price Feeds
