* exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply
*/
uint cashPlusBorrowsMinusReserves = totalBorrows - totalReserves;// totalCash in cNote Lending Market is zero, thus it is not factored
into the exchangeRate
Since exchangeRate = totalBorrows - totalReserves / totalSupply; was used so it can be removed from comment.
require()/revert() statements should have reason strings
the ensure modifier requires that the swap transaction is executed before the given deadline, so rather than be an comment it can be used for better use.
Use SPDX license identifier
For some contracts that was not used SPDX license identifier in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: " to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code
Since it was used ^0.8.10. As the compiler can be use as 0.8.10 and consider locking at this version the same as another. It can be consider using locking the pragma version whenever possible and avoid using a floating pragma in the final deployment. Since it can be problematic, if there are publicly disclosed bugs and issues that affect the current compiler version used.
totalCash
can be removed from comment since not used in actual codehttps://github.com/Plex-Engineer/lending-market-v2/blob/443a8c0fed3c5018e95f3881a31b81a555c42b2d/contracts/CNote.sol#L55-L57
Since
exchangeRate
=totalBorrows
-totalReserves
/totalSupply
; was used so it can be removed from comment.1.) TreasuryDelegator.sol Line.13
2.) File : CNote.sol Line.74
3.) File : CNote.sol Line.121
4.) File : AccountantDelegator.sol Line.22
5.) File : Proposal-Store.sol Line.44
https://github.com/Plex-Engineer/lending-market-v2/blob/443a8c0fed3c5018e95f3881a31b81a555c42b2d/contracts/Stableswap/BaseV1-periphery.sol#L87
the ensure modifier requires that the swap transaction is executed before the given deadline, so rather than be an comment it can be used for better use.
SPDX license identifier
For some contracts that was not used SPDX license identifier in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier:" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code
Occurances contract : CNote.sol, NoteInterest.sol, TreasuryInterfaces.sol), TreasuryDelegate.sol, TreasuryDelegator.sol
Since it was used ^0.8.10. As the compiler can be use as 0.8.10 and consider locking at this version the same as another. It can be consider using locking the pragma version whenever possible and avoid using a floating pragma in the final deployment. Since it can be problematic, if there are publicly disclosed bugs and issues that affect the current compiler version used.
https://github.com/Plex-Engineer/lending-market-v2/blob/443a8c0fed3c5018e95f3881a31b81a555c42b2d/contracts/WETH.sol#L69
changed to
transferFrom
1.) https://github.com/Plex-Engineer/lending-market-v2/blob/443a8c0fed3c5018e95f3881a31b81a555c42b2d/contracts/Stableswap/BaseV1-core.sol#L45