SIP 16: Improved Upgrades - Utilise Proxies internally Source

AuthorClinton Ennis, Jackson Chan

Simple Summary

Synthetix upgrades take too long as the owner needs to make call upto 60 calls to configure the system.


Most of these calls are setSynthetix and setFeePool on all of the Synths. We propose to point the Synths to the Synthetix Proxy and FeePool Proxy.


This would reduce the amount of time the system is offline. Making upgrades a lot faster, cheaper (gas) and minimize the impact on users with reduced downtime.

UPDATE: Since this requires redeploying all the Synths. We propose to also add redeploying all of the Synth Proxies with all the new ProxyERC20.sol to be able to support DEX integrations with all Synths. Currently only SNX and sETH have been updated to support the new ProxyERC20.sol for uniswap and Kyber integration.


Old Implmentation:

Points directly to the underlying contract and needs to be set on each Synth each release. This is a growing number of calls as we add new synths. Currently 23 and more to come.

bool isSynthetix = msg.sender == address(synthetix);
bool isFeePool = msg.sender == address(feePool);

New Implmentation:

Utilizes the Proxy which should only be set once and rarley changed. This will however cost more gas for looking up the address.

bool isSynthetix = msg.sender == address(Proxy(synthetixProxy).target());
bool isFeePool = msg.sender == address(Proxy(feePoolProxy).target());


Test Cases


Copyright and related rights waived via CC0.