Recommend adding 2 step procedure: register gov as pending and a transaction from gov to confirm pending gov to be gov. Perhaps combine with some kind of Timelock will make it more robust
Non-critical:
[N-01] Internal functions should have _ prefix
Styling information
Recommend adding _ prefix to all internal function
Low risk:
[L-01] Missing address(0) checks for these inputs
[L-02]
liquidationFeeBps
is not initialized[L-03] Important function like
setGov()
should be a 2 step procedure + TimelockNon-critical:
[N-01] Internal functions should have
_
prefix[N-02] Use
UPPERCASE
for constant variableLow risk:
[L-01] Missing address(0) checks for these inputs
In constructor: src/Market.sol
src/DBR.sol
src/Fed.sol
src/Oracle.so
src/BorrowController.sol
Recommend adding address(0) checks
[L-02]
liquidationFeeBps
is not initializedThis storage variable is not initialized in the constructor. This leads to
liquidate()
will revert if it isn't set due to operation errors, ....https://github.com/code-423n4/2022-10-paladin/blob/main/contracts/WardenPledge.sol#L383
Recommend initializing
liquidationFeeBps
in the constructor[L-03] Important function like
setGov()
should be a 2 step procedure + TimelockIf there's any operation error that set
gov
wrong will damage for the protocol.https://github.com/code-423n4/2022-10-inverse/blob/main/src/Market.sol#L130
Recommend adding 2 step procedure: register
gov
aspending
and a transaction fromgov
to confirmpending gov
to be gov. Perhaps combine with some kind ofTimelock
will make it more robustNon-critical:
[N-01] Internal functions should have
_
prefixStyling information
Recommend adding
_
prefix to all internal function[N-02] Internal functions should have
_
prefixhttps://github.com/code-423n4/2022-10-inverse/blob/main/src/DBR.sol#L13
Recommend changing to UPPERCASE: