Hi there, I looked throu the code and got a few questions. I collect them here. If any of them leads to change requests we can seperate them into extra issues.
- Why is everything upgradeable? Upgradeability adds needed trust. The contracts are not that complex, so IMHO we should not introduce this extra risk
- no offense, but the whole thing feels a bit "overengineered": why do you need an extra router and factory? This is not a DEX where you want to route swaps throu a list of pairs etc. Why seperate treasury contracts? The whole thing creates a lot of overhead with needed tokentransfers and checks inbetween. Feels like it adds a lot of unnecessary complexity (which always adds additional risks)
- you call the convert from dToken -> cAsset a "wrap". But the idea is that the "dToken" (IMHO the correct term is DST-20, dTokens are LoanTokens from DVM) is a wrapped version of the cAsset, right? If the contract should not provide a clear direction (just a convert between tokens as long as there are funds in the treasury), then it should not be called "wrap" at all, but "convert"?
- why do you have an extra balance in the treasury? its redundant with balanceOf(this). Same with decimals: better use .decimals()
Hi there, I looked throu the code and got a few questions. I collect them here. If any of them leads to change requests we can seperate them into extra issues.