The mitigation of the wrong calculation is completely appropriate in my opinion. Now the change fees get calculated in a way that they reflect how many NFTs are actually getting changed instead of a low static number. The new business logic also adds a variable
protocolChangeFeeRate in the factory contract that is used instead of the protocolFeeRate variable when calculating change and flash loan fees. This variable is also a 16-bit integer but it can hold a different value than the normal protocolFeeRate variable so the fees related to change and flash loan operations can be higher.
The mitigation of the wrong calculation is completely appropriate in my opinion. Now the change fees get calculated in a way that they reflect how many NFTs are actually getting changed instead of a low static number. The new business logic also adds a variable
protocolChangeFeeRate
in the factory contract that is used instead of theprotocolFeeRate
variable when calculating change and flash loan fees. This variable is also a 16-bit integer but it can hold a different value than the normalprotocolFeeRate
variable so the fees related to change and flash loan operations can be higher.