The last parameter, isLogAssets, is actually not needed as it will always be set to true during deposits and withdrawals.
Vulnerability Details
All functions that call _logTrace pass true for the last parameter:
in _depositFunds:
in redeem:
in withdraw:
Hence, this parameter should be removed and _logTrace` could be simplified:
Impact Details
This is an insight highlighting a small logical error with an unneeded parameter.
Proof of Concept
Proof of Concept
Please create a poc.js file in the test folder and copy paste the following code:
This tests shows a user that deposits a few times, and then redeems and withdraw. Between each step, totalAssetsAt is called to see if _traceTotalAssets has been updated. No matter what action the user does, _traceTotalAssets is updated, because the bool isLogAssets is always true.