Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tether Support and Gas Optimizations
This patch adds Tether support and creates a number of small gas optimizations. The goal is to reduce about 10-20K of gas on operations by simplying certain operations in the protocol, without significantly changing behavior. Specfically we: 1. Remove `checkTransferIn` as the now look at the effect of `transfer` to handle fees, which obviates the need for check transfer in. 2. Change our delegator contract to use `msg.data` directly, instead of re-encoding. This removes some unnecessary repacking. 3. Reduce potentially redunant SLOADs by memoizing values. 4. Do not re-accrue interest multiple-times per block (as the interest accrued is, by definition, zero, beyond the first transaction in a block for a given cToken). 5. Remove `localVars` structs as Solidity handles more variables correctly and it cleans up code. 6. In some cases, switch from `CarefulMath` to `SafeMath` (that is, revert instead of returning error codes). This is done in select places as it's technically a change of behavior and needs to be handled carefully. 7. Add Tether to Price Oracle Proxy. 8. Bump up to 0.5.16, but: 9. Update Solidity 0.6.x-style contract inheritence (that is, interfaces cannot declare constants, etc) 10. Add a scenario command to check the BorrowRate from an IR model 11. Deploy Tether to Ropsten and Mainnet 12. Bump up total gas limit
- Loading branch information