Introduction

In order to decrease slippages for rebalances, we are releasing a Time Weighted Average Price rebalancing method that breaks up large rebalances into smaller chunks. We’re really excited about this feature and how it helps Sets scale. In this post, we will talk about how social traders can take advantage of this feature. To learn more about TWAP rebalancing, check out this article.

Requirements

This table below shows the minimum rebalance volume requirements to be eligible for TWAP rebalancing for specific token pairs. These calculations were done by analysing historical data and liquidity requirements. Whenever you try to initiate a rebalance for a token pair that is greater than the minimum amount listed in the table, you will be required to upgrade your liquidator contract to the TWAP liquidator.

As liquidity conditions and other considerations change for asset pairs, we may update these values.

Updating The Liquidator Contract

When you go to rebalance a Set and the assets under vault for your token pair are above the minimum values described in the chart above, you will be prompted to update your liquidator contract. It will look something like this (note, because this is a test set for illustrative purposes, the AUV amount does not match the requirements listed above):

Once you click “Enable TWAP,” you will be prompted to sign a Metamask transaction to update your liquidator contract. Accept the transaction to continue. Note that if it takes longer than a minute to mine, you will be prompted to open up the Etherscan link to track the progress of the transaction. Make sure you monitor this because you will not be able to proceed with the rebalance without this transaction finishing mining. In case it gets stuck, here is a link to an article to push through stuck transactions.

Once that transaction has mined and your liquidator contract has updated, your rebalancing page should look similar to this:

For your page, the chunk size will be pulled from the table above corresponding to the asset pair you are rebalancing. “Estimated TWAP Chunks” will be “Total Quantity to be Rebalanced”/”Chunk Size.” As usual, you need to provide a short 20 word description of the rebalance before being able to click submit.

Once you click submit, you are done! Your rebalance will be initiated using TWAP. Your screen should look similar to this:

Everything should look pretty similar, but note at the top where it says “Chunk 1 of 3.” This displays which chunk is currently being rebalanced.

For our API traders, we recommend calling the valid_rebalance endpoint to see if your Set needs to update its liquidator contract. If you need to, we recommend for now using the UI to update the liquidator contract and then you should be able to resume normal API trading.

Did this answer your question?