Product Teaser: Trustless Rebalancing

Felix Feng
Set Labs
Published in
4 min readJun 24, 2018

As we build out Set Protocol, one of the most requested features is rebalancing. We see this as a critical feature that enables passive investing in cryptocurrencies, so we’ve been working on rebalancing as an extension of our core protocol.

Rebalancing can already be done with a trusted party (e.g. Crypto20 or Bitwise) where custody and rebalancing is performed on your behalf. In this article, we propose a system that allows trustless rebalancing using a wrapper contract, oracle, and dutch auction.

Rebalancing Recap

Rebalancing is the process of realigning the weights of a portfolio, which involves periodically purchasing and selling assets to maintain a certain asset allocation.

Typically, users actively rebalance their portfolios by reviewing their portfolio, calculating their optimal allocation, then trading their excess tokens for the missing tokens needed to create the new portfolio

In the traditional finance world where users purchase Index Funds or ETFs, fund managers would perform the rebalancing on behalf of users with minimal input from the end user.

Our Solution

We’ve devised a system that allows a user to own a Rebalancing Set, an ERC20 token that represents a stake in a smart contract that rebalances trustlessly.

A new user can get exposure to a rebalancing Set by simply purchasing a token on an exchange or by minting a Set themselves. No action is required by the user to participate in the rebalancing. Only if the user decides to opt out, does the he or she need to get involved. This allows users to passively invest in ERC20 tokens in a fully decentralized manner.

Under the hood, it involves three components:

1 — Rebalancing Set Wrapper: A wrapper contract around a SetToken. This contract issues a separate ERC20 token (“RebalanceToken”) that represents a claim to a percentage of the wrapper collateral. For example, if 2 RebalanceTokens exist and represents 1 Set, each token itself can be redeemed for 0.5 Set.

The wrapper contract defines what oracle solution to use for identifying the new Set to rebalance into and the rules for rebalancing.

2 — Oracle: Rebalancing systems need a way to know what the “new” or updated Set to rebalance into is.

Our current implementation utilizes a Manager, or an external account that decides what the next Set is. Any user that doesn’t agree with the rebalance can opt out before the rebalance occurs.

In the future, we could utilize oracle systems like Chainlink, Oraclize, or even Augur as the source of truth for the Set. However, reliable, decentralized systems have yet to be seen in production.

Another class of oracle solutions we are exploring is Token Curated Registries. It is possible that users are incentivized to track the “TOP10” or “TOP50” ERC20 tokens and their associated weights that a contract could rebalance into. Even this set of technologies remain nascent and insecure to attacks.

3 — Dutch Auction: To execute the rebalancing process, we employ a dutch auction to exchange outdated Sets for the updated version. Dutch Auctions have been widely used for ICOs (e.g. Gnosis), StableCoins (e.g. Carbon), and derivative closing mechanisms (e.g. dYdX). In our system, we use a dutch auction to trade the retired Set for the new, proposed Set by employing arbitrageurs and economics to dictate pricing.

Rebalancing Example

  1. The RebalancingSet token is created by a SetManager that is initialized to a particular Set (e.g. {A, B}) and a quantity of Set per RebalancingSet.
  2. Users can acquire a stake of the RebalancingSet by contributing the {A,B} Set itself or ETH (through purchasing the {A,B} Set using a decentralized exchange).
  3. At a future time, the manager decides to propose a new Set to rebalance into. The proposal process lasts a predefined number of days. If any users disagree with the proposal during the proposal period, they can redeem their RebalancingSet tokens for the tracked SetToken.
  4. When the proposal period has concluded, a dutch auction is initiated, creating sell orders for the old {A,B} Set for the buy orders for the new proposed {A,C} Set. Market forces dictate the price of the rebalance itself.
  5. Once the auction is complete, the RebalancingSet now tracks the new Set.

Going Forward

We see rebalancing as a critical component to allow people to invest in crypto passively and to broaden adoption of crypto baskets.

What we’ve done so far is conceptualize the process. We wanted to share our thoughts so far and get feedback from the community and developers.

If you’re a dev that wants to help build the first rebalancing Set or a potential manager interested in managing a Set, fill out this form and we’ll get in touch!

--

--

Felix Feng
Set Labs

Founder of Set. Investor @TuringCap. Previously @Radius & @21.co. B.S. @UCBerkeley