|Author||Danijel, Justin Moses, Brett Sun, Anton Jurisevic|
Reduce Binary Option Market creation gas costs by:
- Deploy a ERC-1167 Minimal Proxy when a new BinaryOptionMarket is created.
- Deploy a ERC-1167 Minimal Proxy when a new BinaryOption is created.
The general motivation behind the Minimal Proxy pattern is explained in SIP-127.
The use case for BinaryOptions is significant as the gas cost for creating a market are quite large at L1 at >$1000 at the time of writing the SIP.
Gas costs at creating a new BinaryOptionMarket will be greatly reduced with this change from 5,200,000 gas to less than 1,000,000 gas.
BinaryOption contracts will be modified to reuse the pattern of Minimal proxies as implemented in SIP-127.
Minimal Proxies have proved to provide a great relief in terms of gas costs to deploy new contracts with same implementation but different variables/states.
Minimal proxy has been implemented as in SIP-127. Additional changes specific to Binary Options contracts are:
- A new base contract is added for
Ownedpattern to support initialization via a method call for MininalProxies inherriting this contract.
- BinaryOptionMarket no longer has
MixinResolveras supercontract. This reduced the release and maintanance overhead.
Unit tests included with implementation.
Additional production test added to compare gas costs.
Configurable Values (Via SCCP)
Copyright and related rights waived via CC0.