improve contract storage by updating struct fields
from u/kingofclubstroy on reddit:
> I'd suggest reordering the swap structs values in the swap factory smart contract in order to save gas, those bools in between the uint256 values could be moved to the top of the struct to share the same storage slot as the first address parameter (20 bytes + 1 byte/bool < 32 bytes). Also timestamps typically don't need to use 256 bits (32 bytes), and could also be packed into the address storage slots. In the first storage slot with, now with the 2 bools and address, that leaves 10 bytes to play with, 28*10 = ~1*1024, which way more than enough seconds to deal with any time this contract would ever use. So move one timestamp into the first storage slot as a uint80 and the other timestamp into the second storage slot with the other address value. The cost is having to convert the uint80 timestamp to a uint256 when retrieved, but I believe it is worth the gas savings. In total you can reduce the storage slots used by 3, from 8 to 5, a roughly 40% reduction in storage costs for the user.