IIP-5 Trustless Rebalance Process

iip: 5
title: Trustless Rebalance Process
status: Accepted
author: Brian Weickmann (brian@setprotocol.com), Alex Soong (alex@setprotocol.com), Richard Liang (richard@setprotocol.com) and Felix Feng (felix@setprotocol.com)
created: 2020-10-21

Simple Summary

Update the DPI rebalance mechanism to use a new smart contract. The new smart contract rebalances according to the following steps:

  1. A methodologist publishes new weights for the DPI off-chain
  2. Index Coop verifies the weights are accurate
  3. Index Coop updates the Index Module execution parameters that will be used to create rebalance trades
  4. Index Coop converts weights to smart contract compatible units
  5. Index Coop submits the compatible units to the IndexModule contract which starts the rebalance
  6. Index Coop executes the rebalance trades through the IndexModule

Abstract

A manager smart contract delegates index management responsibilities (rebalance, fees) between Index Coop (“IC”) and its methodologists. IC will be responsible for rebalances and any smart contract level improvements. Various other administrative functions will either have shared permissions with the methodologist or be delegated entirely to the methodologist.

To rebalance, the manager smart contract will interact with another smart contract, the IndexModule. The IndexModule can be used to execute trustless rebalances for indices as parameterized by IC. IC will follow its normal IIP process to update rebalance parameters and confirm allocations provided by methodologists.

For each rebalance, the methodologist will propose weights in accordance with their methodology. The IndexCooperative (“IC”) verifies the validity of the weights, submits them to the IndexModule and updates execution parameters as needed. Once verified, the IC can execute the rebalance through the smart contract system.

Motivation

As presently constructed, the IC has control over the DeFi Pulse Index (smart contract). The contract’s owner is the IC Multisig which grants the owner all of the functionality of the Set smart contract which includes rebalancing and collecting fees. However, it is important to decouple functionality between methodologists and the IC to remove possible malfeasance from either party against agreed upon execution rules and fee distributions. Additionally, in order to minimize regulatory exposure, the rebalance mechanism must be moved away from a complex Multisig execution to a simple function callable by anyone that still enforces the controls set by IC.

FOR:

  • Migrate DPI ownership to proposed manager contract
  • Begin process of parameterizing November rebalance

AGAINST:

  • This implementation/process is insufficient to meet IC’s goals, propose alternative
  • The current rebalance execution process is sufficient

Specification

Overview

The IC has control over the DeFi Pulse Index smart contract by way of the contract’s owner property being set to the IC Multisig address. A new smart contract, the IndexCoopManager (“ICM”), will bifurcate functionality between methodologists and the IC. The IC Multisig will hand over the Set’s ownership to the ICM. The methodologist (DeFi Pulse) and IC will then interact with the ICM directly for management of the index.

Once migration to the ICM is complete, each rebalance will consist of five steps:

  1. A methodologist publishes new weights for the DPI off-chain
  2. Index Coop verifies the weights are accurate
  3. Index Coop updates the Index Module execution parameters that will be used to create rebalance trades
  4. Index Coop converts weights to smart contract compatible units
  5. Index Coop submits the compatible units to the IndexModule contract which starts the rebalance
  6. Index Coop executes the rebalance trades through the IndexModule

Rationale

Building this manager helps achieve three main goals:

  1. Adding limits to the owners of the IC Multisig
  2. Allowing the IC to delegate certain permissions to the methodologist
  3. Providing a structured pathway to execute trustless rebalances.

Set Protocol is designed such that there is one address that manages all functionality for a given Set, because of this, it’s necessary that all three goals must be met by the same contract.

This manager contract limits IC Multisig owners by taking full ownership of the Set away from the Multisig and giving it to the manager contract, thus forcing the Multisig to interact with the index in predefined ways.

The manager contract allows for delegation of permissions to methodologists by only allowing methodologists the ability to call certain admin functions. Additionally it allows for 2 of 2 Multisig style administrative updates between IC and the methodologist instead of relying on off-chain agreements enforced solely by the IC Multisig.

Finally, providing a formal process for executing and parameterizing rebalances move IC one-step closer to being a full decentralized organization

Copyright

Copyright and related rights waived via CC0.

Github Link

Governance Vote

  • FOR: Execute Smart Contract Manager update according to IIP-5 specification
  • AGAINST: Do not upgrade Smart Contract Manager. Current Multi-sig to remain DPI Set Manager

0 voters

4 Likes

the rebalance mechanism must be moved away from a complex Multisig execution to a simple function callable by anyone that still enforces the controls set by IC.

Does this mean that if the index NAV becomes out of sync with the programmed weights, anyone can rebalance it at anytime?

If weights are solely managed by IC governance I think fees should be too, if anything methodologists should have more leeway on weights than anything.

I don’t see the IndexCoopManager or IndexModule in the Set repos, will they be ready by November? I assume you guys put a deadline for a reason.

Thanks for this proposal. I like its spirit.
Would you mind sharing your point of view of ‘HOW’ the Index Coop will process each of these steps ? Does it require an on-chain vote ? If yes, it might create some friction and we don’t want to end up like uniswap (quorum issue).

So this will allow anyone to participate in rebalancing the index at the beginning of every month. It’s important to keep in mind we’re targeting a specific notional amount of each asset at the end of every rebalance so as the underlying prices change we are not trying to push them back towards some percentage composition (in effect this is what Balancer does). So once those notional targets have been met there will be no need to rebalance until the next monthly proposal.

The weights are determined by the methodologist and submitted to IndexCooperative off-chain, the IndexCooperative will then submit an interpretation of these verified weights on-chain via the Multi-Sig at the time to start the rebalance (the interpretation requires some time-sensitive price data). I think we’ll move to a system that is more of methodologist proposes weights and then IC confirms them, all on-chain but to do that effectively I think we need oracles which we don’t have yet…soon!

And to your last question we’ll get them there shortly! We just sent the contracts out to audit and we hope to get them back mid-next week for time to test them live on-chain.

3 Likes

For now a lot of it will be done through the current governance process off-chain where ultimately the Multi-Sig must submit the results. In my mind there are two main things we need to transition it all on-chain 1) On-chain voting mechanism, and 2) oracles for all the asset in the DPI. I think we’ll be able to get those in relatively short order (say a couple rebalances from now) at which point will transition to new manager contract too.

https://github.com/SetProtocol/index-coop/pull/2 <— link to WIP PR for the Manager contract
https://github.com/SetProtocol/set-v2/pull/4 <— link to WIP PR for IndexModule

2 Likes

So Set v2 only has streaming fees so far right? And this manager contract expects all index fees to only be streaming based and that’s not updatable in the future? Not an issue just clarifying.

That’s right. I think we should expect there to be some ongoing manager updates over time. Especially as the feature set of the DPI changes. [Edit]: Should also say new fees and logic related to new fee splits can always be handled in a separate contract, it doesn’t need to be the manager address.

@bweick I was looking at the new contracts again and realized there isn’t an event to log rebalance process metadata. Are we going to derive it from TargetUnitsUpdated events?

What data are you looking for exactly?

  1. the exact time rebalance was initiated
  2. an easy entrypoint to calculate changing % of component weights and other factors over each rebalance

We’ll get the timestamps just by virtue of the block the txn is included in. And then there’s a TradeExecuted event that will log the component flows for each rebalance transaction. Is there something else you think we’re missing?

Nope that’s all good thanks. That’s what I meant by deriving the data from other events just wanted to make sure I was understanding how to do it properly