This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
/
TODO
35 lines (29 loc) · 1.69 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Lending logic:
g when a token has < 18 decimal places, and a user withdraws their full EToken balance, 0 out the remaining dust so user gets a storage refund
Exec
? in batch dispatch, returning values probably doesn't make sense. use logs instead
* tests
* test that internal modules cannot be called through dispatcher or batch dispatch
* failure cases in batch
RiskManager:
? how to determine which uniswap pool (fee-level) to use when market activated? check liquidity?
Liquidation
* self-collateralisation
? expose bonus breakdown via LiqOpp
? if health score would decrease post liquidation, allow entire position to be liquidated
Tokens
? implement permit() on E/DTokens
Invariants to add to InvariantChecker.sol contract
* If a user has a non-zero borrow owed:
* they must be entered into market
* must have a non-zero interest accumulator
* If totalBorrows > 0, must have a non-zero interest accumulator
Pre-release checklist
* Make sure nothing is done in module constructors except set immutable variables, and modules have no storage variables
* All methods that take 2 addresses (liquidations/transfers/approvals) should verify they aren't == or sub-accounts
* Verify every external/public, non-view/pure function in a module is marked nonReentrant
* Some functions don't need reentrancy guard, ie: approve(), tag them reentrantOK
* No accidental external methods inherited (nothing external/public in the Base classes, except moduleId)
* Storage layout consistent between releases
* Make sure "msg.sender" not present in contracts/modules/
* Any path to increase/decrease/transfer an account's balance/borrow should do an updateAverageLiquidity() first