Skip to content

Commit

Permalink
Merge pull request #344 from morpho-org/docs/interest-fee
Browse files Browse the repository at this point in the history
docs(fee): add acknowledegement
  • Loading branch information
Rubilmax authored Dec 20, 2023
2 parents 6177851 + 84a52b1 commit d261b27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/MetaMorpho.sol
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,7 @@ contract MetaMorpho is ERC4626, ERC20Permit, Ownable2Step, Multicall, IMetaMorph

uint256 totalInterest = newTotalAssets.zeroFloorSub(lastTotalAssets);
if (totalInterest != 0 && fee != 0) {
// It is acknowledged that `feeAssets` may be rounded down to 0 if `totalInterest * fee < WAD`.
uint256 feeAssets = totalInterest.mulDiv(fee, WAD);
// The fee assets is subtracted from the total assets in this calculation to compensate for the fact
// that total assets is already increased by the total interest (including the fee assets).
Expand Down

0 comments on commit d261b27

Please sign in to comment.