Autopilot Strategy

The purpose of Autopilot is to continuously rebalance Autopool assets into the destinations with the best return/risk profile. However, the best risk/return profile is somewhat subjective, as such, each Autopool has an assigned Strategy that is responsible for determining if a given rebalance (e.g., swap Pool A LP units for Pool B LP units) meets its requirements. For the LST vaults, there are a number of criteria that are considered in deciding if a rebalance is favorable, including:

  • Total Slippage - the absolute difference in the value of the in and out LP tokens. Priced using safe price oracles (previously audited).

  • Increase in expected return metric between the assets being swapped. Expected return is composed of (1) LST base yield, (2) DEX fee return, (3) incentive APR. Expected return metric is calculated as follows:

Composite Return Metric = W_Base * Base Return + W_Fee * Fee Return 
										+ W_Incentive * Incentive Return + W_Price * Price Return
										

Where,
			0 <= W_Base, W_Fee, W_Incentive, W_Price <= 1.0

Default Values
			W_Base = 1.0
			W_Fee = 1.0
			W_Incentive = 1.0                            
			W_Price (Discount: Price Return > 0) (Entering destination) = 0.75
			W_Price (Discount: Price Return > 0) (Exiting destination) = 0.0  
			W_Price (Premium: Price Return < 0) = 1.0
		
  • Swap Loss Offset Period - how long it takes for the incremental expected return to offset the immediate loss (swap cost). The Autopool will utilize an adaptive offset period that determines how strict or loose the offset period is. The LMP rebalance transactions (a.k.a pool/destination swaps) will occur only if the following condition is met:

ETH_gainpredictedswap_cost_offset_period365>swap_cost ETH\_gain_{predicted}*{swap\_cost\_offset\_period\above{1pt} 365} > swap\_cost \\

where,

ETH_gainpredicted=APRnewETHvaluenewAPRoldETHvalueoldswap_cost_offset_periodmin=7swap_cost_offset_periodmax=60swap_cost=max(ETHvalueoldETHvaluenew,0)ETH\_gain_{predicted} = APR_{new} * ETHvalue_{new} - APR_{old} * ETHvalue_{old} \\ swap\_cost\_offset\_period_{min} = 7 \\ swap\_cost\_offset\_period_{max} = 60 \\ swap\_cost = max(ETHvalue_{old} - ETHvalue_{new}, 0)

ETH_gainpredictedETH\_gain_{predicted}
  • is the annualized gain in ETH expected to be earned as a result of this rebalance transaction.

APR_newAPR\_new

APR_oldAPR\_old
  • are the new and old composite APRs for the destination involved in the swap/rebalance transaction.

swap_cost_offset_periodswap\_cost\_offset\_period
  • is defined as period in days allowed for this rebalance transaction to recoup or recover the slippage loss. Default value is 28. At the minimum value of 7 days, approximately 525 bps of incremental APR will be needed to offset a swap cost of 10 bps. Similarly, a value of 60 days allows ~ 60 bps of incremental APR at 10 bps of swap cost.

swap_costswap\_cost
  • is the loss in value in ETH units as a result of this transaction primarily driven by slippage, token swap fees, gas used to execute the rebalance operations.

Additional Rebalance Gatekeeping Features

a. Adaptive Swap Loss Offset Period

Swap loss offset period determines how loose or strict the constraint to allowing a pool swap is. A large value relaxes the constraint and will allow many swap transactions to go through. In comparison, a value such as 7 days will require a large hurdle to be met before a destination pool swap transaction is allowed.

If the value of swap loss offset period is fixed at a high value, the Autopool system could exhibit increased turnover and experience increased swapping cost. The following describes the mechanism to adapt the swap loss offset period and tighten or loosen the pool swapping constraint should conditions warrant.

At every pool swap-out transaction, we determine the time elapsed since the last time we added to this pool. A pool swap-out transaction is a non trivial swap out i.e. swaps from WETH reserves (base asset of the Autopool) are not included. Let this time be $t$. Next, we define a constraint violation event as a pool swap out transaction where $t$ ≤ swap_cost_offset_period.

After 5 or greater constraint violation swaps within 10 swaps, the swap loss offset period is decreased by x (tighten step size) days until it reaches the minimum allowed value of 7.

After no swaps transactions occur for the period of y (constraint relax period) days, the swap loss offset period is increased by z (relax step size) day until it reaches the maximum allowed value of 60 days.

b. 30-60-90 NAV Test (LookBack Test)

This is a test conducted on the NAV (per unit or token) of the Autopool. Swapping costs should be carefully monitored to provide positive value to the Autopool. The 30 followed by 60, 90 day test is meant to allow enough time for the Autopool to earn back the swap costs. Should a lot of swaps have recently occurred (i.e. frequent swaps is not a feature of the system but just happen to occur in clusters some times), looking back in the past far enough should result a positive NAV delta i.e. NAV per token should have increased over time. A variant of this test is a 30-60 NAV test.

The following steps are conducted in this test.

  1. Aligned with some time reference (i.e. 30th of every month), record the NAV of the Autopool.

    1. Calculate the delta with the NAV recorded 30 days in the past.

    2. Calculate the delta with the NAV recorded 60 days in the past

    3. Repeat with NAV recorded 90 days in the past.

  2. If all of the three delta values are negative, pause pool swaps until

    1. the NAV reaches the highest NAV recorded (of the 3 values - 30, 60, 90 days in the past)

    2. 90 days have lapsed since the test was conducted

  3. After the pause, set the value of $swap\_cost\_offset\_period$ at the minimum value $swap\_cost\_offset\period{min}$

References:

  1. verifyRebalance is called here by Autopool on rebalance to ensure it is a favorable rebalance.

Call Flow to the Strategy

Rebalance

During Debt Reporting

At least every 24 hours, each Destination configured on the Autopool has its cached price information updated. This has the potential to lower the nav/share of the Autopool right at that moment. When the Autopool sees a profit during debt reporting, that profit is locked up for a period time, say 24 hours. This means any nav/share increase unlocks over that same time period. At the end of a call to debt reporting, AutopoolStrategy.navUpdate() is called.