from an audit tag: /// @audit is this precise, have there been instances where the aave rate is negative?
from an audit tag: // @audit - move docs to IRateOracle. Add additional parameter to use cache and implement cache (clean up outstanding issues with documentation related to rate oracle functionality.
from an audit tag: // @audit - how is the returned rate encoded? Floating rate?
Unused imports are removed
If/when introducing user defined types we should sanitise our various math/number libraries to avoid duplication. E.g. wad and PRBMathSD59x18 are both doing the same thing. *10^18 → PRBMathSD59x18.fromInt(number)
Better to use seconds everywhere and convert to wad when needed, rather than the other way around; Better to use non-wad timestamps, but if using wad we should use Wad suffix on timestamp params.
Get rid of all commented out code
consider making some of the internal functions public and implement them if necessary (goes in line with the idea of needing a lot of test contracts when we can just make some of the functions of the core public)
Introduce underscore prefix for param names and internal function names. This sort of convention can make the code easier to read.
I think we should work through these, but bias ourselves strongly towards making no/minimal code changes in light of the code now being frozen for audit. Deleting unused code or adding docs is probably OK.