Submitted by pauliax
In Base struct having 3 separate fields that map from _protocol is error-prone. If you later introduce new fields, etc, you need not forget to delete them in function protocolRemove, etc. I think it would be better to have a separate struct for protocol-related data and map to that.
An example solution, replace:
with:
Then you can delete all fields this way: delete gs.protocolInfo[_protocol]; Similar solution may be applied to PoolStorage (protocolBalance, protocolPremium, isProtocol).
Evert0x (Sherlock) acknowledged
