Upgrade Proxies for Index Pools and Controllers
Discussion Thread: https://forum.indexed.finance/t/proposal-upgrade-proxies-for-index-pools-and-controllers/645
Summary
The main impetus for this set of upgrades is the current issue in DEGEN - the rebalance is being delayed and mints/swaps blocked in many cases due to the pool having hit its max weight when RGT was added. An upgrade was required to fix this, so I decided to add some other changes that were due for a merge.
Some queries and events will be added to simplify subgraph tracking and keeper management. Exit fees of 0.5% will be added to the core pools and the default swap fee will be set to 2% across the board. Some new control functions will be added to allow governance to update parameters without further proxy upgrades.
Transactions
- Set proxy implementation for SigmaControllerV1.sol to
0xE8721b30211F3b487F02173D054F704301983423 - Set proxy implementation for SigmaIndexPoolV1.sol to
0xf0204D5aEA78F7d9EbE0E0c4fB21fA67426BFefc - Set proxy implementation for MarketCapSqrtController.sol to
0x120C6956D292B800A835cB935c9dd326bDB4e011 - Set proxy implementation for IndexPool.sol to
0x5bD628141c62a901E0a83E630ce5FaFa95bBdeE4 - Set default exit fee recipient for core controller to the treasury
- Set default exit fee recipient for Sigma controller to the treasury
- This value was previously an immutable in the contract bytecode, so we will not be changing the recipient, only adding it to storage.
- Set exit fee recipient on CC10, DEFI5, ORCL5 to the treasury
- Set swap fee on CC10, DEFI5, ORCL5 to 2%
- Set swap fee on DEGEN, NFTP to 2%
Code & Tests
Pull request with modifications to the sigma contracts: https://github.com/indexed-finance/sigma-core/pull/23
Pull request with modifications to the core contracts: https://github.com/indexed-finance/indexed-core/pull/68
Tests of this proposal’s transactions against a fork of mainnet: https://github.com/indexed-finance/proposal-tester
Contract Modifications
This proposal would upgrade the proxy implementations for the following contracts:
- MarketCapSqrtController.sol
- IndexPool.sol
- SigmaControllerV1.sol
- SigmaIndexPoolV1.sol
Controllers
- Add
setControllerfunction.- Allows governance to set controller on an existing pool.
- Add
setExitFeeRecipient(address,address)function.- Allows governance to update fee recipient on an existing pool.
- Add
setExitFeeRecipient(address[],address)function.- Allows governance to update fee recipient on multiple existing pools.
- Add
setSwapFee(address[],address)function.- Allows governance to update swap fee on multiple existing pools.
- Add
setDefaultExitFeeRecipientfunction.- Allows governance to update default fee recipient for new pools.
- Add events
PoolReweighedandPoolReindexed.- Enables easier subgraph tracking.
Core Controller
- Add
getPoolMetafunction.- Enables queries for reweigh timing.
Sigma Controller
- Add immutable
governanceaddress. - Move
defaultExitFeeRecipientfrom bytecode to storage. - Add
validTokenListmodifier to functiongetTokenScores. - Give governance control over
setSwapFee.
Index Pools
- Set default swap fee to 2% instead of 2.5%.
- Change reweigh behavior:
- Weight changes which would exceed the maximum total weight will not occur rather than reverting.
- Allow token weights to be updated once every 30 minutes instead of once every hour.
- Weight decrease executed before weight increase in swap functions
- Set
MAX_TOTAL_WEIGHTto 27 instead of 26 in order to be more flexible during re-indexing. - Add
setControllerfunction.- Allows current controller to set new controller.
- Add
getExitFeefunction. - Add events
LOG_EXIT_FEE_RECIPIENT_UPDATEDandLOG_CONTROLLER_UPDATED.- Enables easier subgraph tracking.
Core Index Pool
- Add exit fee of 0.5%.
- Send exit fees to
_exitFeeRecipientinstead of_controller. - Add
setExitFeeRecipient.- Allows controller to set fee recipient.
- Removed
flashBorrowfunction.- Not being used and code size is near maximum.
Sigma Index Pool
- Change
setExitFeeRecipientcall permission from only current fee recipient to only controller.
| Voter | Cast Power | Vote & Rationale |
|---|---|---|
0x7e38...F59282 | 104,874 | FOR |
0xef76...E3F8dB | 100,289 | FOR |
0xF159...b5affb | 100,000 | FOR |
0x0000...C0bA6E | 90,433 | FOR |
0x3D52...2384Ef | 15,278 | FOR |
VOTE POWER
Proposal Status
- Published Onchain
0x7e38...F59282
- Mon April 26 2021, 03:59 pmVoting Period Starts
- Thu April 29 2021, 08:09 amEnd Voting Period
- Thu April 29 2021, 09:12 amQueue Proposal
- Sat May 01 2021, 10:07 amExecute Proposal
Current Results
1-FOR
451,955.53
2-AGAINST
N/A Tokens
