# Possible ways to decrease sLoC https://docs.google.com/spreadsheets/d/1mony_HT_f9wTgxj-9YPh53P-7lydr5LRhB0O3iy5y8A/edit?usp=sharing ## v2-library - Remove types, use a common library for checks - Reuse an existing dpeloyed library for uint256 math operations - Use [OZ's ownable implementation](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol) - Use [OZ's IERC20](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol) ## v2-option - Change `process` architectur eto be more sLoC efficient? - Existing contract maybe used for no delegate call - Using bytes for params? - Reduce no of line in `structs/Option.sol` - Use numbers instead of enums ## v2-pool - Use bytes for events - removing functions that are not used in`ConstantSum.sol` and `ConstantProduct.sol` ## ToDo List [ ] Remove `LendGivenPosition`, `CloseLendGivenPrincipal`, `CloseBorrowGivenPrincipal` [ ] Tweak the linter [ ] Remove unused imports [ ] Remove types where its not required [ ] Remove `Math.sol` [ ] Removing some errors [ ] Remove code apart from mulDiv in `FullMath.sol` [ ] Optimising if-else condition in the periphery [ ] Add strike conversion utility functions [ ] Utilise boolean in mulDivUp/mulDivDown => mulDiv(up=true) [ ] Optimise `CalculateSwap.sol` [ ] Refactor natives [ ] Remove enums, replace with uint [ ] Double check for dead code in `ConstantSum.sol` and `ConstantProduct.sol` [ ] Experiment with Pool key [ ] Pass by value only without key [ ] Use bytes for event param