The information provided by Aloe Labs, Inc. (“we,” “us” or “our”) on docs.aloe.capital (the “Site”) is for general informational purposes only. All information on the Site is provided in good faith, however we make no representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability or completeness of any information on the Site.
Under no circumstance shall we have any liability to you for any loss or damage of any kind incurred as a result of the use of the site or reliance on any information provided on the site. Your use of the site and your reliance on any information on the site is solely at your own risk.
Actions
deposit
Deposits tokens in proportion to the vault's current holdings. These tokens sit in the vault and are not used as liquidity until the next rebalance.
Arguments
amount0Max Max amount of TOKEN0 to deposit
amount1Max Max amount of TOKEN1 to deposit
amount0Min Ensure amount0 is greater than this, otherwise revert
amount1Min Ensure amount1 is greater than this, otherwise revert
Rebalances the vault to maintain an inventory ratio between 49%:51% and 51%:49%.
Pro tip:rewardToken may be something other than TOKEN0 or TOKEN1, in which case the available maintenance budget is equal to the contract's balance. Note that this will revert unless both silos report that removal of rewardToken is allowed. For example, a Compound silo should block removal of its cTokens.
Arguments
rewardToken The ERC20 token in which the reward should be denominated. If rewardToken is the 0 address, no reward will be given. Otherwise, the reward is based on (a) time elapsed since primary position last moved, and (b) the contract's estimate of how much each unit of gas costs. Since (b) is fully determined by past contract interactions and is known to all participants, (a) creates a Dutch Auction for calling this function
functionrebalance(address rewardToken) external;
Derived State
getRebalanceUrgency
Calculates the rebalance urgency, which scales linearly with block.timestamp - packedSlot.recenterTimestamp.
Will be 0 immediately after the primary Uniswap position is recentered, and 100000 after 24 hours. As this value grows, so does the reward available to actors that call rebalance(rewardToken).
Return Values
urgency How badly the vault wants its rebalance(rewardToken) function to be called
Estimates the vault's liabilities to users -- in other words, how much would be paid out if all holders redeemed their shares at once.
Underestimates the true payout unless both silos and Uniswap positions have just been poked. Also assumes that the maximum amount will accrue to the maintenance budget during the next rebalance(rewardToken). If it takes less than that for the budget to reach capacity, then the values reported here may increase after calling rebalance(rewardToken).
Return Values
inventory0 The amount of TOKEN0 underlying all shares
inventory1 The amount of TOKEN1 underlying all shares
The contract's opinion on the fair value of 1e4 units of gas, denominated in token.
The value reported here is an average over 14 samples. Nominally there is 1 sample per day, but actual timing isn't stored. Please do not use this as more than a low fidelity approximation/proxy for truth.
Arguments
token The ERC20 token for which the average gas price should be retrieved. Most likely populated for TOKEN0 and TOKEN1, but no guarantees. May also be populated for something like COMP if a Compound silo is being used.
Return Values
gasPrice The amount of token that may motivate expenditure of 1e4 units of gas
The nominal time (in seconds) that the primary Uniswap position should stay in one place before being recentered.
int24
MIN_WIDTH
The minimum width (in ticks) of the primary Uniswap position.
int24
MAX_WIDTH
The maximum width (in ticks) of the primary Uniswap position.
uint8
K
The maintenance budget buffer multiplier. The vault will attempt to build up a maintenance budget equal to the average cost of rebalance incentivization, multiplied by K.
uint8
L
If the maintenance budget drops below [its maximum size ➗ this value], maintenanceIsSustainable will become false. During the next rebalance, this will cause the primary Uniswap position to expand to its maximum width -- de-risking the vault until it has time to rebuild the maintenance budget.
uint8
B
The number of standard deviations (from volatilityOracle) to +/- from mean when choosing range for primary Uniswap position.
uint8
D
The constraint factor for new gas price observations. The new observation cannot be less than (1 - 1/D) times the previous average.
uint8
MAINTENANCE_FEE
The denominator applied to all earnings to determine what portion goes to maintenance budget. For example, if this is 10, then at most 1/10th of all revenue will be added to the maintenance budget.
uint256
FLOAT_PERCENTAGE
The percentage of funds (in basis points) that will be left in the contract after the primary Uniswap position is recentered. If your share of the pool is <<< than this, withdrawals will be more gas efficient. Also makes it less gassy to place limit orders.
IVolatilityOracle
volatilityOracle
The volatility oracle used to decide position width.
ISilo
silo0
The silo where excess TOKEN0 is stored to earn yield.
ISilo
silo1
The silo where excess TOKEN1 is stored to earn yield.