<!-- canonical: https://0xsimao.com/findings/more-markets-market-interest-accrued -->

# Market interest is not always accrued

Crit/High · Three Sigma · Lending · 2nd December 2024

Finding 3S-MORE-H01 of the MORE Optimizer security review.

- Protocol: https://www.more.markets/
- Report: /reports/more-optimizer
- Source: https://github.com/0xsimao/audits/blob/main/Three%20Sigma/2024-12-02-more-markets.pdf

---

### Description

The market accrues interest, which changes totalAssets() in theLoopStrategy. Thus,
everytime there is some action that modifies the amount of assets, interest should always
be accrued first. However, markets.accrueInterest() in only called on _withdraw(), post
shares/assets calculation, which will lead to an incorrect asset withdrawal.
On deposit/mint, it also does not accrue market interest before calculating the shares to
receive.
In the view functions, such as totalAssets(), expectedAmountsToWithdraw() or
maxWithdraw(), it also does not consider the accrued interest from the market.

### Recommendation

Accrue market interest before each action and ideally find a way to fetch the accrued
interest in a view function (the market does not seem to have this ability currently).

### Status

Addressed in [#18ede5e](https://github.com/MoreLabsXYZ/MORE-Optimizers/commit/18ede5ea0c4b2e13b71dd99d508b0c312c21ba92).

Disclosed by 0xSimao (https://0xsimao.com/).
