Submitted by SpicyMeatball, also found by oakcobalt
https://github.com/code-423n4/2024-07-benddao/blob/main/src/libraries/logic/ConfigureLogic.sol#L509-L521https://github.com/code-423n4/2024-07-benddao/blob/117ef61967d4b318fc65170061c9577e674fffa1/src/libraries/logic/InterestLogic.sol#L248https://github.com/code-423n4/2024-07-benddao/blob/117ef61967d4b318fc65170061c9577e674fffa1/src/libraries/logic/InterestLogic.sol#L201-L202
When the protocol fee is modified in the Configurator module:
The feeFactor parameter is used to calculate amount of interest that goes to the treasury:
To adjust the assets supply rate taking into account fee collected by the treasury:
A discrepancy may occur when the pool admin changes the feeFactor. The new feeFactor will be applied to interest collected before the feeFactor was updated:
But the protocol will still use the old supply rate that was calculated using the previous feeFactor. This may cause inconsistencies in the fee accounting for the protocol.
thorseldon (BendDAO) confirmed and commented:
0xTheC0der (judge) commented:
